Skip to main content

Stake address registration certificate

To take part on the SanchoNet consensus protocol, we need to submit a stake address registration certificate to the chain. This allows to delegate stake to a SanchoNet stake pool and votes to a SanchoNet delegate representative (DRep).

Pre-requisites

  • Stake key pair
  • Payment key pair
  • Address with funds
  • A SanchoNet node

Generate the registration certificate

  1. Register the stake address you previously created by generating a registration certificate:
cardano-cli conway stake-address registration-certificate \
--stake-verification-key-file stake.vkey \
--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq .currentPParams.stakeAddressDeposit) \
--out-file registration.cert

Submit the certificate to the chain

  1. Build, sign and submit the transaction.
  • Build the transaction:
cardano-cli conway transaction build \
--testnet-magic 4 \
--witness-override 2 \
--tx-in $(cardano-cli query utxo --address $(cat payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]') \
--change-address $(cat payment.addr) \
--certificate-file registration.cert \
--out-file tx.raw
  • Sign the transaction:
cardano-cli conway transaction sign \
--tx-body-file tx.raw \
--signing-key-file payment.skey \
--signing-key-file stake.skey \
--testnet-magic 4 \
--out-file tx.signed
  • Submit the transaction:
cardano-cli conway transaction submit \
--testnet-magic 4 \
--tx-file tx.signed