UNPKG

@meterio/devkit

Version:

Typescript library to aid DApp development on Meter network

29 lines (28 loc) 912 B
/// <reference types="node" /> /** 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<any>; /** * 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<Buffer>; /** * roughly check whether keystore is well formed * @param ks the keystore */ function wellFormed(ks: any): ks is Keystore; }