Example code snippets to query the chain for IBC related data.
Last modified on March 30, 2026
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
import { ChainGrpcIbcApi } from "@injectivelabs/sdk-ts/client/chain";
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";
const endpoints = getNetworkEndpoints(Network.Testnet);
const chainGrpcIbcApi = new ChainGrpcIbcApi(endpoints.grpc);
const hash = "...";
const denomTrace = await chainGrpcIbcApi.fetchDenomTrace(hash);
console.log(denomTrace);
import { ChainGrpcIbcApi } from "@injectivelabs/sdk-ts/client/chain";
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";
const endpoints = getNetworkEndpoints(Network.Testnet);
const chainGrpcIbcApi = new ChainGrpcIbcApi(endpoints.grpc);
const denomTraces = await chainGrpcIbcApi.fetchDenomsTrace();
console.log(denomTraces);
