0.5.0 • Published 2 years ago

update-btc-xpub-address v0.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 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