Merge pull request #26121 from 0xProject/feature/hdkey

Add types for hdkey
This commit is contained in:
Daniel Rosenwasser
2018-05-29 16:41:28 -07:00
committed by GitHub
4 changed files with 39 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
import HDKey = require('hdkey');
const hdKey = new HDKey();
hdKey.derive('m/1/42');
hdKey.privateKey;
hdKey.publicKey;
hdKey.chainCode;
+16
View File
@@ -0,0 +1,16 @@
// Type definitions for hdkey 0.7
// Project: https://github.com/cryptocoinjs/hdkey
// Definitions by: Leonid Logvinov <https://github.com/LogvinovLeon>
// 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;
}
export = HDNode;
+16
View File
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": ["index.d.ts", "hdkey-tests.ts"]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }