import { BIP44HDPath, CoinTypeForChain, ScryptParams, CommonCrypto } from "./types"; /** * This is similar to ethereum's key store. * But, the encryped data is not the private key, but the mnemonic words. */ export interface KeyStore { version: "1.2"; /** * Type can be "mnemonic" or "privateKey". * Below version "1", type is not defined and it is considered as "mnemonic". */ type?: "mnemonic" | "privateKey" | "ledger" | "keystone"; coinTypeForChain: CoinTypeForChain; bip44HDPath?: BIP44HDPath; meta?: { [key: string]: string; }; crypto: { cipher: "aes-128-ctr"; cipherparams: { iv: string; }; ciphertext: string; kdf: "scrypt" | "sha256" | "pbkdf2"; kdfparams: ScryptParams; mac: string; }; } export declare class Crypto { static encrypt(commonCrypto: CommonCrypto, kdf: "scrypt" | "sha256" | "pbkdf2", type: "mnemonic" | "privateKey" | "ledger" | "keystone", text: string, password: string, meta: Record, bip44HDPath?: BIP44HDPath): Promise; static decrypt(crypto: CommonCrypto, keyStore: KeyStore, password: string): Promise; }