import { AccountId } from "@polkadot/types/interfaces"; import { MonetaryAmount } from "@interlay/monetary-js"; import { ApiPromise } from "@polkadot/api/promise"; import { InterbtcPrimitivesVaultId } from "../parachain"; import { WrappedCurrency, CollateralCurrencyExt, CurrencyExt, ExtrinsicData } from "../types"; export interface RewardsAPI { /** * @param currency The staked currency * @param vaultId The account ID of the staking pool nominee * @returns The current nonce of the staking pool */ getStakingPoolNonce(currency: CurrencyExt, vaultId: AccountId): Promise; /** * @param vaultId The account ID of the staking pool nominee * @param nominatorId The account ID of the staking pool nominator * @returns A Monetary.js amount object, representing the collateral in the given currency */ computeCollateralInStakingPool(vaultId: InterbtcPrimitivesVaultId, nominatorId: AccountId): Promise>; /** * @param vaultId VaultId object * @param nonce Staking pool nonce * @returns {Promise} A submittable extrinsic and an event that is emitted when extrinsic is submitted. * @remarks Withdraw all rewards from the current account in the `vaultId` staking pool. */ withdrawRewards(vaultId: InterbtcPrimitivesVaultId, nonce?: number): Promise; } export declare class DefaultRewardsAPI implements RewardsAPI { api: ApiPromise; private wrappedCurrency; constructor(api: ApiPromise, wrappedCurrency: WrappedCurrency); getStakingPoolNonce(collateralCurrency: CollateralCurrencyExt, vaultAccountId: AccountId): Promise; computeCollateralInStakingPool(vaultId: InterbtcPrimitivesVaultId, nominatorId: AccountId): Promise>; withdrawRewards(vaultId: InterbtcPrimitivesVaultId, nonce?: number): Promise; }