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 \
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 \
Boom! You should be done!
We went from our child key.xsk, which looks like
to our key.skey, which looks like
A great reference produced by the Cardano Foundation
The associated examples