1

I have a cardano-cli/cardano-wallet server set up, and I was trying to load a previously created Yoroi wallet by using the 12 word pass phrase, but it seemed like it created a new wallet instead of recovering the existing wallet.

Questions:

  • when you use POST /wallet does it only restore wallets that had previously been created within that server (and if none are found, create a new wallet)?
  • does that mean that the 12 word pass-phrase is not universal, and recovering a wallet on different Cardano platforms would not be consistent (I don't think this is the case, because I've been able to use AdaLite and Yoroi interchangeably)
  • how, using cardano-wallet can I access a previously created wallet and look at the assets?

1 Answer 1

2
+50
  1. when you use POST /wallet does it only restore wallets that had previously been created within that server (and if none are found, create a new wallet)?

It restores the "secret key" derived from the "mnemonic pass phrase", then derives addresses. From these addresses, it can check the blockchain for balances and assets linked to these addresses.

If it turns out that this "wallet" already has associated records on the network you're connecting to, then we can label the previous action "restoring the wallet". Otherwise, we can label it "creating a wallet". The tool does not know whether it is restoring or creating - it just translates the mnemonic pass-phrase to a "secret key", etc.


  1. does that mean that the 12 word pass-phrase is not universal, and recovering a wallet on different Cardano platforms would not be consistent (I don't think this is the case, because I've been able to use AdaLite and Yoroi interchangeably)

Not universal across all wallets - it varies depending on the wallet's implementation. For example, the Trezor and Ledger wallets use different styles of derivation.

Another example: even if a wallet uses the same style, if a recovered wallet stops scanning at, say sequential address #1000 but the assets are in address #1001, then the wallet does not "see it", but it is still there in the blockchain nonetheless.


  1. how, using cardano-wallet can I access a previously created wallet and look at the assets?

Specifically for cardano-wallet and their REST API that you seem to be using, after restoring it with the POST endpoint it should return balance and assets. Or if it's already restored, GET /wallets or GET /wallets/{walletId} source: docs


Sources / deeper dive for answers part #1 and #2:

FYI Wallets in Cardano uses a variation of the very popular hierarchial deterministic wallets. For a deeper dive, see:

1
  • 1
    Good "first" answer. Way above average.
    – gRebel
    Commented Feb 21, 2022 at 23:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.