π₯©Rewards
Query
Fetch Staking Rewards
import { IndexerGrpcMitoApi } from '@injectivelabs/sdk-ts'
const MITO_API_ENDPOINT = 'https://k8s.mainnet.mito.grpc-web.injective.network' /** for mainnet */
const mitoApi = new IndexerGrpcMitoApi(MITO_API_ENDPOINT)
const address = 'inj1..'
const STAKING_CONTRACT_ADDRESS = `inj1gtze7qm07nky47n7mwgj4zatf2s77xqvh3k2n8` /** staking contract address for mainnet */
const { rewards } = await mitoApi.fetchStakingRewardsByAccount({
stakingContractAddress: STAKING_CONTRACT_ADDRESS,
accountAddress: address
})
console.log(rewards)Fetch Staking Pools
Transactions
Stake LP
Unstake LP
Claim Stake
Claim Rewards
Last updated