Comparing version 0.0.6 to 0.0.7
export declare type network = 'testnet' | 'mainnet'; | ||
export declare type keyType = "public" | "private"; | ||
/** | ||
* Generate a BIP39 menemonic | ||
*/ | ||
declare function randomMenemonic(): string; | ||
/** | ||
* Generate a pseudo-random seed from BIP39 menemonic | ||
* @param menemonic | ||
*/ | ||
declare function seedFromMenemonic(menemonic: string): string; | ||
/** | ||
* Derive an extended keypair from seed | ||
* @param seed The seed-string to use for generating the HDKey | ||
* @param net Network to use ("testnet", "mainnet") | ||
* @param n n-th derived keypair default:0 | ||
*/ | ||
declare function deriveAccount(seed: string, net?: network, n?: number): { | ||
publicExtendedKey: string; | ||
privateExtendedKey: string; | ||
}; | ||
/** | ||
* | ||
* @param extendedKey Extended key to generate address from | ||
* @param networkName Network to use ("testnet", "mainnet") | ||
* @param n n-th derived address default:0 | ||
*/ | ||
declare function generateAddress(extendedKey: string, n?: number): string; | ||
declare function HDKeyFromExtendedKey(extendedKeyB58: string): any | false; | ||
declare function checkHDKey(key: string): { | ||
net: network; | ||
type: keyType; | ||
} | false; | ||
declare function deriveAddress(extendedKey: string, n: number, derivationPrefix?: string): string | false; | ||
declare function addressFromHDKey(hdkey: string, net?: network): string; | ||
export declare const hdKey: { | ||
addressFromHDKey: typeof addressFromHDKey; | ||
deriveAccount: typeof deriveAccount; | ||
deriveAddress: typeof deriveAddress; | ||
generateAddress: typeof generateAddress; | ||
HDKeyFromExtendedKey: typeof HDKeyFromExtendedKey; | ||
seedFromMenemonic: typeof seedFromMenemonic; | ||
randomMenemonic: typeof randomMenemonic; | ||
checkHDKey: typeof checkHDKey; | ||
}; | ||
export {}; |
@@ -123,3 +123,3 @@ "use strict"; | ||
} | ||
exports.hdKey = { | ||
const hdKey = { | ||
addressFromHDKey: addressFromHDKey, | ||
@@ -134,2 +134,2 @@ deriveAccount: deriveAccount, | ||
}; | ||
module.exports = exports.hdKey; | ||
exports = hdKey; |
{ | ||
"name": "btc-hdkey", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Hierarchical Deterministic Wallet support for BTC", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"scripts": { | ||
@@ -7,0 +8,0 @@ "build": "tsc", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5198
135