The Koii CLI includes
setconfiguration commands to automatically set the
--urlargument for CLI commands. For example:
koii config set --url https://k2-testnet.koii.live
Next, set the koii configuration to use your validator keypair:
koii config set --keypair <YOUR_WALLET_PATH>
koii config set --keypair /Users/<YOUR_HOME>/.config/koii/id.json
You should see an output similar to this:
Config File: /Users/<YOUR_HOME>/.config/koii/cli/config.yml
RPC URL: http://localhost:8899
WebSocket URL: ws://localhost:8900/ (computed)
Keypair Path: /Users/<YOUR_HOME>/.config/koii/id.json
Airdrop yourself some KOII to get started:
koii airdrop 400
To view your current balance:
If you haven't created one before now, create an authorized-withdrawer keypair to be used as the ultimate authority over your validator. This keypair will be able to withdraw from your vote account and will have additional permission to change all other aspects of your vote account.
This is a very important keypair since anyone in possession of it has the ability to permanently take control of your vote account and make any changes they please. Therefore, it's crucial to store your authorized-withdrawer keypair in a secure location.
It doesn't have to be stored on your validator, and it shouldn't be stored anywhere where unauthorized people could access it. To create your authorized-withdrawer keypair:
koii-keygen new -o ~/authorized-withdrawer-keypair.json
Create a vote-account keypair and create the vote account on the network.
To create a vote-account keypair:
koii-keygen new -o ~/vote-account-keypair.json
To create a vote account:
koii create-vote-account <PATH_TO_VOTE_ACCOUNT_KEYPAIR> <PATH_TO_VALIDATOR_KEYPAIR> <PATH_TO_AUTHORIZED_WITHDRAWER_KEYPAIR>
koii create-vote-account ~/vote-account-keypair.json ~/validator-keypair.json ~/authorized-withdrawer-keypair.json
The command above will create your vote account on the blockchain with all the default options.
Remember to move your authorized withdrawer keypair into a very secure location after running the
Connect to the cluster by running:
--identity ~/validator-keypair.json \
--vote-account ~/vote-account-keypair.json \
--rpc-port 8899 \
--entrypoint k2-testnet.koii.live:8001 \