@okxweb3/coin-kaia
Version:
An kaia SDK for building Web3 wallets and applications.
31 lines (30 loc) • 1.04 kB
TypeScript
import { BigNumberish } from "ethers6";
import { Wallet } from "./signer";
export declare class Accounts {
wallets: Wallet[];
constructor(list: [[string, string?]] | Wallet[]);
add(account: [string, string?]): 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 {
accounts: Accounts | undefined;
accountInfos: AccountInfo[] | undefined;
private signableKeyList;
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 {};