user140: I have a wallet created with Daedalus and have the 24-word mnemonic available. I would like to use the same wallet with cardano-cli in order to build and submit more complicated transactions directly through the cardano-node. I need to get my hands on the signing (private) key and verification (public) key.
I found the old, now archived cardano-cli repo which actually describes the procedure. However, the wallet subcommand is no longer available in the latest cardano-cli.
https://github.com/input-output-hk/cardano-cli/blob/master/USAGE.md#recovering-a-wallet

user4302: 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!

140: <p>I have a wallet created with Daedalus and have the 24-word mnemonic available. I would like to use the same wallet with <code>cardano-cli</code> in order to build and submit more complicated transactions directly through the <code>cardano-node</code>. I need to get my hands on the signing (private) key and verification (public) key.</p>
<p>I found the old, now archived cardano-cli repo which actually describes the procedure. However, the <code>wallet</code> subcommand is no longer available in the latest <code>cardano-cli</code>.</p>
<p><a href="https://github.com/input-output-hk/cardano-cli/blob/master/USAGE.md#recovering-a-wallet" rel="nofollow noreferrer">https://github.com/input-output-hk/cardano-cli/blob/master/USAGE.md#recovering-a-wallet</a></p>
 4302: <p>cardano-cli does not support mnemonic derivation natively, so you'd have to use cardano-wallet software:</p>
<ol>
<li>Install <a href="https://github.com/input-output-hk/cardano-wallet" rel="noreferrer">cardnao-wallet</a> or <a href="https://github.com/input-output-hk/cardano-wallet" rel="noreferrer">cardano-addresses</a> and put the executables in your <code>$PATH</code>. I will be using cardano-wallet for this demo, but cardano-address would work exactly the same.</li>
<li>Run the following:<br />
<code>&lt;YOUR_24_WORD_MNEMONMIC&gt; | cardano-wallet key from-recovery-phrase Shelley &gt; root.xprv</code>
This will create an extended root private key from the mnemonic under the name <code>root.xprv</code></li>
<li>Run the following:<br />
<code>cat root.xprv | cardano-wallet key child 1852H/1815H/0H \</code><br />
<code>| tee acct.xprv | cardano-wallet key public --with-chain-code &gt; acct.xpub</code><br />
This will create two files: <code>acct.xprv</code> (your extended account private key - will be used to further derive your payment/staking private/public keys) and <code>acct.xpub</code> (your extended account public key - use this to verify that it is the same as the &quot;wallet public key&quot; in Daedalus in the next step)</li>
<li>Fire up Daedalus and go to More &gt; Settings &gt; Wallet Public Key. View your public key and ensure that it is the same as the <code>acct.xpub</code> you derived in the previous step:</li>
</ol>
<p><a href="https://i.stack.imgur.com/Aveix.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Aveix.png" alt="enter image description here" /></a></p>
<ol start="5">
<li>If the keys match, you may now use the <code>acct.xprv</code> to further derive the address-specific payment/stake keypairs.</li>
<li>Run the following:<br />
<code>cat acct.xprv | cardano-wallet key child &lt;DERIVATION_PATH&gt;</code>, where the DERIVATION_PATH is the following:</li>
</ol>
<ul>
<li><code>0/n</code> for payment keypairs</li>
<li><code>1/n</code> for change-address payment keypairs</li>
<li><code>2/0</code> for the account-level staking keypair</li>
</ul>
<p>Running the above command will output the extended signing key for each address index (n). To convert these keys into <code>cardano-cli</code> compatible non-extended signing keys, refer to <a href="https://cardano.stackexchange.com/questions/7424/how-to-derive-non-extended-skey-from-mnemonic-phrase/7428#7428">this Q/A</a>. You can also use cardano-cli to derive non-extended verification keys from each non-extended signing key.</p>
<p>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.</p>
<p>Comment if you have any questions or if you need any further clarification. Hope this helps!</p>
