-
when am trying to create a wallet using a wif I get this error : My code:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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 is what you want to accomplish? w = Wallet.create('test_wallet_import_master_key', keys=wif, scheme='single')
w.info() |
Beta Was this translation helpful? Give feedback.
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
or create a wallet without a key structure, but I'm not if that…