The task node CLI is a helpful tool used by node operators for 4 different reasons:
Create a task staking wallet
Create a distribution wallet
Stake tokens on a task
Show all tasks
The staking CLI can be started by running the command yarn stake in the root directory of the task node. The steps are:
Clone the if you havenβt already done it.
Run yarn build
Run yarn stake in your terminal
Enter the path to your wallet
Next you will be prompted with four options
? Select operation βΊ - Use arrow-keys. Return to submit.
β― Create a task staking wallet
Create a task distribution wallet
Stake tokens on a task
Show all tasks
Staking Wallet
To create a staking wallet, select the "Create a task staking wallet" option and add the amount of KOII tokens you want to fund the wallet with.
β Enter the path to your wallet β¦ /Users/<YOUR_HOME>/.config/koii/id.json
/Users/giftea/.config/koii/id.json
β Select operation βΊ Create a task staking wallet
create-task-staking-wallet
Connection to cluster established: https://k2-testnet.koii.live
Using account 2kG7HBGGVHZEhdbHQzvQGQUjLNGGiQvxshLu47UvnpBs containing 379.99414788 KOII to pay for fees
β Enter the amount to add to staking wallet β¦ 20
Success
β¨ Done in 586.68s.
Distribution Wallet
To create a distribution wallet, select the "Create a task distribution wallet" option and add the amount of KOII tokens you want to fund the wallet with.
β Enter the path to your wallet β¦ /Users/<YOUR_HOME>/.config/koii/id.json
/Users/giftea/.config/koii/id.json
β Select operation βΊ Create a task distribution wallet
create-task-distribution-wallet
Connection to cluster established: https://k2-testnet.koii.live
Using account 2kG7HBGGVHZEhdbHQzvQGQUjLNGGiQvxshLu47UvnpBs containing 359.992541 KOII to pay for fees
β Enter the amount to add to distribution wallet β¦ 30
Success
β¨ Done in 664.06s.
Stake Tokens
To stake tokens on a task, select the "Stake tokens on a task", add the task ID of the task you want to stake on and enter the amount you want to stake.
β Enter the path to your wallet β¦ /Users/<YOUR_HOME>/.config/koii/id.json
/Users/giftea/.config/koii/id.json
β Select operation βΊ Stake tokens on a task
stake-tokens
Connection to cluster established: https://k2-testnet.koii.live
Using account 2kG7HBGGVHZEhdbHQzvQGQUjLNGGiQvxshLu47UvnpBs containing 329.992531 KOII to pay for fees
β Enter the task id β¦ GUU6Fe765opB2SUMpNo7utMFvyjeY6EPWBjYeHzAbXb8
β Enter the stake amount for task β¦ 10
Success
β¨ Done in 1039.91s.
Show All Tasks
To view all tasks, select the "Show all tasks" option. You should see an array of tasks with their name and ID.
β Enter the path to your wallet β¦ /Users/<YOUR_HOME>/.config/koii/id.json
/Users/giftea/.config/koii/id.json
β Select operation βΊ Show all tasks
show-all-tasks
Connection to cluster established: https://k2-testnet.koii.live
Using account 2kG7HBGGVHZEhdbHQzvQGQUjLNGGiQvxshLu47UvnpBs containing 329.992531 KOII to pay for fees
[
{
name: 'DID-task-V2',
taskId: '5RZrTKcumfnJ6z5fVuWSLuZKZCsjQARThQc5DjpF56gc'
},
{
name: 'DDR',
taskId: '5TK491kDMwSBFCKHxRQGBzV79uNRyYBcDiT5vNgL125g'
},
{
name: 'dryRun',
taskId: '7smY8E7f5BT5Gn5CKPkbSuro45ghAJtAkrV5WkUXcJ6G'
},
{
name: 'RedesignedTask',
taskId: 'BDXNWEjqfVFfWHWJfgJYpFVkWsXra8iKizn3v4Q8TdNS'
},
{
name: 'Test1',
taskId: 'GUU6Fe765opB2SUMpNo7utMFvyjeY6EPWBjYeHzAbXb8'
}
]