Insurance Fund
Example code snippets to query data related to the insurance fund on chain.
Using gRPC
Fetch default redemption notice period duration
import { ChainGrpcInsuranceFundApi } from '@injectivelabs/sdk-ts'
import { getNetworkEndpoints, Network } from '@injectivelabs/networks'
const endpoints = getNetworkEndpoints(Network.Testnet)
const chainGrpcInsuranceFundApi = new ChainGrpcInsuranceFundApi(endpoints.grpc)
const moduleParams = await chainGrpcInsuranceFundApi.fetchModuleParams()
console.log(moduleParams)Fetch insurance funds and associated metadata
import { ChainGrpcInsuranceFundApi } from '@injectivelabs/sdk-ts'
import { getNetworkEndpoints, Network } from '@injectivelabs/networks'
const endpoints = getNetworkEndpoints(Network.Testnet)
const chainGrpcInsuranceFundApi = new ChainGrpcInsuranceFundApi(endpoints.grpc)
const insuranceFunds = await chainGrpcInsuranceFundApi.fetchInsuranceFunds()
console.log(insuranceFunds)Fetch insurance fund and associated metadata based on the market ID
Fetch estimated redemptions for a given injective address for a market
Fetch pending redemptions for a given injective address for a market
Last updated
