import { Buffer } from 'buffer'; /** to present encrypted private key in Ethereum keystore format. */ export interface Keystore { address: string; crypto: object; id: string; version: number; } export declare namespace Keystore { /** * encrypt private key to keystore with given password * @param privateKey the private key to be encrypted * @param password password to encrypt the private key */ function encrypt(privateKey: Buffer, password: string): Promise; /** * decrypt private key from keystore * an error thrown if not well formed * @param ks the keystore * @param password password to decrypt keystore */ function decrypt(ks: Keystore, password: string): Promise>; /** * roughly check whether keystore is well formed * @param ks the keystore */ function wellFormed(ks: any): ks is Keystore; }