diff --git a/types/hdkey/hdkey-tests.ts b/types/hdkey/hdkey-tests.ts new file mode 100644 index 0000000000..eda1e9e995 --- /dev/null +++ b/types/hdkey/hdkey-tests.ts @@ -0,0 +1,6 @@ +import HDKey = require('hdkey'); +const hdKey = new HDKey(); +hdKey.derive('m/1/42'); +hdKey.privateKey; +hdKey.publicKey; +hdKey.chainCode; diff --git a/types/hdkey/index.d.ts b/types/hdkey/index.d.ts new file mode 100644 index 0000000000..3cf798c15b --- /dev/null +++ b/types/hdkey/index.d.ts @@ -0,0 +1,16 @@ +// Type definitions for hdkey 0.7 +// Project: https://github.com/cryptocoinjs/hdkey +// Definitions by: Leonid Logvinov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare class HDNode { + static fromMasterSeed(seed: Buffer): HDNode; + publicKey: Buffer; + privateKey: Buffer; + chainCode: Buffer; + constructor(); + derive(path: string): HDNode; +} +export = HDNode; diff --git a/types/hdkey/tsconfig.json b/types/hdkey/tsconfig.json new file mode 100644 index 0000000000..f078912fe8 --- /dev/null +++ b/types/hdkey/tsconfig.json @@ -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"] +} diff --git a/types/hdkey/tslint.json b/types/hdkey/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/hdkey/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }