Generate stake keys and address
WARNING
For ease of use, and for this course only, we will keep our Cardano Testnet key files in the server. But this is NOT SECURE.
In a real life scenario (MAINNET), you need to have your keys under cold storage.

Stake key pair

Now let us create our stake key pair :
1
cardano-cli stake-address key-gen \
2
--verification-key-file stake.vkey \
3
--signing-key-file stake.skey
Copied!

Stake address

Finally, we can create our stake address. This address CAN'T receive payments but will receive the rewards from participating in the protocol. We will save this address in the file stake.addr
1
cardano-cli stake-address build \
2
--stake-verification-key-file stake.vkey \
3
--out-file stake.addr \
4
--testnet-magic 1097911063
Copied!
This created the file stake.addr, let's check its content:
1
cat stake.addr
2
> stake_test1ur975g2x22jllzjxnekvqj5d0thdut0aydz8ydwy4pvtg3gy0s7xn
Copied!

Regenerate payment address

Now that we have a stake address, it is time to regenerate a payment address. This time we use both the stake verification key and payment verification key to build the address. With this, both addresses will be linked together and associated with one another.
1
cardano-cli address build \
2
--payment-verification-key-file payment.vkey \
3
--stake-verification-key-file stake.vkey \
4
--out-file paymentwithstake.addr \
5
--testnet-magic 1097911063
Copied!
QUESTIONS AND FEEDBACK
If you have any questions and suggestions while taking the lessons please feel free to ask in the forum and we will respond as soon as possible.
Last modified 10mo ago