import { Asset, AnyChain, AssetAmount, ConfigService, TransferConfigs, TransferValidation } from '@galacticcouncil/xc-core'; import { Subscription } from 'rxjs'; import { ChainBalancesResult, Transfer } from './types'; export interface WalletOptions { configService: ConfigService; transferValidations?: TransferValidation[]; } export declare class Wallet { readonly config: ConfigService; readonly validations: TransferValidation[]; constructor({ configService, transferValidations }: WalletOptions); transfer(asset: string | Asset, srcAddress: string, srcChain: string | AnyChain, dstAddress: string, dstChain: string | AnyChain): Promise; getTransferData(configs: TransferConfigs, srcAddress: string, dstAddress: string): Promise; /** * One-shot snapshot of every asset configured on a chain. * * Intended for balance lists (asset/chain pickers) that should fetch once and * re-fetch on demand rather than hold N live subscriptions open. Chains that * can serve the whole set in a single read do so; the rest fall back to a * per-asset read, where a single failing asset can't blank the snapshot. */ getBalances(address: string, chain: string | AnyChain): Promise; /** * Chains the address can hold a balance on */ getChainsForAddress(address: string, chains: (string | AnyChain)[]): AnyChain[]; /** * Read balances in parallel across every chain the address is valid on. * Defaults to all configured chains. */ getAllBalances(address: string, chains?: (string | AnyChain)[]): Promise; /** * Live subscription for an explicit set of assets on a chain. * * Only the given assets are subscribed — callers should narrow this to the * asset(s) actually in view (e.g. the selected transfer asset) rather than the * whole chain, since each asset holds an open subscription. */ subscribeBalance(address: string, chain: string | AnyChain, assets: (string | Asset)[], observer: (balances: AssetAmount[]) => void): Promise; }