Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

btc-hdkey

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

btc-hdkey - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

44

index.d.ts
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 {};

4

index.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc