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.

  • 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,
###
cd $NODE_HOME
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 \
    --mainnet

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 \
    --mainnet

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) \
    --mainnet

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

                           TxHash                                 TxIx        Lovelace
----------------------------------------------------------------------------------------
100322a39d02c2ead....                                              0        1000000000

Last updated