root 7621d6d22a 221005-1449-Kim | há 2 anos atrás | |
---|---|---|
.. | ||
src | há 2 anos atrás | |
types | há 2 anos atrás | |
LICENSE | há 2 anos atrás | |
README.md | há 2 anos atrás | |
package.json | há 2 anos atrás |
A BIP32 compatible library written in TypeScript with transpiled JavaScript committed to git.
TypeScript
import * as bip32 from 'bip32';
import { BIP32Interface } from 'bip32';
let node: BIP32Interface = bip32.fromBase58('xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi');
let child: BIP32Interface = node.derivePath('m/0/0');
// ...
NodeJS
let bip32 = require('bip32')
let node = bip32.fromBase58('xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi')
let child = node.derivePath('m/0/0')
// ...
A derivation (and extraction for modularity) of the HDWallet
/HDNode
written and tested by bitcoinjs-lib contributors since 2014.