import type { StoragePort, CoinFetcher, SpendableCoin } from './adapters.js'; export type { SpendableCoin } from './adapters.js'; export declare class CoinSelectionError extends Error { readonly code: 'FETCH_FAILED' | 'INSUFFICIENT_FUNDS' | 'SERVICE_UNAVAILABLE' | 'NETWORK_ERROR' | 'INVALID_TARGET'; readonly details?: Record | undefined; constructor(message: string, code: 'FETCH_FAILED' | 'INSUFFICIENT_FUNDS' | 'SERVICE_UNAVAILABLE' | 'NETWORK_ERROR' | 'INVALID_TARGET', details?: Record | undefined); } export interface CoinSelectionResult { selectedCoins: SpendableCoin[]; totalSelected: string; change: string; insufficientFunds: boolean; fromAddresses: string[]; } export type SendMode = 'global' | 'focused'; export interface CoinSelectionOptions { mode: SendMode; targetAmount: string; tokenId?: string; focusedAddress?: string; excludedAddresses?: string[]; } export declare function parseDecimalToBigInt(value: string): bigint; export declare function bigIntToDecimalString(value: bigint): string; export declare function addDecimalStrings(a: string, b: string): string; export declare function subtractDecimalStrings(a: string, b: string): string; export declare function compareDecimal(a: string, b: string): number; export declare function isPositive(value: string): boolean; export declare class CoinSelectionService { private excludedAddresses; private storage; private fetcher; constructor(fetcher: CoinFetcher, storage?: StoragePort); loadExcludedAddresses(): Promise; saveExcludedAddresses(): Promise; addExcludedAddress(address: string): void; removeExcludedAddress(address: string): void; getExcludedAddresses(): string[]; isAddressExcluded(address: string): boolean; fetchSpendableCoins(addresses: string[], tokenId?: string): Promise; orderCoinsByAmount(coins: SpendableCoin[]): SpendableCoin[]; selectCoins(coins: SpendableCoin[], options: CoinSelectionOptions): CoinSelectionResult; selectCoinsForSend(allAddresses: string[], options: CoinSelectionOptions): Promise; formatCoinInputs(coins: SpendableCoin[]): Array<{ coinId: string; }>; }