This guide provides essential commands for managing your account and validator on the Galactica Network using the galacticad CLI.
Installation and Setup
For detailed instructions on installing galacticad, please refer to our comprehensive .
Node Setup
For every command, replace [chain_id] with the appropriate chain ID for the network you're interacting with. You can also specify custom home directories using the --home flag:
Set the RPC node URL for the client to connect to.
galacticad config node [rpc_node_url]
Initialize Node
Initialize a new node home directory with a moniker and chain ID. This command creates a new node configuration in the specified home directory.
galacticad init [moniker] --chain-id [chain_id]
Start Node
Start your node to begin syncing with the network.
galacticad start --chain-id [chain_id]
Show Node Info
Display information about node status, including the latest block height and other details. This command queries the node set by galacticad config node [rpc_node_url].
galacticad status
Keys Management
Create a New key
galacticad keys add [key_name]
After entering the command, you need to input the passphrase for the keys. You might need to re-enter the passphrase.
Example output:
Enter keyring passphrase (attempt 1/3): #
Re-enter keyring passphrase:
- address: [gala_address]
name: [key_name]
pubkey: [public_key]
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.
<<seed phrase here>>
Import mnemonic
If you already have a mnemonic phrase, you can import it using the following command:
galacticad keys add [key_name] --recover
Export a Key
Export your key to a file for backup.
galacticad keys export [key_name] > [key_file]
Import a Key
Import a key from a file.
galacticad keys import [key_name] [key_file]
Delete a Key
galacticad keys delete [key_name]
Show Gala Address
Displays the Gala address associated with your key. The -a flag shows the address only. It has a prefix gala.
galacticad keys show [key_name] -a
Show ETH Address
Converts your Gala address to an Ethereum-compatible address. It is useful for interacting with Ethereum-based DAPPs or wallets. It is in hex format (with the 0x prefix).
galacticad keys convert-bech32-to-hex $(galacticad keys show [key_name] -a)
Export Ethereum Private Key in Hex Format
Exports your Ethereum private key for use in other wallets or applications. You could import this key into a wallet like MetaMask or Keplr.
galacticad keys unsafe-export-eth-key [key_name]
Check Account Balance
Displays the current balance of your account.
galacticad query bank balances $(galacticad keys show [key_name] -a)
Validator Management
Get Validator Address
Validator address is required for staking and other validator-specific operations. It has prefix galavaloper.
galacticad keys show [key_name] --bech val -a
Get Consensus Address
Consensus address is the address used for consensus operations. It has prefix galacons.
galacticad keys show [key_name] --bech cons -a
Get Validator Public Key
Validator public key is used for signing blocks and other validator operations. It is in bech32 format.
galacticad keys show [key_name] --bech val -p
Get Consensus Public Key
Consensus public key is used for consensus operations. It is in bech32 format.
galacticad keys show [key_name] --bech cons -p
Sharing your Peer ID
Your node's Peer ID is required for P2P communication. You can share it with other validators to establish connections.