user1679: I use cardano-address cli export extended private key, but i want to use it with cardano-cli command, how to convert it?

user28: Yes, if you have created your cardano-wallet wallet using a mnemonic, you can restore a private key from it.
An excellent tool for this is cardano-addresses.

Generate your root private key.

cardano-address key from-recovery-phrase Shelley < phrase.prv > root.xsk
root_xsk1hqzfzrgskgnpwskxxrv5khs7ess82ecy8za9l5ef7e0afd2849p3zryje8chk39nxtva0sww5me3pzkej4rvd5cae3q3v8eu7556n6pdrp4fdu8nsglynpmcppxxvfdyzdz5gfq3fefjepxhvqspmuyvmvqg8983


Generate your payment verification key for the first address. Notice here, the /0/0 is the address index, increase the last digit to generate your other addresses.

cardano-address key child 1852H/1815H/0H/0/0 < root.xsk | cardano-address key public --with-chain-code > addr.xvk
addr_xvk1grvg8qzmkmw2n0dm4pd0h3j4dv6yglyammyp733eyj629dc3z28v6wk22nfmru6xz0vl2s3y5xndyd57fu70hrt84c6zkvlwx6fdl7ct9j7yc

You should be able to use your payment key to sign a transaction using cardano-cli.

Create your payment address to double check it is correct.

cardano-address address payment --network-tag testnet < addr.xvk > payment.addr
addr_test1vp2fg770ddmqxxduasjsas39l5wwvwa04nj8ud95fde7f7guscp6v


1679: <p>I use cardano-address cli export extended private key, but i want to use it with cardano-cli command, how to convert it?</p>
 28: <p>Yes, if you have created your <code>cardano-wallet</code> wallet using a mnemonic, you can restore a private key from it.</p>
<p>An excellent tool for this is <a href="https://github.com/input-output-hk/cardano-addresses" rel="nofollow noreferrer"><code>cardano-addresses</code></a>.</p>
<ol>
<li>Generate your root private key.</li>
</ol>
<pre><code>cardano-address key from-recovery-phrase Shelley &lt; phrase.prv &gt; root.xsk
root_xsk1hqzfzrgskgnpwskxxrv5khs7ess82ecy8za9l5ef7e0afd2849p3zryje8chk39nxtva0sww5me3pzkej4rvd5cae3q3v8eu7556n6pdrp4fdu8nsglynpmcppxxvfdyzdz5gfq3fefjepxhvqspmuyvmvqg8983
</code></pre>
<ol start="2">
<li>Generate your payment verification key for the first address. Notice here, the <code>/0/0</code> is the address index, increase the last digit to generate your other addresses.</li>
</ol>
<pre><code>cardano-address key child 1852H/1815H/0H/0/0 &lt; root.xsk | cardano-address key public --with-chain-code &gt; addr.xvk
addr_xvk1grvg8qzmkmw2n0dm4pd0h3j4dv6yglyammyp733eyj629dc3z28v6wk22nfmru6xz0vl2s3y5xndyd57fu70hrt84c6zkvlwx6fdl7ct9j7yc
</code></pre>
<p>You should be able to use your payment key to sign a transaction using <code>cardano-cli</code>.</p>
<ol start="3">
<li>Create your payment address to double check it is correct.</li>
</ol>
<pre><code>cardano-address address payment --network-tag testnet &lt; addr.xvk &gt; payment.addr
addr_test1vp2fg770ddmqxxduasjsas39l5wwvwa04nj8ud95fde7f7guscp6v
</code></pre>
