import { Client } from '@open-rpc/client-js'; import { ethers } from 'ethers'; interface KardiaAccountProps { client: Client; } interface BlockQuery { blockHash?: string; blockHeight?: number; } declare class KardiaAccount { private _rpcClient; constructor({ client }: KardiaAccountProps); /** * Get account balance * @param address Address to get balance * @param options * @param options.blockHash Block hash to get balance * @param options.blockHeight Block height to get balance. If both `blockHash` and `blockHeight` is specified, `blockHash` will be used. */ getBalance(address: string, options?: BlockQuery): Promise; /** * Get account nonce * @param address Address to get nonce */ getNonce(address: string): Promise; /** * Get wallet from private key * @param privateKey Private key to generate wallet */ static getWalletFromPK(privateKey: string): { address: string; privateKey: string; balance: number; }; /** * Get wallet from mnemonic phrase * @param mnemonic Mnemonic phrase to generate * @param path Mnemonic path */ static getWalletFromMnemonic(mnemonic: string, path?: string): Promise | boolean>; /** * Check if an address is valid * @param address Address to validate */ static isAddress(address: string): boolean; /** * Generate new wallet with mnemonic phrase */ static generateWallet(): { address: string; privateKey: string; mnemonic: ethers.utils.Mnemonic; balance: number; }; /** * Get checksum version from address * @param address Original address */ static toChecksumAddress(address: string): string; /** * Check if address is a contract or not * @param address Address to check */ isContract(address: string): Promise; } export default KardiaAccount;