cardano-cli does not support mnemonic derivation natively, so you'd have to use cardano-wallet software:
- Install cardnao-wallet or cardano-addresses and put the executables in your
$PATH
. I will be using cardano-wallet for this demo, but cardano-address would work exactly the same.
- Run the following:
<YOUR_24_WORD_MNEMONMIC> | cardano-wallet key from-recovery-phrase Shelley > root.xprv
This will create an extended root private key from the mnemonic under the name root.xprv
- Run the following:
cat root.xprv | cardano-wallet key child 1852H/1815H/0H \
| tee acct.xprv | cardano-wallet key public --with-chain-code > acct.xpub
This will create two files: acct.xprv
(your extended account private key - will be used to further derive your payment/staking private/public keys) and acct.xpub
(your extended account public key - use this to verify that it is the same as the "wallet public key" in Daedalus in the next step)
- Fire up Daedalus and go to More > Settings > Wallet Public Key. View your public key and ensure that it is the same as the
acct.xpub
you derived in the previous step:
- If the keys match, you may now use the
acct.xprv
to further derive the address-specific payment/stake keypairs.
- Run the following:
cat acct.xprv | cardano-wallet key child <DERIVATION_PATH>
, where the DERIVATION_PATH is the following:
0/n
for payment keypairs
1/n
for change-address payment keypairs
2/0
for the account-level staking keypair
Running the above command will output the extended signing key for each address index (n). To convert these keys into cardano-cli
compatible non-extended signing keys, refer to this Q/A. You can also use cardano-cli to derive non-extended verification keys from each non-extended signing key.
Note: If you've used this wallet on Daedalus frequently, you likely have UTXOs in a few payment and change addresses, so you would have to derive key-pairs for all addresses that UTXOs reside in. Alternatively, you can create a new wallet (new mnemonic) on Deadalus, transfer all the funds there, and then you'll have them all sitting at a single address, likely either at 0/0 or 0/1.
Comment if you have any questions or if you need any further clarification. Hope this helps!