Initiad

Overview

Initiad serves as a command-line interface operating on Linux, designed to facilitate connections, transactions, and queries within the Initia network. This guide is tailored for developers who aim to interact with the Initia network—sending transactions or querying states—without the necessity of operating a node.

Prerequisites

You can download prebuilt initiad binaries or build yourself.

Download Prebuilt initiad

We have a repository to publish prebuilt binaries for each networks.

To install, start by cloning the source code and then switch to the appropriate version tailored to the network you wish to access. Use the following commands:

Step 1. Clone the Initia repository:

git clone https://github.com/initia-labs/initia
cd initia

git checkout [version]

You can identify the suitable version of initiad on Connect to Initia Network.

Step 2. Build initiad

Next, build initiad from the source code:

make install

Step 3. Confirmation

To confirm that initiad has been installed correctly, execute:

initiad version --long

build_tags: netgo,ledger
commit: 31051a01e01609be014d6fec36d00a17be408663
cosmos_sdk_version: v0.0.0-20240514173001-c037b6c44d98
go: go version go1.22.3 linux/amd64
name: initia
server_name: initiad
version: v0.2.15

Configuring Initiad

Configuring Initiad offers flexibility, allowing you to either specify options for each command execution or to set predefined configuration values to bypass the need for repeated option entries. Here's how to streamline your Initiad operations:

# init initiad with default setting
initiad init local --chain-id testnet

# modify node section to the remote full node rpc address.
vim ~/.initia/config/client.toml

Managing Keys

The initiad keys command is crucial for storing and managing private keys within a local device's keyring. These stored keys facilitate the execution of transaction commands:

initiad keys add <your-key-name> [flags]

Executing Transactions

The initiad tx command allows you to modify the chain state by transmitting a transaction. Similar to queries, each of the Cosmos modules provides a client-facing transaction interface:

initiad tx [module-name] [tx-name] ... [flags]

for example,

initiad tx bank send [from-addr] [to-addr] [amount] [flags]

Querying Chain State

Utilize the initiad query command to interact with the chain state query interface. This interface is supported by each of the Cosmos modules and CometBFT (previously known as Tendermint), offering client-facing query capabilities:

initiad query [module-name] [query-name] ... [flags]

for example,

initiad query bank balances [address]

Last updated

Logo

© 2024 Initia Foundation, All rights reserved.