Trying to programmically generate unused receiving address from a xPub

0

I'm trying to generate unused receiving Bitcoin address from xPub using PyWallet python library . I got the xPub from my BIP32 Electrum wallet.

Here is what I tried

from pywallet import wallet

WALLET_PUBKEY = 'xpub....'

# Generate a random address, based on timestamp
rand_addr = wallet.create_address(network="BTC", xpub=WALLET_PUBKEY)

print("Random Address\n", rand_addr)

I sent a few cents worth of Bitcoin to it's printed address but I didn't receive it. What is wrong here and what is the solution ?

user8481790

Posted 2019-11-02T06:56:34.713

Reputation: 13

2For starters, you should test this on testnet instead of with actual BTC.Pieter Wuille 2019-11-02T08:20:42.840

@PieterWuille How to do that?user8481790 2019-11-02T08:21:50.797

@PieterWuille Ok. I just figured out how to use testnet wallet but I don’t know how to use testnet network with PyWalletuser8481790 2019-11-02T09:41:36.880

No answers