Skip to content

Error creating wallet with Wif #393

Answered by mccwdev
esmerlinp asked this question in Q&A
Discussion options

You must be logged in to vote

This key is not a masterkey or publicmasterkey. A masterkey always has a depth of 0 is private and is used to derive all other keys of the wallet. A public masterkey mostly has a depth of 2 and 3 is public, and can be used to derive a part of the public addresses for your wallet.

The key you provide has a depth of 5 and cannot be used to derive any addresses from.

You can import the address in a existing wallet

wif="xpub6GdBEtaX1BuCdxnR1HsTWmC7A9VAHX2tM9fev9UG6CxKdfBtnB6VZBcz5HoB8MCEkg7uxncVPCBgfwsMn6T533g5X5PN8TQQkHrHhEDbNup"
w = Wallet.create('test_wallet_import_master_key', witness_type='legacy')
w.import_key(wif)
w.info()

or create a wallet without a key structure, but I'm not if that…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mccwdev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants