Setting Up Payment and Stake Keys
First, obtain the protocol-parameters.
cardano-cli query protocol-parameters \
--mainnet \
--out-file params.jsonThere 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,
###
cd $NODE_HOME
cardano-cli address key-gen \
--verification-key-file payment.vkey \
--signing-key-file payment.skeyCreate 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.skeyCreate 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 \
--mainnetBuild a payment address for the payment key payment.vkey which will delegate to the stake address, stake.vkey
Benefits: Track and control pool rewards from any wallet (Daedalus, Yoroi or any other wallet) that support stakings.
Create a 15-word or 24-word length shelley compatible mnemonic with Daedalus or Yoroi on a offline machine preferred.
Using your online block producer node, download cardano-wallet
Transfer the cardano-wallet to your air-gapped offline machine via USB key or other removable media.
Extract the wallet files and cleanup.
CreateextractPoolStakingKeys.sh script.
Add permissions and export PATH to use the binaries.
Extract your keys. Update the command with your mnemonic phrase.
Important: The base.addr and the base.addr_candidate must be the same. Review the screen output.
Your new staking keys are in the folder extractedPoolKeys/
Now move payment/stake key pair over to your $NODE_HOME for use with your stake pool.
Clear the bash history in order to protect your mnemonic phrase and remove the cardano-wallet files.
Finally close all your terminal windows and open new ones with zero history.
Awesome. Now you can track your pool rewards in your wallet.
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.
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.
You should see output similar to this. This is your unspent transaction output (UXTO).
🔥 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.