My goal: given wallet's xpub address, generate unique addresses to accept payments.
My current solution:
I am using Python's library pywallet (
https://pypi.org/project/pywallet/) to achive this.
I have created 2 wallets in testnet using Copay wallet, 1 to simulate payer, 1 to simulate receiver. I have taken sender's xpub address, and tried generating addresses like this:
WALLET_PUBKEY = <xpub>
from pywallet import wallet
user_addr = wallet.create_address(network="btctest", xpub=WALLET_PUBKEY, child=0)
print(user_addr)
this gives me the following output:
{'path': 'm/2147483649/0',
'bip32_path': "m/44'/0'/0'/2147483649/0",
'address': '1MaQRP6S5s1EjS3TiziduBKNoEBtPwsrS4'}
However, if I transfer bitcoins to 1MaQRP6S5s1EjS3TiziduBKNoEBtPwsrS4, the receiver wallet does not get the funds. What am I doing wrong?