Skip to content

02QueryingChainPeggy

Ivan Angelkoski edited this page Jun 12, 2023 · 4 revisions

⚠️ The Docs have been moved to https://docs.ts.injective.network/querying/querying-chain/querying-chain-peggy ⚠️

Example code snippets to query the chain via the peggy api.

Using gRPC

  • Get parameters related to peggy
import { ChainGrpcPeggyApi } from "@injectivelabs/sdk-ts";
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";

const endpoints = getNetworkEndpoints(Network.TestnetK8s);
const chainGrpcPeggyApi = new ChainGrpcPeggyApi(endpoints.grpc);

const moduleParams = await chainGrpcPeggyApi.fetchModuleParams();

console.log(moduleParams);

⚠️ DOCUMENTATION ⚠️

Clone this wiki locally