interbtc-api

@interlay/interbtc-api / Exports / RewardsAPI

Interface: RewardsAPI

Implemented by

Table of contents

Methods

Methods

computeCollateralInStakingPool

computeCollateralInStakingPool(vaultId, nominatorId): Promise<MonetaryAmount<CollateralCurrencyExt>>

Parameters

Name Type Description
vaultId InterbtcPrimitivesVaultId The account ID of the staking pool nominee
nominatorId AccountId The account ID of the staking pool nominator

Returns

Promise<MonetaryAmount<CollateralCurrencyExt>>

A Monetary.js amount object, representing the collateral in the given currency

Defined in

src/parachain/rewards.ts:28


getStakingPoolNonce

getStakingPoolNonce(currency, vaultId): Promise<number>

Parameters

Name Type Description
currency CurrencyExt The staked currency
vaultId AccountId The account ID of the staking pool nominee

Returns

Promise<number>

The current nonce of the staking pool

Defined in

src/parachain/rewards.ts:22


withdrawRewards

withdrawRewards(vaultId, nonce?): Promise<ExtrinsicData>

Parameters

Name Type Description
vaultId InterbtcPrimitivesVaultId VaultId object
nonce? number Staking pool nonce

Returns

Promise<ExtrinsicData>

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.

Defined in

src/parachain/rewards.ts:38