Skip to content

Node CLI Usage Guide

This reference manual covers the xosd command-line interface (CLI) for the XOS Testnet. Designed for operators who wish to gain deeper control over their node operations, this guide documents available commands, their functions, and practical usage examples.

Command Structure

The xosd CLI follows a hierarchical organization with primary commands that branch into more specific subcommands. To explore available subcommands, use:

xosd <command> --help

For comprehensive command documentation, execute:

xosd --help

This displays all available commands with their descriptions. The following sections examine each major command category in detail.

Node Configuration Management

xosd config

This command group facilitates node configuration management, allowing you to inspect and modify configuration parameters.

SubcommandFunction
diffLists all configuration values that deviate from the default app.toml settings.
getRetrieves the current setting for a specific configuration parameter.
homeShows the directory path used as the binary's home location. (Not applicable when using confix independently.)
migrateConverts a Cosmos SDK configuration file to another version format.
setUpdates a configuration parameter with a new value.
viewDisplays the complete contents of the configuration file.

Usage Examples

  • Identify non-default configuration:
    xosd config diff
  • Retrieve a parameter value:
    xosd config get <parameter_name>
  • Modify a parameter:
    xosd config set <parameter_name> <parameter_value>
  • View entire configuration:
    xosd config view

Cryptographic Key Operations

xosd keys

This command suite handles all operations related to cryptographic key management, including creation, import, export, and other key-related functions.

Advanced security considerations

Proper key management is crucial for secure node operation. For production validators, review the detailed security practices outlined in the Key Management Guide.

SubcommandFunction
addCreates a new key or recovers an existing one, encrypts it, and saves it with a specified name.
deleteRemoves a key from local storage.
exportExports a key in encrypted or unencrypted format depending on specified options.
importAdds a previously exported key to the local keystore.
listDisplays all keys currently stored in the local keystore.
migrateConverts keys from Amino encoding to Proto serialization format.
mnemonicGenerates or derives BIP39 mnemonic phrases from provided entropy.
parseConverts addresses between hexadecimal and Bech32 encoding formats.
renameChanges the name identifier for a stored key.
showDisplays detailed information about a specific key, including its public address.
unsafe-export-eth-keyUNSAFE: Extracts an Ethereum private key. Exercise extreme caution.
unsafe-import-eth-keyUNSAFE: Incorporates an Ethereum private key into the local keystore. Exercise extreme caution.

Usage Examples

  • Generate a new key:
    xosd keys add myOperationalKey
  • View all available keys:
    xosd keys list
  • Extract a key:
    xosd keys export myOperationalKey
  • Remove a key:
    xosd keys delete myOperationalKey

Blockchain Data Retrieval

xosd query

The query command suite enables retrieval of blockchain data across various modules, transactions, blocks, and state information. For command-specific help, use xosd query <subcommand> --help.

The following subcommands are available:

SubcommandFunction
authRetrieves data from the authentication module.
authzAccesses authorization module information.
bankFetches account balances and related bank module data.
blockRetrieves block information by height, hash, or event criteria.
block-resultsObtains execution results for a specified block height.
blocksReturns multiple blocks matching specified event criteria with pagination.
comet-validator-setDisplays the complete CometBFT validator set at a designated block height.
consensusRetrieves current consensus parameter values.
distributionAccesses reward distribution data (commissions, rewards, etc.).
erc20Retrieves information related to ERC-20 contracts.
evidenceSearches for evidence of validator misbehavior.
evmAccesses Ethereum Virtual Machine module data.
feegrantRetrieves information about fee allowances.
feemarketObtains fee market module data and parameters.
govAccesses governance information including proposals, votes, and deposits.
ibcRetrieves Inter-Blockchain Communication protocol data.
ibc-transferFetches IBC token transfer details.
interchain-accountsAccesses IBC interchain account information.
paramsRetrieves blockchain parameters.
poaFetches Proof-of-Authority module data.
ratelimitRetrieves rate-limit module configuration and status.
slashingAccesses validator slashing information, signing records, and parameters.
stakingRetrieves validator and delegation data including staking positions and unbonding records.
txLocates a specific transaction using its hash, address/sequence, or signature.
txsSearches for multiple transactions using event criteria.
upgradeRetrieves information about pending and completed network upgrades.
wait-txMonitors and waits for a transaction to be confirmed in a block.

Usage Examples

  • Check address balance:
    xosd query bank balances <account_address>
  • Retrieve latest block data:
    xosd query block
  • Examine transaction details:
    xosd query tx <transaction_hash>

Blockchain State Modification

xosd tx

The transaction command suite facilitates operations that modify blockchain state. These commands allow you to create, sign, validate, and broadcast various types of transactions.

Available transaction subcommands:

SubcommandFunction
authExecutes authentication module transactions.
authzManages authorization operations (granting, revoking, etc.).
bankFacilitates token transfers and other banking operations.
broadcastTransmits prepared transaction data to the network.
consensusHandles consensus parameter modification transactions.
crisisProvides emergency chain management functionality.
decodeConverts binary transaction data to human-readable format.
distributionManages reward distribution operations.
encodeConverts transactions to binary format for transmission.
erc20Facilitates ERC-20 token-related operations.
evidenceSubmits evidence of validator protocol violations.
evmManages Ethereum Virtual Machine operations.
feegrantExecutes fee allowance management operations.
feemarketHandles fee market parameter modifications.
govFacilitates governance operations (proposal submission, voting, etc.).
ibcExecutes Inter-Blockchain Communication operations.
ibc-transferPerforms cross-chain token transfers.
interchain-accountsManages IBC interchain account operations.
multi-signCreates signatures for multi-signature transactions.
multisign-batchProcesses batch transactions with multiple signatures.
poaExecutes Proof-of-Authority module transactions.
ratelimitManages rate-limit module parameters.
signAdds a cryptographic signature to a transaction.
sign-batchSigns multiple transactions simultaneously.
simulatePerforms transaction simulation to estimate execution costs.
slashingSubmits validator slashing-related transactions.
stakingManages validator staking operations (delegation, unbonding, etc.).
upgradeSubmits network upgrade proposals.
validate-signaturesVerifies transaction signature validity.

Usage Examples

  • Transfer tokens between accounts:
    xosd tx bank send <sender_address> <recipient_address> <token_amount> --gas auto --gas-adjustment 1.2
  • Submit governance proposal:
    xosd tx gov submit-proposal <proposal_type> --title "<Proposal Title>" --description "<Proposal Description>" ...
  • Estimate transaction execution cost:
    xosd tx simulate --file <transaction_file>

Software Version Information

xosd version

Displays the installed xosd binary version details. This information is essential for verifying compatibility with the XOS Testnet network.

Usage Example

xosd version