muntorg / munt-official

Munt is a witness-secured decentralized network for payments, digital assets, finance and more
https://www.munt.org
Other
135 stars 46 forks source link

Import 12 word recovery phrase #233

Closed si2w closed 3 years ago

si2w commented 3 years ago

Describe the issue

Import of legacy account using mnemonic into the HD client. I asked the question on slack, tested the solution proposed by members but nobody knows how to solve the issue, asked twice.

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. Create a legacy account in the debug console : createaccount "new_account" "Legacy"
  2. Import the private key mnemonics into the new legacy account : importprivkey "12 word recovery phrase" "new_account"

Expected behaviour

I should be able to restore the account

Actual behaviour

I receive a error Invalid private key encoding (code -5)

What version of Gulden are you using?

v2.3.0.4

Machine specs:

mjmacleod commented 3 years ago

Its very unclear what you are trying to do here.

A "legacy account" is specifically an account that does not have any phrase at all associated with it (it generates keys at random as needed, like how older wallets that did not have recovery phrases worked)

The 12 word recovery phrase on the other hand is used by the wallet to generate non-legacy accounts.

These are two incompatible concepts, importing a "recovery phrase" into a "legacy account" is not something that makes sense in any way whatsoever.

Perhaps you could rewind a little bit and explain in more detail what it is that you are actually hoping to accomplish?

si2w commented 3 years ago

The method with legacy accounts was suggested by the support on slack ;)

I would like to import an old account based on private keys I have using the 12 words recovery phrase into the current Gulden app. How can I do ? Thanks a lot

mjmacleod commented 3 years ago

To import an old account based on private keys you would need not a 12 word phrase but the keys itself. These can be imported directly via "Tools > import key" dialog or as in your original description by creating a legacy account and then doing "importprivkey "key" "new_account"

Keys take a form similar to: "RaEaDa12DaAbccLbB1azIp6aEewABcYaEabKKaBbAAAbZZZaa2aBo"

si2w commented 3 years ago

How can I convert the 12 word phrase to the private key ?

mjmacleod commented 3 years ago

You generally don't, as mentioned they're two seperate concepts that are for the most part incompatible.

If you have a 12 word phrase you just import the entire phrase into your wallet when you create a new wallet, via the recovery dialog and all necessary keys/accounts are then generated from that as required.

si2w commented 3 years ago

I tried already this :

How can I use the 12 words phrase to create a new wallet ? It seems to be removed from actual versions.

mjmacleod commented 3 years ago

You just install the software on the machine and select that you want to "recover from an existing phrase" and then enter it. If you already have a wallet on your machine then you will have to first move it somewhere safe before launching the software and recovering.

If in doubt ask the support channel on slack, who this is a better question for and who are better able to assist, this doesn't really seem to belong on github which is meant for actual issues with the software and not support queries.

si2w commented 3 years ago

I completely agree. The support guys sent me away from the answer. Thanks all for your time anyway. It's working now.