October 16, 2019, We recommend that you wait for installers which we are developing before attempting to install and use jormungandr on Windows. These instructions will likely not work for you. If you are still keen to run jormungandr on windows you can try using git bash which allows you to enter Linux commands found in the Linux articles on this site but we do not support the use of Git Bash here.
- the local node is started and synced to the blockchain/testnet
- you already have a Stake Pool ID to which you want to delegate the stake of your account
- you already have an account address with enough funds to pay for the transaction fee (> 12000 Lovelace)
- download/copy the
delegate-account.shscript in the same location as the node-config.yaml file
- check the existing stake pools and select one to which to delegate your stake
- delegate the stake to the selected Stake Pool ID
In order to delegate the stake of an account, you need to create and sign a delegation certificate and then to submit the certificate through a transaction into the blockchain. In order for the results to be available, 1 new block should be created.
The script takes care of all the above details.
How to delegate an account's stake using a script (Windows)
Windows users should use PowerShell and not CMD for executing these commands.
1. Download the
1.1 Open the
scripts section from
jormungandr-qa github repository -> https://github.com/input-output-hk/jormungandr-qa/tree/master/scripts
1.2 Locate the
delegate-account.sh script on the left menu and
right click on it; Select
Save link as option from the right-click menu (as below);
1.3 Save the script in the same location where you saved the node configuration (node-config.yaml) file
GitBash in the same location where you have the script and the node-config.yaml file
- open the folder where you saved the files, right click on the screen (on an empty space) and select
GitBash Here--> Gitbash will open;
Execute the commands from the next steps in
GitBash (from the location where the script is saved).
2.2 Check the parameters required by the script
$ bash delegate-account.sh --help usage: delegate-account.sh <STAKE_POOL_ID> <REST-LISTEN-PORT> <ACCOUNT-SK> <STAKE_POOL_ID> The ID of the Stake Pool you want to delegate to <REST-PORT> The REST Listen Port set in node-config.yaml file (EX: 3101) <ACCOUNT-SK> The Secret key of the Account address
2.3 Check the available stake pools and select one of them
Note: In the below commands, for the
--host parameter, make sure to use the same value you used in node configuration (node-config.yaml) for the rest/listen parameter.
$ ./jcli rest v0 stake get --host "http://127.0.0.1:3101/api" --- epoch: 221 stake: dangling: 0 pools: - - 969963a8b6cab96be257a37f2f27be6cc41c9561253b4da7c47704036024169a - 4774999812150 - - e680a68e3e822bef51943dab34468e1d9e459b6a136cce505d3d0715e744028c - 499999955800 - - da0ed0ed3d82b70598cd277e78975201c3d194d91eed9ed197e2ed6465758477 - 519999952499 - - 53a1d75955eff9891f72d6ade78b45a9c6ca8e0f7498ef29e8b4fdcb5f13aa94 - 15649999789850 - - bfa5eff2d33d8bc8886a0ec4336e498cdb1ad4a81660d4d3d6e50275e3d6078f - 9999966850 - - d4aaee62a66912e4687fc89aec250c8d1e9bb12bd9ebabc285234582864f6a27 - 249999987850 - - da2d5f25f4d538b7a2c99ef41d2127444428de19be327282473db763442ad61d - 50509999988950 - - 307dbb8e494585db96cf9ac4b58690dd5e95d6d56558866acc568e5997117ffb - 0 - - 631665a4194feb55c8250ed3565c4201702f11fa6a91e9485e239f253d72ad4a - 259999977900 - - 3f9f792eb7b6b021c8b9b831931e89373e6b3aa217cfd2da9ef4a852e11bcba6 - 1999998976800 - - 0ec3c1f81e80038d360b890c346956c85c918e2aca5b28d12d802198acab7175 - 999999977900 - - b7b132fdff13b998da3313c93ce36a75e2ca2f52288e95d944c9a6d6ba9042f3 - 609999988950 unassigned: 23914997348101
2.4 Execute the script
The below command will delegate all the stake of the account with the provided private key to the specified stake pool ID (
bash delegate-account.sh b7b132fdff13b998da3313c93ce36a75e2ca2f52288e95d944c9a6d6ba9042f3 3101 ed25519e_sk1sqc3z9y0nu9pmk9zsxsfph9q64h4kf7yvu8w7jr5kf62trtrrevnsd0ryqjxswkwf2jkhgdrskv63egs8a5gyrp89vvst8xgdtak8nqgwu9m0
2.5 Check the Account status
The value of the
delegation field should be the same as the one if the Stake Pool ID.
./jcli rest v0 account get ca1s543cn5y2gltfamx80f89scsvnuue9n5p357rl4a7en4sdyvrlh56c9nzc2 --host "http://127.0.0.1:9000/api" --- counter: 1 delegation: pools: - - b7b132fdff13b998da3313c93ce36a75e2ca2f52288e95d944c9a6d6ba9042f3 - 1 value: 1000