Setting Up Payment and Stake Keys

First, obtain the protocol-parameters.

Wait for the block-producing node to start syncing before continuing if you get this error message.

cardano-cli: Network.Socket.connect: : does not exist (No such file or directory)

cardano-cli query protocol-parameters \
    --mainnet \
    --out-file params.json

Payment keys are used to send and receive payments and stake keys are used to manage stake delegations.

There are two ways to create your payment and stake key pair. Pick the one that best suits your needs.

🔥 Critical Operational Security Advice: payment and stake keys must be generated and used to build transactions in an cold environment. In other words, your air-gapped offline machine. Copy cardano-cli binary over to your offline machine and run the CLI method or mnemonic method. The only steps performed online in a hot environment are those steps that require live data. Namely the follow type of steps:

  • querying the current slot tip

  • querying the balance of an address

  • submitting a transaction

Create a new payment key pair: payment.skey & payment.vkey

### On air-gapped offline machine,
cardano-cli address key-gen \
    --verification-key-file payment.vkey \
    --signing-key-file payment.skey

Create a new stake address key pair: stake.skey & stake.vkey

### On air-gapped offline machine,
cardano-cli stake-address key-gen \
    --verification-key-file stake.vkey \
    --signing-key-file stake.skey

Create your stake address from the stake address verification key and store it in stake.addr

### On air-gapped offline machine,
cardano-cli stake-address build \
    --stake-verification-key-file stake.vkey \
    --out-file stake.addr \

Build a payment address for the payment key payment.vkey which will delegate to the stake address, stake.vkey

### On air-gapped offline machine,
cardano-cli address build \
    --payment-verification-key-file payment.vkey \
    --stake-verification-key-file stake.vkey \
    --out-file payment.addr \

Next step is to fund your payment address.

Copy payment.addr to your hot environment.

Payment address can be funded from your Daedalus / Yoroi wallet.

Run the following to find your payment address.

cat payment.addr

After funding your account, check your payment address balance.

Before continuing, your nodes must be fully synchronized to the blockchain. Otherwise, you won't see your funds.

cardano-cli query utxo \
    --address $(cat payment.addr) \

You should see output similar to this. This is your unspent transaction output (UXTO).

                           TxHash                                 TxIx        Lovelace
100322a39d02c2ead....                                              0        1000000000

🔥 Critical Backup Advice: Make redundant copies of your payment and staking keys on offline USB keys or other offline data backups. Have a recovery plan in case of corrupted or lost keys.

Last updated