Mnemonic_sentence - Restore Wallet


I cant restore my wallet on TestNet.

Steps to reproduce:

  1. Create a new wallet using cardano-wallet (doc)
  2. Wallet is created
  3. Trying to recover wallet but without success.
  4. Create couple of new wallets just to be sure that I didn’t make a mistake in words.
  5. Still the same response.


curl --request POST \
  --url http://localhost:1338/v2/wallets \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "NameOfTheWallet",
  "mnemonic_sentence": ["xxx", "xxx", "xxx", "xxx", "xxx", "xxx", "xxx", "xxx", "xxx", "xxx", "xxx", "xxx", "xxx", "xxx", "xxx"],
  "mnemonic_second_factor": ["xxx", "xxx", "xxx", "xxx", "xxx", "xxx", "xxx", "xxx", "xxx"],
  "passphrase": "passphrase",
  "address_pool_gap": 20
}' | jq

This is the response from cardano-wallet

  "code": "bad_request",
  "message": "Error in $['mnemonic_sentence']: Invalid entropy checksum: please double-check the last word of your mnemonic sentence."

Do you have any ides about what I am doing wrong?

Creating the wallet should be the same as restoring once you generate the mnemonics.

Have you tried:

curl --request POST \
  --url http://localhost:1338/v2/wallets \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "RestoredWallet1",
  "mnemonic_sentence": ["word1", "word2",...."word24"],
  "passphrase": "mypassphrase"
}' | jq

Also, make sure to wait until the wallet is synced (state.status == ready):
curl --request GET --url http://localhost:1338/v2/wallets/WALLET_ID_HERE

should indicate that it is a typo or wrong word in the seed.

@mcrio Man, you are right !

According to official documentation “mnemonic_second_factor” should be mandatory but it isn’t.

So, the request only with “mnemonic_sentence” went successfuly.

Thanks !

1 Like

Maybe you misread it, it says An optional passphrase used to encrypt the mnemonic sentence. for mnemonic_second_factor.

1 Like

The documentation doesn’t say “required” at mnemonic_second_factor and address_pool_gap, but why are they giving an error for mnemonic_sentence, when it’s really mnemonic_second_factor that’s the problem?

Anyway, good you solved it!

1 Like

According to the example @nemanjamil posted, it seems to me as he had split up the 24 words mnemonics, as he used 15 for the mnemonic_sentence and 9 for the mnemonic_second_factor.

The command eventually couldn’t verify that the combination of these 15 words is a valid mnemonic phrase.

1 Like