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


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.

  1. Generate your root private key.
cardano-address key from-recovery-phrase Shelley < phrase.prv > root.xsk
  1. 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

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

  1. Create your payment address to double check it is correct.
cardano-address address payment --network-tag testnet < addr.xvk > payment.addr
  • Sign payment key (xxx.skey) generated by cardano-cli is a json file, in your case addr.xvk file is not a json file, is there any command line tool i can use to convert addr.xvk to a standard json file to meet the cardano-cli 's demand ?
    – mackie
    Jun 3 at 3:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.