UNPKG

@kaiachain/ethers-ext

Version:
34 lines (33 loc) 1.29 kB
import { BigNumber } from "@ethersproject/bignumber"; import { JsonRpcProvider } from "@ethersproject/providers"; 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 | BigNumber; 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 {};