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

@samouraiwallet/bip32

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@samouraiwallet/bip32

A BIP32 compatible library

  • 5.1.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@samouraiwallet/bip32

This is a fork of the original bip32 library with minor changes:

  • codebase updated to use UInt8Array instead of Buffer - thus making this library browser-compatible without any shims
  • package type changed to ESModule instead of CommonJS
  • switched from typeforce to ow for better type safety
  • updated tests to reflect these changes

Original Readme

A BIP32 compatible library written in TypeScript with transpiled JavaScript committed to git.

Example

TypeScript

import BIP32Factory from 'bip32';
import * as ecc from 'tiny-secp256k1';
import type { BIP32Interface } from 'bip32';
// You must wrap a tiny-secp256k1 compatible implementation
const bip32 = BIP32Factory(ecc);

const node: BIP32Interface = bip32.fromBase58('xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi');

const child: BIP32Interface = node.derivePath('m/0/0');
// ...

NodeJS

import BIP32Factory from 'bip32';
import * as ecc from 'tiny-secp256k1';
// You must wrap a tiny-secp256k1 compatible implementation
const bip32 = BIP32Factory(ecc);

const node = bip32.fromBase58('xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi');

const child = node.derivePath('m/0/0');

LICENSE MIT

A derivation (and extraction for modularity) of the HDWallet/HDNode written and tested by bitcoinjs-lib contributors since 2014.

Keywords

FAQs

Package last updated on 17 Apr 2024

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