All Projects → lukechilds → create-xpub

lukechilds / create-xpub

Licence: MIT license
Create a BIP32 extended public key

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to create-xpub

elife-xpub
eLife is an open-access journal and technology provider that publishes promising research in the life and biomedical sciences. This is their implementation of a submission and peer review system based on Coko PubSweet and xPub.
Stars: ✭ 29 (+45%)
Mutual labels:  xpub
Bitcoinj
A library for working with Bitcoin
Stars: ✭ 4,162 (+20710%)
Mutual labels:  bip32
ChainWallet
一个以研究技术为目地的基础项目,也只有最基本 Bitcoin、Ethereum 、EOS 相关的加密算法。
Stars: ✭ 26 (+30%)
Mutual labels:  bip32
go-bip44
A Golang implementation of the BIP44 for Hierarchical Deterministic (HD) addresses.
Stars: ✭ 23 (+15%)
Mutual labels:  bip32
mnemonic-sdk
Mnemonic bip39 bip32 bip44 生成助记词 私钥
Stars: ✭ 25 (+25%)
Mutual labels:  bip32
python-bip32
Minimalistic implementation of BIP32
Stars: ✭ 28 (+40%)
Mutual labels:  bip32
hdwallet
HD wallet BIP-32 related key derivation utilities.
Stars: ✭ 20 (+0%)
Mutual labels:  bip32
python-hdwallet
Python-based library for the implementation of a hierarchical deterministic wallet generator for more than 140+ multiple cryptocurrencies.
Stars: ✭ 210 (+950%)
Mutual labels:  bip32
cashuwallet
Cashu is a cryptocurrency wallet for smartphones. Be your own bank. Accept payments or spend crypto directly from your phone.
Stars: ✭ 35 (+75%)
Mutual labels:  bip32
ethereum-hdwallet
CLI and Node.js library for Ethereum HD Wallet derivations from mnemonic
Stars: ✭ 44 (+120%)
Mutual labels:  bip32
ed25519-hd-key
🔐 Key Derivation for ed25519
Stars: ✭ 54 (+170%)
Mutual labels:  bip32
btclib
btclib: a python3 library for 'bitcoin cryptography'
Stars: ✭ 60 (+200%)
Mutual labels:  bip32
Multy-android
Mobile multy-blockchain wallet client.
Stars: ✭ 17 (-15%)
Mutual labels:  bip32
bitcoincashj
A library for working with Bitcoin Cash
Stars: ✭ 38 (+90%)
Mutual labels:  bip32
Multy-IOS
Mobile multy-blockchain wallet client.
Stars: ✭ 25 (+25%)
Mutual labels:  bip32
btc-address-generator
Bitcoin address generator (bech32, segwit, paper wallets, BIP39 seed, etc.)
Stars: ✭ 80 (+300%)
Mutual labels:  bip32

create-xpub

Create a BIP32 extended public key

Build Status Coverage Status npm tippin.me

Creates a Base58 encoded extended public key (xpub) for use in a BIP32 hierarchical deterministic wallet.

Install

npm install create-xpub

Usage

You should familiarise yourself with BIP32 to understand what these arguments represent.

const createXpub = require('create-xpub');

const xpub = createXpub({
  depth: 3,
  childNumber: 2147483648,
  chainCode: '84cf7d9029cdd9fcadbb3717fd92ec0db7d7d9787c57c13c08fc887c389b566b',
  publicKey: '048bcdcf59f046b13f1eb35b608d1211265fde8cc44fc7a5a7f7107c5cf238095328a0e0d7be17c7d3e48490e8c6433af6d2c3dacc687f3fecaa98a3d05f17de97'
});
// => 'xpub6CgMcBZk66ayM9ESh7QtBmRKJbsa6rBeBH2k4aQZQJGossryP5r2N2nQS4hBMG1wb8igPoH53bxtzTBaeMqJkbu8bxsih1gGkoAn23Nr8VP'

Pass in version bytes for a different network:

const createXpub = require('create-xpub');

const tpub = createXpub({
  networkVersion: createXpub.testnet,
  depth: 3,
  childNumber: 2147483648,
  chainCode: '84cf7d9029cdd9fcadbb3717fd92ec0db7d7d9787c57c13c08fc887c389b566b',
  publicKey: '048bcdcf59f046b13f1eb35b608d1211265fde8cc44fc7a5a7f7107c5cf238095328a0e0d7be17c7d3e48490e8c6433af6d2c3dacc687f3fecaa98a3d05f17de97'
});
// => 'tpubDD3z8RPRoNYRcwRJ9JPyPgkgdiyE6Eghiud3R8ThkD2hdAXgTJh7WUTEg6mxskyBP3Fb1NnwahnwgdgC3DgYe3MRfZd2NYLWLkmBn7UWZXk'

Tip

If you're working with ledgerjs you can pass the output of getWalletPublicKey() almost directly in.

API

createXpub(options)

Returns a Base58 encoded extended public key.

options

Type: Object

An object containing the following properties of the derivation path.

Consult BIP32 for an in-depth explanation on these properties.

networkVersion

Type: number
Default: 0x0488B21E (mainnet)

Network version bytes.

depth

Type: number
Default: undefined

The depth of the derived key.

childNumber

Type: number
Default: undefined

The child number.

chainCode

Type: string
Default: undefined

The chain code.

publicKey

Type: string
Default: undefined

The public key in compressed or uncompressed form.

createXpub.mainnet

Mainnet (xpub) version bytes: 0x0488B21E

createXpub.testnet

Testnet (tpub) version bytes: 0x043587CF

License

MIT © Luke Childs

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].