Documentation Index
Fetch the complete documentation index at: https://injectivelabs-mintlify-jp-developers-first-half-1777019423.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Example code snippets to query the indexer for insurance fund module related data.
Using gRPC
Fetch redemptions for an injective address
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";
import { IndexerGrpcInsuranceFundApi } from "@injectivelabs/sdk-ts/client/indexer";
const endpoints = getNetworkEndpoints(Network.Testnet);
const indexerGrpcInsuranceFundApi = new IndexerGrpcInsuranceFundApi(
endpoints.indexer
);
const injectiveAddress = "inj...";
const redemptions = await indexerGrpcInsuranceFundApi.fetchRedemptions({
injectiveAddress,
});
console.log(redemptions);
Fetch insurance funds
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";
import { IndexerGrpcInsuranceFundApi } from "@injectivelabs/sdk-ts/client/indexer";
const endpoints = getNetworkEndpoints(Network.Testnet);
const indexerGrpcInsuranceFundApi = new IndexerGrpcInsuranceFundApi(
endpoints.indexer
);
const insuranceFunds = await indexerGrpcInsuranceFundApi.fetchInsuranceFunds();
console.log(insuranceFunds);