@interlay/interbtc-api / Exports / DefaultRewardsAPI
• new DefaultRewardsAPI(api
, wrappedCurrency
): DefaultRewardsAPI
Name | Type |
---|---|
api |
ApiPromise |
wrappedCurrency |
Currency |
• api: ApiPromise
• Private
wrappedCurrency: Currency
▸ computeCollateralInStakingPool(vaultId
, nominatorId
): Promise
<MonetaryAmount
<CollateralCurrencyExt
>>
Name | Type | Description |
---|---|---|
vaultId |
InterbtcPrimitivesVaultId |
The account ID of the staking pool nominee |
nominatorId |
AccountId |
The account ID of the staking pool nominator |
Promise
<MonetaryAmount
<CollateralCurrencyExt
>>
A Monetary.js amount object, representing the collateral in the given currency
RewardsAPI.computeCollateralInStakingPool
▸ getStakingPoolNonce(collateralCurrency
, vaultAccountId
): Promise
<number
>
Name | Type | Description |
---|---|---|
collateralCurrency |
CollateralCurrencyExt |
The staked currency |
vaultAccountId |
AccountId |
The account ID of the staking pool nominee |
Promise
<number
>
The current nonce of the staking pool
RewardsAPI.getStakingPoolNonce
▸ withdrawRewards(vaultId
, nonce?
): Promise
<ExtrinsicData
>
Name | Type | Description |
---|---|---|
vaultId |
InterbtcPrimitivesVaultId |
VaultId object |
nonce? |
number |
Staking pool nonce |
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.