Skip to content

Instantly share code, notes, and snippets.

@Angulo66
Last active September 9, 2022 20:25
Show Gist options
  • Save Angulo66/e572192406b804c865abbb42a6f9c083 to your computer and use it in GitHub Desktop.
Save Angulo66/e572192406b804c865abbb42a6f9c083 to your computer and use it in GitHub Desktop.
[2. Creating keys and addresses] #cardano #stakepooloperations
#To generate a payment key pair
cardano-cli address key-gen \
--verification-key-file payment.vkey \
--signing-key-file payment.skey
# To generate a stake key pair
cardano-cli stake-address key-gen \
--verification-key-file stake.vkey \
--signing-key-file stake.skey
# When including both verification keys payment.vkey and stake.vkey to build the address,
# the resulting payment address is associated with this stake keys and address.
cardano-cli address build \
--payment-verification-key-file payment.vkey \
--stake-verification-key-file stake.vkey \
--out-file payment.addr \
--mainnet
# --testnet-magic 1097911063
# To generate a stake address
cardano-cli stake-address build \
--stake-verification-key-file stake.vkey \
--out-file stake.addr \
--mainnet
# --testnet-magic 1097911063
# This address CAN’T receive payments but will receive the rewards from participating in the protocol.
# To query the balance of an address we need a running node and the environment variable
# CARDANO_NODE_SOCKET_PATH set to the path to the node.socket
cardano-cli query utxo \
--address $(cat payment.addr) \
--mainnet
# --testnet-magic 1097911063
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment