Wallet

Wallet interface

type Wallet<TWalletId extends WalletId = WalletId> = {
getAdminAccount?: () => Account | undefined;
getConfig: () => CreateWalletArgs<TWalletId>[1];
id: TWalletId;
onConnectRequested?: () => Promise<void>;
subscribe: WalletEmitter<TWalletId>["subscribe"];
autoConnect: (
options: WalletAutoConnectionOption<TWalletId>,
) => Promise<Account>;
connect: (
options: WalletConnectionOption<TWalletId>,
) => Promise<Account>;
disconnect: () => Promise<void>;
getAccount: () => undefined | Account;
getChain: () =>
| undefined
| Readonly<ChainOptions & { rpc: string }>;
switchChain: (
chain: Readonly<ChainOptions & { rpc: string }>,
) => Promise<void>;
};