Giter VIP home page Giter VIP logo

bip32d's Introduction

bip32

Build Status

NPM

code style: prettier

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

Example

TypeScript

import * as bip32 from 'bip32d';
import { BIP32Interface } from 'bip32d';
let node: BIP32Interface = bip32.fromBase58('xprv9s21ZrQH143K3XpLJrX92hM28H2o1CgVi6HXCWGBXtMkHxSkpxiFcnmzjy5qNyi3QUfSVXXapRT8St3wyLbWux9JysZZgvmvQZ75FUqrakP');

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

NodeJS

let bip32 = require('bip32d')
let node = bip32.fromBase58('xprv9s21ZrQH143K3XpLJrX92hM28H2o1CgVi6HXCWGBXtMkHxSkpxiFcnmzjy5qNyi3QUfSVXXapRT8St3wyLbWux9JysZZgvmvQZ75FUqrakP')

let child = node.derivePath('m/0/0')
console.log(child)
//BIP32 {
//  __D: <Buffer ea 39 8f 84 c7 5d 85 d5 4d 85 e6 84 1e c4 43 30 d4 07 98 f6 97 76 fd 49 54 9e 03 4e 30 af 11 ad>,
//  __Q: undefined,
//  chainCode: <Buffer 9f ec e5 30 ff 91 d7 23 82 20 c2 d2 5f 16 ed 29 34 eb b9 31 d2 20 0b 27 c7 8b 35 36 ad 17 d2 c8>,
//  network: { wif: 36, bip32: { public: 76067358, private: 76066276 } },
//  __DEPTH: 2,
//  __INDEX: 0,
//  __PARENT_FINGERPRINT: 1537180878,
//  lowR: false }

LICENSE MIT

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

bip32d's People

Contributors

metaspartan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.