ranaroussi / pywallet

Dead-simple BIP32 (HD) wallet creation for BTC, BTG, BCH, LTC, DASH, USDT, QTUM and DOGE
MIT License
454 stars 180 forks source link

what is meaning of parameter WALLET_PUBKEY #35

Open zxhubo opened 6 years ago

zxhubo commented 6 years ago

the README.md has code for example: user_addr = wallet.create_address(network="BTC", xpub=WALLET_PUBKEY, child=10)

xpub is a constant,but I don't know how to padding it ? for example xpub ="BTC" ? or other ?

merc1er commented 6 years ago

The xpub (extended public key) is generated from the private key. Here is an example of xpub: xpub661MyMwAqRbcGmyYQB6zkDXoCYfZ9Rt859Hvtz5XPXYYYj78tu47gdGvDcrehtHLDKZBy8HLe4HHGrRKWDMi8dwxvyUY4n4nrZdB5Dztrsm

Use the following code to generate an xpub with pywallet:

from pywallet import wallet

w = wallet.create_wallet(network='BCH')
print(w['xpublic_key'])
zxhubo commented 6 years ago

@BUYMERCIER thanks very much。

merc1er commented 6 years ago

@zxhubo please close the issue if you don't need any further help ;)