hermes-v2-sdk
Version:
⚒️ An SDK for building applications on top of Hermes V2
45 lines (44 loc) • 2.47 kB
TypeScript
import { Interface } from '@ethersproject/abi';
import { MethodParameters } from 'maia-core-sdk';
import { ClaimOptions, FullWithdrawOptions, IncentiveKey } from '../../types/staker';
export declare abstract class Staker {
static readonly INTERFACE: Interface;
protected constructor();
private static INCENTIVE_KEY_ABI;
/**
* To claim rewards, must unstake and then claim.
* @param incentiveKey The unique identifier of a staking program.
* @param options Options for producing the calldata to claim. Can't claim unless you unstake.
* @returns The calldatas for 'unstakeToken' and 'claimReward'.
*/
private static encodeClaim;
/**
*
* Note: A `tokenId` can be staked in many programs but to claim rewards and continue the program you must unstake, claim, and then restake.
* @param incentiveKeys An IncentiveKey or array of IncentiveKeys that `tokenId` is staked in.
* Input an array of IncentiveKeys to claim rewards for each program.
* @param options ClaimOptions to specify tokenId, recipient, and amount wanting to collect.
* Note that you can only specify one amount and one recipient across the various programs if you are collecting from multiple programs at once.
* @returns
*/
static collectRewards(incentiveKeys: IncentiveKey | IncentiveKey[], options: ClaimOptions): MethodParameters;
/**
*
* @param incentiveKeys A list of incentiveKeys to unstake from. Should include all incentiveKeys (unique staking programs) that `options.tokenId` is staked in.
* @param withdrawOptions Options for producing claim calldata and withdraw calldata. Can't withdraw without unstaking all programs for `tokenId`.
* @returns Calldata for unstaking, claiming, and withdrawing.
*/
static withdrawToken(incentiveKeys: IncentiveKey | IncentiveKey[], withdrawOptions: FullWithdrawOptions): MethodParameters;
/**
*
* @param incentiveKeys A single IncentiveKey or array of IncentiveKeys to be encoded and used in the data parameter in `safeTransferFrom`
* @returns An IncentiveKey as a string
*/
static encodeDeposit(incentiveKeys: IncentiveKey | IncentiveKey[]): string;
/**
*
* @param incentiveKey An `IncentiveKey` which represents a unique staking program.
* @returns An encoded IncentiveKey to be read by ethers
*/
private static _encodeIncentiveKey;
}