0.2.0 • Published 4 years ago

btc-xpub-address v0.2.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

BTC X-Pub Address creator Downloads npm version

Generate a BTC Address from an x-pub.

Installation

npm i btc-xpub-address

Uses

Get one (1) random BTC Address:

import BtcXpubAddress from 'btc-xpub-address';

const xpub = 'your xpub';
const address = await BtcXpubAddress.getAddress(xpub);

Get one (1) BTC Address at an index:

import BtcXpubAddress from 'btc-xpub-address';

const xpub = 'your xpub';
const index = 0;
const address = await BtcXpubAddress.getAddress(xpub, index);

Get multiple BTC addresses (10):

import BtcXpubAddress from 'btc-xpub-address';

const xpub = 'your xpub';
const address = await BtcXpubAddress.getAddresses(xpub, 10);

Get BTC addresses at provided indexes:

import BtcXpubAddress from 'btc-xpub-address';

const xpub = 'your xpub';
const indexes = [ 0, 1000, 10000, 1000000 ];
const address = await BtcXpubAddress.getAddressesAtIndexes(xpub, indexes);

For more information about BTC X-Pubs click here