getInterestRate
Get the interest rate at the given epoch.
Usage
import { } from "./client";
const = await .({
: "latest_state",
});import { http, createPublicClient } from 'cive'
import { mainnet } from 'cive/chains'
export const publicClient = createPublicClient({
chain: mainnet,
transport: http(),
})Returns
bigint
Parameters
epochTag (optional)
- Type:
latest_state|latest_confirmed|latest_checkpoint|earliest - Defaut:
latest_state
const interestRate = await publicClient.getInterestRate({
epochTag: "latest_state",
});epochNumber (optional)
- Type:
bigint
const interestRate = await publicClient.getInterestRate({
epochNumber: 1n,
});