Docs

Wallet

type Wallet = {
autoConnect: (options?: any) => Promise<Account>;
connect: (options?: any) => Promise<Account>;
disconnect: () => Promise<void>;
estimateGas?: (tx: PreparedTransaction) => Promise<bigint>;
events?: {
addListener: WalletEventListener;
removeListener: WalletEventListener;
};
metadata: WalletMetadata;
switchChain?: (newChain: Chain) => Promise<void>;
getAccount: () => undefined | Account;
getChain: () =>
| undefined
| {
readonly blockExplorers?: Array<{
apiUrl?: string;
name: string;
url: string;
}>;
readonly experimental?: { increaseZeroByteCount?: boolean };
readonly id: number;
readonly name?: string;
readonly nativeCurrency?: {
decimals?: number;
name?: string;
symbol?: string;
};
readonly rpc: string;
readonly testnet?: true;
};
};