getInterestRate
Get the interest rate at the given epoch.
Usage
example.ts
import { publicClient } from "./client";
const interestRate = await publicClient.getInterestRate({
epochTag: "latest_state",
});
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,
});