Socket
Socket
Sign inDemoInstall

bip32

Package Overview
Dependencies
Maintainers
3
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bip32

A BIP32 compatible library


Version published
Maintainers
3
Created

What is bip32?

The bip32 npm package is a JavaScript implementation of the BIP32 (Bitcoin Improvement Proposal 32) standard, which defines a method for creating hierarchical deterministic (HD) wallets. This allows for the generation of a tree of key pairs from a single seed, enabling the creation of multiple addresses and keys from a single master key.

What are bip32's main functionalities?

Generate Master Key from Seed

This feature allows you to generate a master key from a given seed. The master key can then be used to derive child keys.

const bip32 = require('bip32');
const seed = Buffer.from('000102030405060708090a0b0c0d0e0f', 'hex');
const node = bip32.fromSeed(seed);
console.log(node.toBase58());

Derive Child Keys

This feature allows you to derive child keys from the master key using a specific path. This is useful for generating multiple addresses from a single seed.

const bip32 = require('bip32');
const seed = Buffer.from('000102030405060708090a0b0c0d0e0f', 'hex');
const node = bip32.fromSeed(seed);
const child = node.derivePath('m/0/0');
console.log(child.toBase58());

Export and Import Keys

This feature allows you to export keys to a Base58 string and import them back. This is useful for storing and sharing keys securely.

const bip32 = require('bip32');
const seed = Buffer.from('000102030405060708090a0b0c0d0e0f', 'hex');
const node = bip32.fromSeed(seed);
const exported = node.toBase58();
const imported = bip32.fromBase58(exported);
console.log(imported.toBase58() === exported);

Other packages similar to bip32

Keywords

FAQs

Package last updated on 25 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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