Interacting with Xion Chain using Xion Daemon
Last updated
Was this helpful?
Last updated
Was this helpful?
xiond
is the command-line interface (CLI) daemon for interacting with the Xion blockchain. It allows users to manage accounts, send transactions, query blockchain data, and operate validator nodes.
Before proceeding with this guide, ensure that xiond
is installed on your system. Follow the installation steps outlined in the guide.
To verify your installation, run:
If installed correctly, you should see the following output:
This output displays the available commands within xiond
. Each command may include additional subcommands. To get more details about a specific command, use the --help
flag.
To execute transactions on-chain, you need at least one funded account. This section will guide you through the process of creating and funding an account using xiond
.
To interact with the XION blockchain, you need a cryptographic key pair, consisting of a public key and a private key. The public key is used to derive your address, while the private key is required to sign transactions.
Use the following command to create a new key pair and add it to your local key store:
Replace <keyname>
with a name of your choice for easy reference.
If you have already generated a key pair and need to retrieve its public key, use the following command:
Replace <keyname>
with the name of your key to display its public key.
Your account is not fully registered on-chain until it is involved in a transaction. The easiest way to achieve this is by funding your account, which allows it to interact with the network.
You can obtain testnet tokens through one of the following methods:
Discord Faucet: Request tokens by using the faucet bot in the XION Discord.
If you’re deploying contracts on XION Mainnet, you can acquire XION tokens through various decentralized and centralized exchanges.
By default, xiond
uses a local network node for executing transactions and queries. However, if you need to connect to a different chain, such as a public testnet or mainnet, you must specify the appropriate chain ID and node URL.
To interact with a different Xion blockchain for sending transactions, you need to explicitly set:
The chain ID using the --chain-id
flag
The node URL using the --node
flag
Replace <target-chain-id>
with the appropriate chain ID.
Replace <node-url>
with the RPC endpoint of the target chain.
For queries, you only need to set the --node
flag, as queries do not require the --chain-id
parameter.
Faucet Web Page: Visit the and follow the instructions to receive testnet tokens.
For more details on accessing testnet tokens, see our .
You can find the chain IDs for all Xion chains, along with available public RPC nodes, in the section of the documentation.