DefinitelyTyped/types/hdkey/hdkey-tests.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

9 lines
193 B
TypeScript

import HDKey = require('hdkey');
const hdKey = new HDKey();
hdKey.derive('m/1/42');
hdKey.privateKey;
hdKey.publicKey;
hdKey.chainCode;
hdKey.toJSON();
HDKey.fromJSON({ xpriv: '', xpub: '' });