<p>How did you venerate your <code>addr.xvk</code>? What derivation path did you use?</p>
<p>You need to use the private payment key to that specific derivation path.</p>

CC BY-SA 4.0
2021-09-08T09:58:12.617Z
https://github.com/input-output-hk/cardano-addresses . I created addr.xvk from root.xsk as the README of this article
Hoang Hoang
CC BY-SA 4.0
2021-08-28T18:42:40.523Z
2021-08-28T18:42:40.523Z
Marek Mahut - StakeNuts
<p>Great question! Fundamentally, you want to use cardano-wallet to replace the following script in cardano-cli.</p>
<pre><code>cardano-cli address key-gen \
 --verification-key-file key.vkey \
 --signing-key-file pkey.skey
</code></pre>
<p>In this tutorial, I will show you how convert the keys from the wallet format into the cli format.</p>
<p>First, create your recovery phrase and then a private key from that phrase. You have probably already completed this step, but here is an example:</p>
<pre><code>cardano-address recovery-phrase generate --size 15 &gt; phrase.prv

cardano-address key from-recovery-phrase Shelley &lt; phrase.prv &gt; root.xsk
</code></pre>
<p>Just for safety, let's go ahead and create a child key from that root key. It is not necessary, but we should get into in the habits of good security practices.</p>
<pre><code>cat root.xsk | cardano-address key child 1852H/1815H/0H/0/0 &gt; key.xsk
</code></pre>
<p>We have created our root.xsk and then from it our key.xsk. We want to use key.xsk to sign transactions. However, if you try to put it directly into cardano-cli, you will get an error. Even if you were to put it into a JSON format, you still would not be able to use it. We have to convert it into a different format vis a vis the following:</p>
<pre><code>cardano-cli key convert-cardano-address-key --shelley-payment-key --signing-key-file key.xsk --out-file key.skey
</code></pre>
<p>Now we have converted our key.xsk into a key.skey. Now we have to create a verification key:</p>
<pre><code>cardano-cli key verification-key --signing-key-file key.skey --verification-key-file key.vkey
</code></pre>
<p>Excellent! Now we have a key.skey and a key.vkey. You know what to do! Go ahead and create an address...</p>
<pre><code>cardano-cli address build --payment-verification-key-file key.vkey --out-file key.addr --testnet-magic 1097911063
</code></pre>
<p>...and then build the transaction.</p>
<pre><code>cardano-cli transaction sign \
--tx-body-file body.raw \
--testnet-magic 1097911063 \
--signing-key-file key.skey \
--out-file signFile.signed 
</code></pre>
<p>Boom! You should be done!</p>
<p>We went from our child key.xsk, which looks like</p>
<pre><code>{
    &quot;chain_code&quot;: &quot;4bfecd01af45a1abde446ec69522867a309f927f61a26d286d2475369e888e46&quot;,
    &quot;key_type&quot;: &quot;private&quot;,
    &quot;extended_key&quot;: &quot;c024ea34b52056996acb2f8f7d74b78b610ed773fb4ff6b933e460714dd8455edf6ea0b09c190126d364e69df714aef5824c7630f7b70e42050149f98b704448&quot;
}
</code></pre>
<p>to our key.skey, which looks like</p>
<pre><code>{
    &quot;type&quot;: &quot;PaymentExtendedSigningKeyShelley_ed25519_bip32&quot;,
    &quot;description&quot;: &quot;&quot;,
    &quot;cborHex&quot;: &quot;5880c024ea34b52056996acb2f8f7d74b78b610ed773fb4ff6b933e460714dd8455edf6ea0b09c190126d364e69df714aef5824c7630f7b70e42050149f98b7044480782a02ee41c9d7455faf2df6f36edb0c9d0c2c31eaf9e2f10f255ead21f53074bfecd01af45a1abde446ec69522867a309f927f61a26d286d2475369e888e46&quot;
}
</code></pre>
<h1>Sources</h1>
<p><a href="https://cardano-foundation.gitbook.io/stake-pool-course/stake-pool-guide/stake-pool-operations/building-and-signing-tx" rel="nofollow noreferrer">A great reference produced by the Cardano Foundation</a></p>
<p><a href="https://cardano-foundation.gitbook.io/stake-pool-course/stake-pool-guide/stake-pool-operations/transactions" rel="nofollow noreferrer">The associated examples</a></p>

CC BY-SA 4.0
2021-09-08T09:59:17.277Z
Sorry for the late response. Thank you. Let me try to do it. I will give back the result asap
Hoang Hoang
CC BY-SA 4.0
2021-08-28T19:07:27.207Z
2021-08-28T19:07:27.207Z
Noah Jones
<p>I'm using Cardano-addresses <a href="https://github.com/input-output-hk/cardano-addresses" rel="nofollow noreferrer">https://github.com/input-output-hk/cardano-addresses</a>. I have a problem when try to make a transaction by using cardano-node using address generated by cardano-addresses.
So what I did is :</p>
<ol>
<li>generate a root private key (<strong>root.xsk)</strong> from recovery phrase.</li>
<li>generate a payment verification key (addr.xvk)</li>
<li>generate a payment address from a payment key (payment.addr)</li>
</ol>
<hr />
<p>And the when I tried to make a transaction using that (payment.addr),
I don't know what signing key should I use to sign this transaction:</p>
<pre><code>cardano-cli transaction sign         
--tx-body-file body.raw         
--testnet-magic 1097911063         
--signing-key-file  what_key_should_I_use          
--out-file signFile.signed 
</code></pre>
<p>Please help me</p>

<cardano-address>
Create transaction by cardano-node using payment address generated by cardano-addresses
# Create transaction by cardano-node using payment address generated by cardano-addresses

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

I'm using Cardano-addresses https://github.com/input-output-hk/cardano-addresses. I have a problem when try to make a transaction by using cardano-node using address generated by cardano-addresses.
So what I did is :

generate a root private key (root.xsk) from recovery phrase.
generate a payment verification key (addr.xvk)
generate a payment address from a payment key (payment.addr)


And the when I tried to make a transaction using that (payment.addr),
I don't know what signing key should I use to sign this transaction:
cardano-cli transaction sign         
--tx-body-file body.raw         
--testnet-magic 1097911063         
--signing-key-file  what_key_should_I_use          
--out-file signFile.signed 

Please help me

**Tags:** cardano-address

---

## 2 answers

### Answer by username_2 on 2021-08-28. Score: 3

Great question! Fundamentally, you want to use cardano-wallet to replace the following script in cardano-cli.
cardano-cli address key-gen \
 --verification-key-file key.vkey \
 --signing-key-file pkey.skey

In this tutorial, I will show you how convert the keys from the wallet format into the cli format.
First, create your recovery phrase and then a private key from that phrase. You have probably already completed this step, but here is an example:
cardano-address recovery-phrase generate --size 15 > phrase.prv

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

Just for safety, let's go ahead and create a child key from that root key. It is not necessary, but we should get into in the habits of good security practices.
cat root.xsk | cardano-address key child 1852H/1815H/0H/0/0 > key.xsk

We have created our root.xsk and then from it our key.xsk. We want to use key.xsk to sign transactions. However, if you try to put it directly into cardano-cli, you will get an error. Even if you were to put it into a JSON format, you still would not be able to use it. We have to convert it into a different format vis a vis the following:
cardano-cli key convert-cardano-address-key --shelley-payment-key --signing-key-file key.xsk --out-file key.skey

Now we have converted our key.xsk into a key.skey. Now we have to create a verification key:
cardano-cli key verification-key --signing-key-file key.skey --verification-key-file key.vkey

Excellent! Now we have a key.skey and a key.vkey. You know what to do! Go ahead and create an address...
cardano-cli address build --payment-verification-key-file key.vkey --out-file key.addr --testnet-magic 1097911063

...and then build the transaction.
cardano-cli transaction sign \
--tx-body-file body.raw \
--testnet-magic 1097911063 \
--signing-key-file key.skey \
--out-file signFile.signed 

Boom! You should be done!
We went from our child key.xsk, which looks like
{
    "chain_code": "4bfecd01af45a1abde446ec69522867a309f927f61a26d286d2475369e888e46",
    "key_type": "private",
    "extended_key": "c024ea34b52056996acb2f8f7d74b78b610ed773fb4ff6b933e460714dd8455edf6ea0b09c190126d364e69df714aef5824c7630f7b70e42050149f98b704448"
}

to our key.skey, which looks like
{
    "type": "PaymentExtendedSigningKeyShelley_ed25519_bip32",
    "description": "",
    "cborHex": "5880c024ea34b52056996acb2f8f7d74b78b610ed773fb4ff6b933e460714dd8455edf6ea0b09c190126d364e69df714aef5824c7630f7b70e42050149f98b7044480782a02ee41c9d7455faf2df6f36edb0c9d0c2c31eaf9e2f10f255ead21f53074bfecd01af45a1abde446ec69522867a309f927f61a26d286d2475369e888e46"
}

Sources
A great reference produced by the Cardano Foundation
The associated examples

> **Comments:**
> **username_0**: Sorry for the late response. Thank you. Let me try to do it. I will give back the result asap  

---

### Answer by username_1 on 2021-08-28. Score: 0

How did you venerate your `addr.xvk`? What derivation path did you use?

You need to use the private payment key to that specific derivation path.

> **Comments:**
> **username_0**: https://github.com/input-output-hk/cardano-addresses . I created addr.xvk from root.xsk as the README of this article  

---

