bit icon indicating copy to clipboard operation
bit copied to clipboard

Generate childkeys beforehand

Open GauthamramRavichandran opened this issue 5 years ago • 1 comments

I need to generate a bunch of childkeys/addresses and then store them, which will be used later on.

Initially, tried get_child with increasing childids,

parent_wallet = wallet.from_master_key....
for childid in range(20):
 childwallet = parent_wallet.get_child(childid)
 print(childwallet.toaddress())   # same address for all 20 ids

This below code is working,

parent_wallet = wallet.from_master_key....
for childid in range(20):
 childwallet = parent_wallet.create_new_address_for_user(childid)
 print(childwallet.toaddress())   # different addresses

I could use it for generating new addresses, how can I make a transaction with child addresses since I don't have the privatekey/wif?

GauthamramRavichandran avatar Aug 09 '20 17:08 GauthamramRavichandran

My bad, wrong repo. Anyways, does this repo support BIP32? for producing child keys under a single master key

GauthamramRavichandran avatar Aug 10 '20 16:08 GauthamramRavichandran