Rewards
Last updated
Was this helpful?
Was this helpful?
import {
getCurrentEpoch,
getEpochUsage,
getEpochSummary,
getPendingRewards
} from "@coti-io/coti-sdk-private-messaging";
const currentEpoch = await getCurrentEpoch(client);
const closedEpoch = currentEpoch - 1n;
const usage = await getEpochUsage(client, closedEpoch, wallet.address);
const summary = await getEpochSummary(client, closedEpoch);
const pending = await getPendingRewards(client, closedEpoch, wallet.address);import { claimRewards } from "@coti-io/coti-sdk-private-messaging";
const result = await claimRewards(client, {
epoch: closedEpoch
});import { fundEpoch } from "@coti-io/coti-sdk-private-messaging";
const txHash = await fundEpoch(client, {
epoch: currentEpoch,
amountWei: 1000000000000000000n
});