UNPKG

@cosmos-kit/core

Version:

cosmos-kit wallet connector core package

25 lines (24 loc) 1.37 kB
import { ChainName, ChainRecord, DisconnectOptions, EndpointOptions, IChainWallet, Wallet, WalletClient, WalletStatus } from '../types'; import type { ChainWalletBase } from './chain-wallet'; import { WalletBase } from './wallet'; export declare abstract class MainWalletBase extends WalletBase { protected _chainWalletMap?: Map<ChainName, ChainWalletBase>; preferredEndpoints?: EndpointOptions['endpoints']; ChainWallet: IChainWallet; constructor(walletInfo: Wallet, ChainWallet: IChainWallet); initingClient(): void; initClientDone(client: WalletClient | undefined): void; initClientError(error: Error | undefined): void; protected onSetChainsDone(): void; private makeFinalEndpoints; addEnpoints(endpoints?: EndpointOptions['endpoints']): void; setChains(chains: ChainRecord[], overwrite?: boolean): void; get chainWalletMap(): Map<string, ChainWalletBase>; getChainWallet: (chainName: string) => ChainWalletBase | undefined; getChainWalletList: (activeOnly?: boolean) => ChainWalletBase[]; getGlobalStatusAndMessage: (activeOnly?: boolean) => [WalletStatus, string | undefined]; update(): Promise<void>; reset(): void; connectAll(activeOnly?: boolean, exclude?: ChainName): Promise<void>; disconnectAll(activeOnly?: boolean, exclude?: ChainName, options?: DisconnectOptions): Promise<void>; }