import { ethers } from "ethers"; import { TWalletBaseItem } from "../models/TWallet"; /** * @class */ export declare class EtherWallet { /** * @param wallet {any} wallet object * @returns {boolean} */ static isValidWalletFactoryData(wallet: any): boolean; /** * @param walletItem {TWalletBaseItem} * @returns { ethers.HDNodeWallet | ethers.Wallet | null } */ static createWalletObject(walletItem: TWalletBaseItem): ethers.HDNodeWallet | ethers.HDNodeVoidWallet | ethers.Wallet | null; /** * Create a wallet from a mnemonic phrase. * @param mnemonic - string * @returns {TWalletBaseItem} */ static createWalletFromMnemonic(mnemonic?: string): TWalletBaseItem; /** * Returns the wallet details for the JSON Keystore Wallet json using {password}. * https://docs.ethers.org/v6/api/wallet/ * https://docs.ethers.org/v6/api/wallet/#KeystoreAccount * @param keystoreJson {string} Wallet keystore JSON string * @param password {string} decrypt keystoreJson using {password} * @returns {Promise} */ static createWalletFromKeystore(keystoreJson: string, password?: string): Promise; /** * Resolved to the JSON Keystore Wallet for {wallet} encrypted with {password}. * @param wallet {TWalletBaseItem} * @param password {string} encrypt {wallet} with {password} * @returns {Promise} */ static getKeystoreOfWallet(wallet: TWalletBaseItem, password?: string): Promise; /** * https://iancoleman.io/bip39/ * 扩展私钥不是钱包的私钥,是助记词 * m/44'/60'/0'/0 * Derivation Path BIP44 * * Create a wallet from an extended private key. * supported BIP32 Root Key | Account Extended Private Key | BIP32 Extended Private Key * @param {*} extendedKey - BIP32 Extended Private Key * @returns {TWalletBaseItem} */ static createWalletFromExtendedKey(extendedKey: string): TWalletBaseItem; /** * Create a wallet from a wallet private key * @param {*} privateKey * @returns {TWalletBaseItem} */ static createWalletFromPrivateKey(privateKey?: any): TWalletBaseItem; /** * Create a watch wallet from a wallet address * @param {*} address * @returns {TWalletBaseItem} */ static createWalletFromAddress(address: string): TWalletBaseItem; /** * @param address {string} wallet address * @returns {TWalletBaseItem} */ static createWatchWallet(address: string): TWalletBaseItem; /** * @param address {string} wallet address * @return {boolean} */ static isValidAddress(address: any): boolean; /** * @param privateKey {any} * @returns {boolean} */ static isValidPrivateKey(privateKey: any): boolean; /** * @param publicKey {any} * @returns {boolean} */ static isValidPublicKey(publicKey: any): boolean; /** * @param input {any} * @returns {boolean} */ static isValidLowercaseHex(input: any): boolean; /** * Generate a new address for the specified wallet * @param wallet {any} * @returns {TWalletBaseItem} */ static createNewAddress(wallet: any): TWalletBaseItem; /** * @param walletItem {TWalletBaseItem} * @returns {TWalletBaseItem} * @private */ private static decorateResult; } //# sourceMappingURL=EtherWallet.d.ts.map