UNPKG

@kaiachain/ethers-ext

Version:
33 lines (32 loc) 1.23 kB
import { BigNumberish, JsonRpcProvider } from "ethers"; import { Wallet } from "./signer.js"; export declare class Accounts { wallets: Wallet[]; constructor(provider: JsonRpcProvider, list: [[string, string?]] | Wallet[]); add(account: [string, string?], provider: JsonRpcProvider): Promise<boolean>; remove(account: [string, string?]): Promise<boolean>; removeAll(): void; accountByKey(privateKey: string): Wallet[]; accountByAddress(address: string): Promise<Wallet[]>; } type AccountInfo = { address: string; nonce: number; balance: string | BigNumberish; key: any; }; export declare class AccountStore { private provider; accounts: Accounts | undefined; accountInfos: AccountInfo[] | undefined; private signableKeyList; refresh(provider: JsonRpcProvider, list: [[string, string?]] | Wallet[]): Promise<void>; updateSignableKeyList(): Promise<void>; hasInSignableKeyList(address: string): boolean; hasAccountInfos(address: string): boolean; getType(address: string): number | null; getAccountInfo(address: string): AccountInfo | null; getAccountInfos(): AccountInfo[] | undefined; getPubkeyInfo(x: string, y: string): any; } export {};