<p>You can use cardano-cli to convert an extended signing key to a Shelley-format key (which is what you need in order to sign a transaction).</p>
<pre><code>cardano-cli key convert-cardano-address-key --shelley-payment-key --signing-key-file address.xsk --out-file address.skey
</code></pre>
<p>I believe this is the missing piece of information you are after. The steps needed to get <em>address.xsk</em> are the same as those needed to derive the extended verification keys. The answer to <a href="https://cardano.stackexchange.com/questions/833/why-is-there-a-small-difference-between-addresses-derived-by-the-cardano-address">this question</a> covers that.</p>
<p>Later edit :
Here are all the steps for getting a signing key usable with cardano-cli from a seed phrase</p>
<pre><code>./cardano-address key from-recovery-phrase Shelley &lt; phrase.prv &gt; root.xsk

# Derive the address signing key
./cardano-address key child 1852H/1815H/0H/0/2 &lt; root.xsk &gt; address.xsk

# Convert the extended signing key to a Shelley-format key
cardano-cli key convert-cardano-address-key --shelley-payment-key --signing-key-file address.xsk --out-file address.skey

# Probably you can need non-extended keys, so if it is the case you can convert with:
cardano-cli address key-gen --verification-key-file extended-address.vkey --signing-key-file address.skey
</code></pre>
<p>In my case the address holding funds had this derivation path <code>1852H/1815H/0H/0/2</code>. In Yoroi you can see the derivation path for an address when you click the <code>✓ Verify address</code> button.
You can derive any path you need following the steps above.</p>

CC BY-SA 4.0
2021-06-02T10:39:26.437Z
Is the address.xsk actually the output file from `cardano-address key from-recovery-phrase Shelley < phrase.prv > root.xsk`? The only .xsk file I can see from the instructions in the README.md is the root.xsk from that command. Does that mean I can't use cardano-cli to control multiple addresses generated from the root.xsk?
Joshua Chia
CC BY-SA 4.0
2021-06-02T10:50:26.643Z
No, that is the root signing key. You said you managed to reach the same address as the ones you see in yoroi, so I assumed you derived both the account and the address keys (so a full derivation 1852H/1815H/0H/0/0). You convert an extended address signing key with the command above. I'll edit my answer with a full example once I reach my PC
ppquiz
CC BY-SA 4.0
2021-06-02T10:06:54.580Z
2023-04-18T12:11:38.553Z
2023-04-18T12:11:38.553Z
ppquiz
<p>You have to use some of the other tools in the cardano wallet suite. Get the cardano-wallet from <a href="https://github.com/input-output-hk/cardano-wallet" rel="nofollow noreferrer">GitHub</a>. <a href="https://gist.github.com/ilap/3fd57e39520c90f084d25b0ef2b96894" rel="nofollow noreferrer">Here</a> is an example for how to extract keys and make signing key files.</p>
<p>Basically you need to extract the keys from the seed phrase, and then convert them to CBOR hex, and then create the signing key file which is just a JSON format file.</p>

CC BY-SA 4.0
2021-05-28T18:01:23.170Z
2021-05-28T18:01:23.170Z
nalyd88
<p>As an alternative to cardano-address you can use <strong>cscli</strong>, another open-source CLI tool to <a href="https://github.com/CardanoSharp/cscli#derive-payment-key" rel="nofollow noreferrer">derive the cardano-cli compatible skey/vkey files</a>.
Example using a dummy recovery-phrase:</p>
<pre><code>cscli wallet key payment derive --recovery-phrase &quot;walnut decrease buyer wealth eager truth bomb notable twenty&quot; --account-index 0 --address-index 0 --verification-key-file pay_0_0.vkey --signing-key-file pay_0_0.skey
</code></pre>
<p>Disclaimer: I am the main developer for cscli so feel free to reach out to me on GitHub if you need help!</p>

CC BY-SA 4.0
2022-04-03T14:42:34.143Z
2022-04-03T14:42:34.143Z
keefie
<p>Cardano cli offers some functions for that</p>
<pre><code>$ cardano-address key from-recovery-phrase Shelley &lt; phrase.prv &gt; root.xsk
root_xsk1hqzfzrgskgnpwskxxrv5khs7ess82ecy8za9l5ef7e0afd2849p3zryje8chk39nxtva0sww5me3pzkej4rvd5cae3q3v8eu7556n6pdrp4fdu8nsglynpmcppxxvfdyzdz5gfq3fefjepxhvqspmuyvmvqg8983
</code></pre>
<p><a href="https://github.com/input-output-hk/cardano-addresses#command-line" rel="nofollow noreferrer">https://github.com/input-output-hk/cardano-addresses#command-line</a></p>

CC BY-SA 4.0
2021-05-28T20:55:15.287Z
2021-05-28T20:55:15.287Z
wutzebaer
<p>You can use Daedalus to restore your wallet on the machine and that should create a wallet file with the addresses you need.  Daedalus also contains cardano-cli as its built on cardano-node.</p>
<p>I did not try launching cardano-node / cardano-cli from a Daedalus install though, there may be additional wrinkles to solve.</p>

CC BY-SA 4.0
2021-05-28T06:04:12.673Z
2021-05-28T06:04:12.673Z
Scalextrix
<p>I'm trying to use <code>cardano-cli</code> to control the addresses controlled by my Yoroi wallet, so I thought the first thing to do is to import the keys and addresses. <s>I did this:</p>
<pre><code>$ # Type the seed phrase for the Yoroi wallet into a file phrase.txt.
$ cat phrase.txt | cardano-address key from-recovery-phrase Shelley &gt; root.prv
$ cat root.prv | cardano-address key child 1852H/1815H/0H/0/0 | cardano-address key public --with-chain-code  | cardano-address address payment --network-tag mainnet
</code></pre>
<p>The output is &quot;addr1v...&quot; but in the Yoroi the 0th address is &quot;addr1q...&quot;, so they are very different. What am I missing? My ultimate goal is to get the addresses and keys I need to build and sign transactions using <code>cardano-cli</code>, and I'm stuck at even getting the right addresses using <code>cardano-address</code>.
</s></p>
<p>Following the <a href="https://github.com/input-output-hk/cardano-addresses/blob/78d2c38d9287839b28784462ea0bffe8bce7c867/README.md" rel="nofollow noreferrer">instructions</a> from the <code>cardano-addresses</code> README.md, I was able to generate a &quot;delegated payment address&quot; that matches the 0th address I see in Yoroi. However, <code>cardano-cli transaction sign</code> requires a <code>--signing-key-file</code>, which is normally generated using <code>cardano-cli address key-gen</code>, and I don't know how to get a cardano-cli-style signing key file from the stuff I can get from <code>cardano-address</code>.</p>
<p>I believe <code>cardano-wallet</code> can be used to make payment transactions, but AFAICT only <code>cardano-cli</code> can be used to mint tokens; I don't see anything about minting tokens in the help for <code>cardano-wallet</code>.</p>

CC BY-SA 4.0
2021-05-28T05:57:53.397Z
Have you checked in Yoroi if the output address "addr1v" is one of your public addresses? Every wallet has many addresses.
eddex
CC BY-SA 4.0
2021-05-28T07:24:45.130Z
IDK how to give Yoroi an address to check whether it is mine, but I have generated a total of 4 addresses in Yoroi and they all start with addr1q and not addr1v. Additionally, I believe the last '0' in 852H/1815H/0H/0/0 is the address index. I suspect the 1q vs 1v has some special significance related to the nature of the address. I suspect that there is some knowledge about different types of addresses, what they are used for, what kinds of prefixes they have and how they relate to one another that I have yet to understand.
Joshua Chia
CC BY-SA 4.0
2021-05-28T08:30:57.150Z
addr1v[...] are payment addresses, addr1q[...] are delegated payment addresses: https://github.com/input-output-hk/cardano-addresses#command-line
eddex
CC BY-SA 4.0
2021-05-28T09:18:09.453Z
@eddex You raised a good point. What I was missing is the `cardano-address address delegation`, which requires the stake verification key to be generated first.
Joshua Chia
CC BY-SA 4.0
2021-05-28T10:43:35.747Z
Great that it worked! You could add an answer to this question with the full set of commands so that others can see how you solved it.
eddex
CC BY-SA 4.0
2021-05-28T10:55:21.083Z
I will once I figure out how to generate all the address-related files needed for using `cardano-cli` to build and sign a transaction. For example, `cardano-cli sign` requires a `--signing-key-file` and I need to figure out how to generate that.
Joshua Chia
<wallet><cardano-cli><cardano-address>
How to import Yoroi seed phrase to computer using cardano-address for use with cardano-cli?
# How to import Yoroi seed phrase to computer using cardano-address for use with cardano-cli?

(Asked by: username_0 on 2021-05-28)

I'm trying to use cardano-cli to control the addresses controlled by my Yoroi wallet, so I thought the first thing to do is to import the keys and addresses. I did this:
$ # Type the seed phrase for the Yoroi wallet into a file phrase.txt.
$ cat phrase.txt | cardano-address key from-recovery-phrase Shelley > root.prv
$ cat root.prv | cardano-address key child 1852H/1815H/0H/0/0 | cardano-address key public --with-chain-code  | cardano-address address payment --network-tag mainnet

The output is "addr1v..." but in the Yoroi the 0th address is "addr1q...", so they are very different. What am I missing? My ultimate goal is to get the addresses and keys I need to build and sign transactions using cardano-cli, and I'm stuck at even getting the right addresses using cardano-address.

Following the instructions from the cardano-addresses README.md, I was able to generate a "delegated payment address" that matches the 0th address I see in Yoroi. However, cardano-cli transaction sign requires a --signing-key-file, which is normally generated using cardano-cli address key-gen, and I don't know how to get a cardano-cli-style signing key file from the stuff I can get from cardano-address.
I believe cardano-wallet can be used to make payment transactions, but AFAICT only cardano-cli can be used to mint tokens; I don't see anything about minting tokens in the help for cardano-wallet.

**Tags:** wallet, cardano-cli, cardano-address
> **Comments:**
> **username_1**: Have you checked in Yoroi if the output address "addr1v" is one of your public addresses? Every wallet has many addresses.  
> **username_0**: IDK how to give Yoroi an address to check whether it is mine, but I have generated a total of 4 addresses in Yoroi and they all start with addr1q and not addr1v. Additionally, I believe the last '0' in 852H/1815H/0H/0/0 is the address index. I suspect the 1q vs 1v has some special significance related to the nature of the address. I suspect that there is some knowledge about different types of addresses, what they are used for, what kinds of prefixes they have and how they relate to one another that I have yet to understand.  
> **username_1**: addr1v[...] are payment addresses, addr1q[...] are delegated payment addresses: https://github.com/input-output-hk/cardano-addresses#command-line  
> **username_0**: @eddex You raised a good point. What I was missing is the `cardano-address address delegation`, which requires the stake verification key to be generated first.  
> **username_1**: Great that it worked! You could add an answer to this question with the full set of commands so that others can see how you solved it.  
> **username_0**: I will once I figure out how to generate all the address-related files needed for using `cardano-cli` to build and sign a transaction. For example, `cardano-cli sign` requires a `--signing-key-file` and I need to figure out how to generate that.  

---

## 5 answers

### Answer by username_2 on 2021-06-02. Score: 2

You can use cardano-cli to convert an extended signing key to a Shelley-format key (which is what you need in order to sign a transaction).
cardano-cli key convert-cardano-address-key --shelley-payment-key --signing-key-file address.xsk --out-file address.skey

I believe this is the missing piece of information you are after. The steps needed to get address.xsk are the same as those needed to derive the extended verification keys. The answer to this question covers that.
Later edit :
Here are all the steps for getting a signing key usable with cardano-cli from a seed phrase
./cardano-address key from-recovery-phrase Shelley < phrase.prv > root.xsk

# Derive the address signing key
./cardano-address key child 1852H/1815H/0H/0/2 < root.xsk > address.xsk

# Convert the extended signing key to a Shelley-format key
cardano-cli key convert-cardano-address-key --shelley-payment-key --signing-key-file address.xsk --out-file address.skey

# Probably you can need non-extended keys, so if it is the case you can convert with:
cardano-cli address key-gen --verification-key-file extended-address.vkey --signing-key-file address.skey

In my case the address holding funds had this derivation path 1852H/1815H/0H/0/2. In Yoroi you can see the derivation path for an address when you click the ✓ Verify address button.
You can derive any path you need following the steps above.

> **Comments:**
> **username_0**: Is the address.xsk actually the output file from `cardano-address key from-recovery-phrase Shelley < phrase.prv > root.xsk`? The only .xsk file I can see from the instructions in the README.md is the root.xsk from that command. Does that mean I can't use cardano-cli to control multiple addresses generated from the root.xsk?  
> **username_2**: No, that is the root signing key. You said you managed to reach the same address as the ones you see in yoroi, so I assumed you derived both the account and the address keys (so a full derivation 1852H/1815H/0H/0/0). You convert an extended address signing key with the command above. I'll edit my answer with a full example once I reach my PC  

---

### Answer by username_3 on 2021-05-28. Score: 0

You have to use some of the other tools in the cardano wallet suite. Get the cardano-wallet from [GitHub](https://github.com/input-output-hk/cardano-wallet). [Here](https://gist.github.com/ilap/3fd57e39520c90f084d25b0ef2b96894) is an example for how to extract keys and make signing key files.

Basically you need to extract the keys from the seed phrase, and then convert them to CBOR hex, and then create the signing key file which is just a JSON format file.


---

### Answer by username_4 on 2022-04-03. Score: 0

As an alternative to cardano-address you can use cscli, another open-source CLI tool to derive the cardano-cli compatible skey/vkey files.
Example using a dummy recovery-phrase:
cscli wallet key payment derive --recovery-phrase "walnut decrease buyer wealth eager truth bomb notable twenty" --account-index 0 --address-index 0 --verification-key-file pay_0_0.vkey --signing-key-file pay_0_0.skey

Disclaimer: I am the main developer for cscli so feel free to reach out to me on GitHub if you need help!


---

### Answer by username_5 on 2021-05-28. Score: 0

Cardano cli offers some functions for that
$ cardano-address key from-recovery-phrase Shelley < phrase.prv > root.xsk
root_xsk1hqzfzrgskgnpwskxxrv5khs7ess82ecy8za9l5ef7e0afd2849p3zryje8chk39nxtva0sww5me3pzkej4rvd5cae3q3v8eu7556n6pdrp4fdu8nsglynpmcppxxvfdyzdz5gfq3fefjepxhvqspmuyvmvqg8983

https://github.com/input-output-hk/cardano-addresses#command-line


---

### Answer by username_6 on 2021-05-28. Score: 0

You can use Daedalus to restore your wallet on the machine and that should create a wallet file with the addresses you need. Daedalus also contains cardano-cli as its built on cardano-node.

I did not try launching cardano-node / cardano-cli from a Daedalus install though, there may be additional wrinkles to solve.


---

