xion daemon (server)
Usage:
xiond [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
config Create or query an application CLI configuration file
debug Tool for helping with debugging your application
export Export state to JSON
genesis Application's genesis-related subcommands
help Help about any command
init Initialize private validator, p2p, genesis, and application configuration files
keys Manage your application's keys
prune Prune app history states by keeping the recent heights and deleting old heights
query Querying subcommands
rollback rollback cosmos-sdk and tendermint state by one height
rosetta spin up a rosetta server
start Run the full node
status Query remote node for status
tendermint Tendermint subcommands
tx Transactions subcommands
version Print the application binary version information
Flags:
-h, --help help for xiond
--home string directory for config and data (default "/Users/justin/.xiond")
--log_format string The logging format (json|plain) (default "plain")
--log_level string The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
--trace print out full stack trace on errors
Use "xiond [command] --help" for more information about a command.
By default all commands will assume you are accessing a local xion testnet unless you pass a parameter.
Testing the CLI
Connecting to an External node
The --node flag allows you to provide an external RPC to query from.
Example: Query balance of an account on the testnet
If this is a fresh installation the output is going to be
[]
Create a new account
$ xiond keys add test
Output
- address: xion1vmzvym7t4kn09lzmj9clxk24yanr08xfr6fghg
name: test
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AwrVIv+hI5g9PjnkWXPxFSpuA6h2S7hVdntt45SqlJKS"}'
type: local
**Important** write this mnemonic phrase in a safe place.
It is the only way to recover your account if you ever forget your password.
reject waste alien movie abstract kangaroo find second phone home pet you regret horse crunch above faint govern gaze hammer fortune midnight can elephant
List Keys
$ xiond keys list
Output
- address: xion1vmzvym7t4kn09lzmj9clxk24yanr08xfr6fghg
name: test
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AwrVIv+hI5g9PjnkWXPxFSpuA6h2S7hVdntt45SqlJKS"}'
type: local
The name field is an alias that can be used in some other commands.
Checking an account balance
To get the current balance the in the banking module in a given address.
For the below command to not return
Error: post failed: Post "http://localhost:26657": dial tcp [::1]:26657: connect: connection refused
make sure you either provide a node to connect to or a have local instance of Xion chain running in the background.
To connect to an external node
$ xiond query bank balances xion14yy92ae8eq0q3ezy9nasumt65hwdgryvpkf0a4 --node https://rpc.xion-testnet-1.burnt.com:443