DefinitelyTyped/types/hdkey/index.d.ts
Tvrtko Majstorović 8d3e4aacc9 [@types/hdkey] Add declarations for toJSON and fromJSON (ver. 1.1.1) (#38517)
* Add toJSON and fromJSON to HDNode declaration

* Add credentials
2019-09-26 16:10:12 -07:00

20 lines
647 B
TypeScript

// Type definitions for hdkey 0.7
// Project: https://github.com/cryptocoinjs/hdkey
// Definitions by: Leonid Logvinov <https://github.com/LogvinovLeon>
// Tvrtko Majstorovic <https://github.com/TvrtkoM>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node"/>
declare class HDNode {
static fromMasterSeed(seed: Buffer): HDNode;
publicKey: Buffer;
privateKey: Buffer;
chainCode: Buffer;
constructor();
derive(path: string): HDNode;
toJSON(): { xpriv: string; xpub: string };
static fromJSON(obj: { xpriv: string; xpub: string }): HDNode;
}
export = HDNode;