update-btc-xpub-address
v0.5.0
Published
Derive BTC address from an X-Pub
Downloads
6
Maintainers
Readme
BTC X-Pub Address creator
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