Creating Wallet Payment and Stake Keys and Addresses
In order to interact with the Cardano blockchain (in this case, the Preprod testnet blockchain) we will need to create the operational components of a wallet. In our case, we are going to create payment keys, staking keys, a payment address, and a staking address. We will use this wallet to request funds from the faucet. These funds are worthless and will just be used for instructional purposes. We will then practice crafting transactions and sending test funds to other classmates. First let's create a couple directories
cd
mkdir preprodnet/wallets preprodnet/wallets/wallet1
cd ~/preprodnet/wallets/wallet1Then let's create payment keys.
cardano-cli address key-gen \
--verification-key-file payment.vkey \
--signing-key-file payment.skeyNext let's make staking keys.
cardano-cli stake-address key-gen \
--verification-key-file stake.vkey \
--signing-key-file stake.skeyWe will then build a payment address using both our stake.vkey and payment.vkey.
cardano-cli address build \
--payment-verification-key-file payment.vkey \
--stake-verification-key-file stake.vkey \
--out-file payment.addr \
--testnet-magic 1Finally we will create a staking address using our stake.vkey.
We are now going to request some Test ADA from the Sanchonet Faucet, found here:
https://docs.cardano.org/cardano-testnet/tools/faucet
First, you are going to need to copy your address to your clipboard.
Copy the output of that command, paste in the faucet address field and submit.

Once the next block is created on the network (usually within a few seconds), you will be able to query your address.

Next Step On Your Own: Create a second wallet (payment+staking keys and addresses) in a directory called "wallet2". However, don't fund this one with the faucet.
Last updated