メインコンテンツへスキップ

Documentation Index

Fetch the complete documentation index at: https://injectivelabs-mintlify-jp-native-query-chain.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

IBC関連のデータをチェーンからクエリするためのコードスニペット例。

gRPCを使用する

IBC hashからdenom traceを取得する

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);

denom traceの一覧を取得する

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);
Last modified on May 27, 2026