- Installation
- CLI usage
2.1 Init
2.2 Validator commands
2.3 Holder commands
2.4 Wallet commands
2.5 Self-recharging wallet commands - Exit codes
- Development
-
Linux x86_64 or macOS on Apple silicon
-
Download executable
VERSION_NUM={put the version number here} && sudo -E bash -c "curl -L https://github.com/skalenetwork/validator-cli/releases/download/$VERSION_NUM/sk-val-$VERSION_NUM-`uname -s`-`uname -m` > /usr/local/bin/sk-val"- Apply executable permissions to the binary:
sudo chmod +x /usr/local/bin/sk-valAll validator-cli version numbers are available here: https://github.com/skalenetwork/validator-cli/releases
Set the endpoint and the SKALE Manager alias or address.
sk-val initRequired arguments:
--endpoint/-e- RPC endpoint of the node in the network where SKALE manager is deployed (httporhttps)--manager-contracts/-c- SKALE Manager alias or address-w/--wallet- Type of the wallet that will be used for signing transactions (software, sgx or hardware)
In
--manager-contracts, if you are using a recognized network (e.g., 'Mainnet', 'Hoodi'), you can use a recognized alias (e.g., 'production', 'testnet'). You can check the list of recognized networks and aliases in contract deployments. On any other network, provide the SKALE Manager address.
If you want to use sgx wallet you need to initialize it first (see SGX commands)
Usage example:
sk-val init -e https://geth.test.com -c production --wallet softwareInitialize sgx wallet
sk-val sgx init [SGX_SERVER_URL]Optional arguments:
--force/-f- Rewrite current sgx wallet data--ssl-port- Port that is used by sgx server to establish tls connection
Print sgx wallet information
sk-val sgx info Optional arguments:
--raw- Print info in plain json
Register as a new SKALE validator
sk-val validator registerRequired arguments:
--name/-n- Validator name--description/-d- Validator description--commission-rate/-c- Commission rate (percentage)--min-delegation- Validator minimum delegation amount
Optional arguments:
--pk-file- Path to file with private key (only forsoftwarewallet type)--gas-price- Gas price value in Gwei for transaction (if not specified doubled average network value will be used)--yes- Confirmation flag
Usage example:
sk-val validator register -n test -d "test description" -c 20 --min-delegation 1000 --pk-file ./pk.txtList of available validators
sk-val validator lsOptions:
--wei/-w- Show tokens amount in wei
List of delegations for validator ID
sk-val validator delegations [VALIDATOR_ID]Required params:
- VALIDATOR_ID - ID of the validator
Accept pending delegation request by delegation ID
sk-val validator accept-delegation --pk-file ./pk.txtRequired arguments:
--delegation-id- ID of the delegation request to accept
Optional arguments:
--pk-file- Path to file with private key (only forsoftwarewallet type)--gas-price- Gas price value in Gwei for transaction (if not specified doubled average network value will be used)--yes- Confirmation flag
Accept ALL pending delegations request for the address.
List with all pending delegations to be accepted will be shown. After this user should confirm the operation.
sk-val validator accept-all-delegations --pk-file ./pk.txtOptional arguments:
--pk-file- Path to file with private key (only forsoftwarewallet type)--gas-price- Gas price value in Gwei for transaction (if not specified doubled average network value will be used)
List of the linked addresses for validator address
sk-val validator linked-addresses [ADDRESS]Required params:
- Address - Ethereum address of the validator
Link node address to the validator account
sk-val validator link-address [ADDRESS] [NODE_SIGNATURE] --pk-file ./pk.txtRequired params:
- Address - Ethereum address that will be linked
- Node signature - Signature of the node that you can get using
skale node signaturecommand from skale-node-cli
Optional arguments:
--pk-file- Path to file with private key (only forsoftwarewallet type)--gas-price- Gas price value in Gwei for transaction (if not specified doubled average network value will be used)--yes- Confirmation flag
Unlink node address from the validator account
sk-val validator unlink-address [ADDRESS] --pk-file ./pk.txtRequired params:
- Address - Ethereum address that will be unlinked
Optional arguments:
--pk-file- Path to file with private key (only forsoftwarewallet type)--gas-price- Gas price value in Gwei for transaction (if not specified doubled average network value will be used)--yes- Confirmation flag
Info about the validator
sk-val validator info [VALIDATOR_ID]Required params:
- Address - Ethereum address of the validator
Output info:
- Validator ID
- Name
- Address
- Fee rate (percent - %)
- Minimum delegation amount (SKL)
- Accepting new delegation requests
Withdraw earned fee to specified address
sk-val validator withdraw-fee [RECIPIENT_ADDRESS] --pk-file ./pk.txtRequired params:
- RECIPIENT_ADDRESS - Address to transfer bounty
Optional arguments:
--pk-file- Path to file with private key (only forsoftwarewallet type)--gas-price- Gas price value in Gwei for transaction (if not specified doubled average network value will be used)--yes- Confirmation flag
Set a new minimum delegation amount for the validator
sk-val validator set-mda [NEW_MDA] --pk-file ./pk.txtRequired params:
- NEW_MDA - New MDA value
Optional arguments:
--pk-file- Path to file with private key (only forsoftwarewallet type)--gas-price- Gas price value in Gwei for transaction (if not specified doubled average network value will be used)--yes- Confirmation flag
Request address change for the validator
sk-val validator change-address [ADDRESS] --pk-file ./pk.txtRequired params:
- ADDRESS - New validator address
Optional arguments:
--pk-file- Path to file with private key (only forsoftwarewallet type)--gas-price- Gas price value in Gwei for transaction (if not specified doubled average network value will be used)--yes- Confirmation flag
Confirm address change for the validator. Should be executed using new validator key.
sk-val validator confirm-address [VALIDATOR_ID] --pk-file ./pk.txtRequired params:
- VALIDATOR_ID - ID of the validator
Optional arguments:
--pk-file- Path to file with private key (only forsoftwarewallet type)--gas-price- Gas price value in Gwei for transaction (if not specified doubled average network value will be used)--yes- Confirmation flag
Get earned fee amount for the validator address
sk-val validator earned-fees [ADDRESS]Required params:
- ADDRESS - Validator address
Optional arguments:
--wei- Show amount in wei
Delegate tokens to validator
sk-val holder delegateRequired arguments:
--validator-id- ID of the validator to delegate--amount- Amount of SKALE tokens to delegate--delegation-period- Delegation period (in months - only2avaliable now)--info- Delegation request info
Optional arguments:
--pk-file- Path to file with private key (only forsoftwarewallet type)--gas-price- Gas price value in Gwei for transaction (if not specified doubled average network value will be used)
List of delegations for address
sk-val holder delegations [ADDRESS]Required arguments:
- ADDRESS - Ethereum address of the token holder
Options:
--wei/-w- Show tokens amount in wei
Cancel pending delegation request
sk-val holder cancel-delegation [DELEGATION_ID]Required params:
- Delegation ID - ID of the delegation to cancel
Optional arguments:
--pk-file- Path to file with private key (only forsoftwarewallet type)--gas-price- Gas price value in Gwei for transaction (if not specified doubled average network value will be used)
Request undelegation in the end of delegation period
sk-val holder undelegate [DELEGATION_ID]Required params:
- Delegation ID - ID of the delegation
Optional arguments:
--pk-file- Path to file with private key (only forsoftwarewallet type)--gas-price- Gas price value in Gwei for transaction (if not specified doubled average network value will be used)
Withdraw earned bounty to specified address
sk-val holder withdraw-bounty [VALIDATOR_ID] [RECIPIENT_ADDRESS] --pk-file ./pk.txtRequired params:
- VALIDATOR_ID - ID of the validator
- RECIPIENT_ADDRESS - Address to transfer bounty
Optional arguments:
--pk-file- Path to file with private key (only forsoftwarewallet type)--gas-price- Gas price value in Gwei for transaction (if not specified doubled average network value will be used)--yes- Confirmation flag
Show amount of locked tokens for address
sk-val holder locked [ADDRESS]Required arguments:
- ADDRESS - Ethereum address of the token holder
Options:
--wei/-w- Show tokens amount in wei
Get earned bounties amount by token holder for the validator ID
sk-val holder earned-bounties [VALIDATOR_ID] [ADDRESS]Required params:
- VALIDATOR_ID - ID of the validator
- ADDRESS - Token holder address
Optional arguments:
--wei- Show amount in wei
This command works only if you're using the Ledger wallet
sk-val wallet setup-ledgerRequired params:
--address-index- Index of the address to use (starting from0)--keys-type- Type of the Ledger keys (live or legacy)
Send ETH tokens to specific address
sk-val wallet send-eth [ADDRESS] [AMOUNT]Required arguments:
- ADDRESS - Ethereum receiver address
- AMOUNT - Amount of ETH tokens to send
Optional arguments:
--pk-file- Path to file with private key (only forsoftwarewallet type)--yes- Confirmation flag
Usage example:
sk-val wallet send-eth 0x01C19c5d3Ad1C3014145fC82263Fbae09e23924A 0.01 --pk-file ./pk.txt --yesSend SKL tokens to specific address
sk-val wallet send-skl [ADDRESS] [AMOUNT]Required arguments:
- ADDRESS - Ethereum receiver address
- AMOUNT - Amount of SKL tokens to send
Optional arguments:
--pk-file- Path to file with private key (only forsoftwarewallet type)--yes- Confirmation flag
Usage example:
sk-val wallet send-skl 0x01C19c5d3Ad1C3014145fC82263Fbae09e23924A 0.01 --pk-file ./pk.txt --yesShow balance of the validator self-recharging wallet
sk-val srw balance [VALIDATOR_ID]Required arguments:
- VALIDATOR_ID - ID if the validator
Optional arguments:
--wei/-w- Show amount in wei
Usage example:
sk-val srw balance 1 --weiRecharge validator SRW wallet (amount in ETH)
sk-val srw recharge [AMOUNT]Required arguments:
- AMOUNT - Amount of ETH to recharge
Optional arguments:
--pk-file- Path to file with private key (only forsoftwarewallet type)--gas-price- Gas price value in Gwei for transaction (if not specified doubled average network value will be used)
Usage example:
sk-val srw recharge 0.1 --pk-file ./tests/test-pk.txtWithdraw ETH from validator SRW wallet (amount in ETH)
sk-val srw withdraw [AMOUNT]Required arguments:
- AMOUNT - Amount of ETH to withdraw
Optional arguments:
--pk-file- Path to file with private key (only forsoftwarewallet type)--gas-price- Gas price value in Gwei for transaction (if not specified doubled average network value will be used)
Usage example:
sk-val srw withdraw 0.1 --pk-file ./tests/test-pk.txtExit codes conventions for SKALE CLI tools
0- Everything is OK1- General error exit code3- Bad API response4- Script execution error5- Transaction error6- Revert error
- uv 0.13.6+ (installs Python 3.14 from
.python-version) - Git
uv sync --all-extrasIn file .git/hooks/pre-commit add:
#!/bin/sh
uv run ruff checkGenerate cli/info.py, then run commands in dev mode:
bash scripts/generate_info.sh 1.0.0 my-branch
uv run python cli/main.py YOUR_COMMANDThe tests deploy skale-manager to a local Anvil chain and run the SGX simulator in Docker. Export ETH_PRIVATE_KEY, MANAGER_TAG and SGX_WALLET_TAG as set in .github/workflows/test.yml, then run:
RUN_ANVIL=true bash helper-scripts/deploy_manager.sh
bash scripts/prepare_configs.sh
bash scripts/generate_info.sh test test
uv run bash scripts/run_tests.shAll contributions are made under the GNU Affero General Public License v3. See LICENSE.