Interacting with the Node CLI

This guide provides an overview of the exrpd CLI (Command-Line Interface) for the XRPL EVM Sidechain. It is intended for newcomers who want to explore and interact with their own node at a deeper level. You will find the main commands and subcommands below, along with short descriptions of what they do and tips on how to use them.

Overview

The exrpd CLI is organized into primary commands. Each command may have one or more subcommands. To list subcommands, you can run:

exrpd <command> --help

or, to see the main help, simply run:

exrpd --help

This displays usage, available commands, and descriptions for each command. The following sections cover each major command category in more detail.

Configuration Commands

exrpd config

Use the config command to manage node configuration. This is helpful for setting up or inspecting config files.

SubcommandDescription
diffOutputs all config values that differ from the default app.toml configuration.
getDisplays the current value of a specific configuration parameter.
homePrints the folder used as the binary home directory. (When using confix standalone, no home is set.)
migrateMigrates a Cosmos SDK app configuration file to a specified version.
setSets a new value for a given configuration parameter.
viewDisplays the entire configuration file.

Examples

  • Check all deviations from default config:
    exrpd config diff
  • Get a specific config value:
    exrpd config get <key_name>
  • Set a config value:
    exrpd config set <key_name> <new_value>
  • Display current config file contents:
    exrpd config view

Key Management

exrpd keys

Use the keys command to manage local keys (private/public key pairs) for your application. This includes creating new keys, importing/exporting existing keys, and more.

Advanced configuration

Managing your node’s keys is essential. If you plan to operate a production node or validator, make sure to review the advanced key management configurations on the Managing keys page.

SubcommandDescription
addGenerate or recover a key, encrypt it locally, and save it under a specified name.
deleteDelete an existing key from local storage.
exportExport a private key (either encrypted or unencrypted, depending on flags used).
importImport a previously exported private key into the local keybase.
listList all locally stored keys.
migrateMigrate keys from Amino to Proto serialization format.
mnemonicGenerate or compute the BIP39 mnemonic from supplied entropy.
parseConvert an address between hex and Bech32 encoding.
renameRename an existing local key.
showShow information about a key, including its public address.
unsafe-export-eth-keyUNSAFE: Export an Ethereum private key. Use with caution.
unsafe-import-eth-keyUNSAFE: Import an Ethereum private key into the local keybase. Use with caution.

Examples

  • Create a new key:
    exrpd keys add myNewKey
  • List existing keys:
    exrpd keys list
  • Export a key:
    exrpd keys export myNewKey
  • Delete a key:
    exrpd keys delete myNewKey

Query Commands

exrpd query

The query command allows you to query data from various modules, transactions, blocks, or on-chain states. Use exrpd query <subcommand> --help for more on how to craft your queries.

Below is a list of subcommands within query:

SubcommandDescription
authQuery for authentication module data.
authzQuery for authorization module data.
bankQuery bank balances and other bank module data.
blockQuery a committed block by height, hash, or matching events.
block-resultsQuery the results of a committed block by height.
blocksQuery paginated blocks that match a set of events.
comet-validator-setQuery the full CometBFT validator set at a specific block height.
consensusQuery for consensus parameters.
distributionQuery for distribution module data (rewards, commissions, etc.).
erc20Query ERC-20 contract-related information.
evidenceQuery evidence of misbehavior.
evmQuery EVM module data.
feegrantQuery for fee grant allowances.
feemarketQuery data from the fee market module.
govQuery governance proposals, votes, deposits, and more.
ibcQuery Inter-Blockchain Communication (IBC) data.
ibc-transferQuery for IBC token transfer details.
interchain-accountsQuery IBC interchain accounts.
paramsQuery for on-chain parameters.
poaQuery for Proof-of-Authority module data.
ratelimitQuery the rate-limit module data.
slashingQuery data related to slashing, signing info, and parameters.
stakingQuery staking information (validators, delegations, unbonding, etc.).
txQuery a single transaction by its hash, "address/seq" combination, or signature.
txsQuery multiple transactions using events.
upgradeQuery network upgrade plans.
wait-txWait for a transaction to be included in a block.

Examples

  • Check an account balance:
    exrpd query bank balances <account_address>
  • Query the latest block:
    exrpd query block
  • Lookup a transaction by hash:
    exrpd query tx <tx_hash>

Transaction Commands

exrpd tx

The tx command handles transactions that change the state of the chain. Here, you can create, sign, broadcast, and simulate transactions.

Below is a list of subcommands within tx:

SubcommandDescription
authSend transactions related to the auth module.
authzAuthorization transaction subcommands (grant, revoke, etc.).
bankSend tokens and manage bank-related transactions.
broadcastBroadcast offline-generated transactions to the network.
consensusManage consensus-related transactions.
crisisCommands for crisis management (halt the chain, etc.).
decodeDecode a binary-encoded transaction string.
distributionManage distribution transactions (withdraw rewards, set commission, etc.).
encodeEncode offline-generated transactions.
erc20Manage ERC-20-related transactions.
evidenceSubmit evidence of misbehavior.
evmManage EVM-related transactions (deployment, contract calls, etc.).
feegrantFeegrant transaction subcommands.
feemarketManage the fee market module transactions.
govGovernance transactions (submit proposals, vote, deposit, etc.).
ibcIBC transaction subcommands.
ibc-transferIBC fungible token transfer transactions.
interchain-accountsIBC interchain accounts transaction subcommands.
multi-signGenerate multisig signatures for offline-generated transactions.
multisign-batchAssemble multisig transactions in batch from batch signatures.
poaProof-of-Authority module transaction commands.
ratelimitRatelimit module transaction commands.
signSign an offline-generated transaction with a local key.
sign-batchSign multiple transactions in batch.
simulateSimulate a transaction to estimate gas usage.
slashingSubmit slashing-related transactions.
stakingManage staking transactions (delegate, unbond, redelegate, etc.).
upgradeSubmit upgrade plan transactions.
validate-signaturesValidate the signatures of a transaction.

Examples

  • Send tokens from one account to another:
    exrpd tx bank send <from_address> <to_address> <amounttoken> --gas auto --gas-adjustment 1.2
  • Propose a governance change:
    exrpd tx gov submit-proposal <proposal_type> --title "<Title>" --description "<Description>" ...
  • Simulate gas usage for a transaction:
    exrpd tx simulate --file <unsigned_tx_file>

Version Information

exrpd version

Prints the exrpd application’s binary version information. This can be helpful to ensure you are on the correct version of the XRPL EVM sidechain software.

Example

exrpd version

Quick Reference: Common Node CLI Tasks

This section provides a practical cheat sheet for everyday tasks when working with the exrpd CLI. Whether you're managing wallets, staking tokens, operating a validator, or participating in governance, these ready-to-use commands help you move fast and confidently.


🔐 Key Management

Add New Wallet

exrpd keys add $WALLET

Restore Wallet from Mnemonic

exrpd keys add $WALLET --recover

List All Wallets

exrpd keys list

Delete a Wallet

exrpd keys delete $WALLET

Check Wallet Balance

exrpd query bank balances $WALLET_ADDRESS

Export Wallet Key (Save to File)

exrpd keys export $WALLET > wallet.backup

View EVM Private Key

exrpd keys unsafe-export-eth-key $WALLET

Import Wallet Key (Restore from Backup)

exrpd keys import $WALLET wallet.backup

💰 Tokens and Staking

Withdraw All Rewards

exrpd tx distribution withdraw-all-rewards --from $WALLET --chain-id exrp_1440002-1 --gas auto --gas-adjustment 1.5

Withdraw Rewards + Commission

exrpd tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id exrp_1440002-1 --gas auto --gas-adjustment 1.5 -y

Delegate to Yourself

exrpd tx staking delegate $(exrpd keys show $WALLET --bech val -a) 1000000uxrp --from $WALLET --chain-id exrp_1440002-1 --gas auto --gas-adjustment 1.5 -y

Delegate to Another Validator

exrpd tx staking delegate <TO_VALOPER_ADDRESS> 1000000uxrp --from $WALLET --chain-id exrp_1440002-1 --gas auto --gas-adjustment 1.5 -y

Redelegate Stake

exrpd tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000uxrp --from $WALLET --chain-id exrp_1440002-1 --gas auto --gas-adjustment 1.5 -y

Unbond Tokens

exrpd tx staking unbond $(exrpd keys show $WALLET --bech val -a) 1000000uxrp --from $WALLET --chain-id exrp_1440002-1 --gas auto --gas-adjustment 1.5 -y

Transfer Funds

exrpd tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000uxrp --gas auto --gas-adjustment 1.5 -y

🏛️ Validator Operations

Create a New Validator

exrpd tx staking create-validator \
--amount 1000000uxrp \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(exrpd tendermint show-validator) \
--moniker "$MONIKER" \
--identity "" \
--details "I love blockchain ❤️" \
--chain-id exrp_1440002-1 \
--gas auto --gas-adjustment 1.5 \
-y

Edit Existing Validator Info

exrpd tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "I love blockchain ❤️" \
--from $WALLET \
--chain-id exrp_1440002-1 \
--gas auto --gas-adjustment 1.5 \
-y

Check Validator Status

exrpd status 2>&1 | jq

Get Validator Details

exrpd query staking validator $(exrpd keys show $WALLET --bech val -a)

Check Jailing Info

exrpd query slashing signing-info $(exrpd tendermint show-validator)

Check Slashing Parameters

exrpd query slashing params

Unjail Validator

exrpd tx slashing unjail --from $WALLET --chain-id exrp_1440002-1 --gas auto --gas-adjustment 1.5 -y

List Active Validators

exrpd query staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl

Check Validator Key Consistency

[[ $(exrpd query staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(exrpd status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"

🗳️ Governance

Submit a Text Proposal

exrpd tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000uxrp \
--type Text \
--from $WALLET \
--gas auto --gas-adjustment 1.5 \
-y

List Proposals

exrpd query gov proposals

View a Proposal

exrpd query gov proposal 1

Vote on a Proposal

exrpd tx gov vote 1 yes --from $WALLET --chain-id exrp_1440002-1 --gas auto --gas-adjustment 1.5

Learn more

If you want to learn more about exrpd, you can explore the following resources: