CLI
Interact with Terp Network using terpd — status, queries, and transactions
CLI (terpd)
Once terpd is installed, point it at a node and query or broadcast.
Node status
# Local node
terpd status
# Public RPC
terpd status --node https://rpc.cosmos.directory/terpnetworkUseful fields: sync_info.latest_block_height, sync_info.catching_up, node_info.network (chain ID).
Common queries
NODE=https://rpc.cosmos.directory/terpnetwork
CHAIN=morocco-1
# Bank balances
terpd query bank balances terp1... --node "$NODE"
# Wasm code info (for state.json code_ids)
terpd query wasm code-info 66 --node "$NODE"
# Wasm contract info (for state.json default addresses)
terpd query wasm contract terp1... --node "$NODE"
# IBC channels
terpd query ibc channel channels --node "$NODE" -o json | jq '.channels | length'Transactions
terpd tx bank send <from-key> <to-addr> 1000uthiol \
--chain-id morocco-1 \
--node "$NODE" \
--gas auto \
--gas-adjustment 1.3 \
--fees 5000uthiol \
-yTestnet uses chain id 90u-4 and denom uthiolx (confirm live params before mainnet).
Related
APIs
Unified Terp Network API surfaces — RPC, REST/LCD, gRPC, historical data, CLI, and integration state
TerpNET Tendermint RPC
Tendermint supports the following RPC protocols: * URI over HTTP * JSON-RPC 2.0 over HTTP * JSON-RPC 2.0 over websockets (deprecated) ## Configuration RPC can be configured by tuning parameters under `[rpc]` table in the `$TMHOME/config/config.toml` file or by using the `--rpc.X` command-line flags. Default rpc listen address is `tcp://0.0.0.0:26657`. To set another address, set the `laddr` config parameter to desired value. CORS (Cross-Origin Resource Sharing) can be enabled by setting `cors_allowed_origins`, `cors_allowed_methods`, `cors_allowed_headers` config parameters. ## Arguments Arguments which expect strings or byte arrays may be passed as quoted strings, like `"abc"` or as `0x`-prefixed strings, like `0x616263`. ## URI/HTTP A GET request with arguments encoded as query parameters: curl localhost:26657/block?height=5 ## JSONRPC/HTTP JSONRPC requests can be POST'd to the root RPC endpoint via HTTP. curl --header "Content-Type: application/json" --request POST --data '{"method": "block", "params": ["5"], "id": 1}' localhost:26657 ## JSONRPC/websockets In Tendermint v0.35 and earlier, JSONRPC requests can be also made via websocket. The websocket interface is deprecated in Tendermint v0.36, and will be removed in v0.37. The websocket endpoint is at `/websocket`, e.g. `localhost:26657/websocket`. The RPC methods for event subscription (`subscribe`, `unsubscribe`, and `unsubscribe_all`) are only available via websockets. Example using https://github.com/hashrocket/ws: ws ws://localhost:26657/websocket > { "jsonrpc": "2.0", "method": "subscribe", "params": ["tm.event='NewBlock'"], "id": 1 }