@interlay/interbtc-api / Exports / NominationAPI
▸ depositCollateral(vaultAccountId, amount): ExtrinsicData
| Name | Type | Description |
|---|---|---|
vaultAccountId |
AccountId |
Vault to nominate collateral to |
amount |
MonetaryAmount<CollateralCurrencyExt> |
Amount to deposit, as a Monetary.js object or ForeignAsset |
A submittable extrinsic and an event that is emitted when extrinsic is submitted.
src/parachain/nomination.ts:47
▸ getActiveNominatorRewards(nominatorId): Promise<NominationData[]>
| Name | Type | Description |
|---|---|---|
nominatorId |
AccountId |
Id of user who nominated to one or more vaults |
Promise<NominationData[]>
The rewards a currently active nominator has accumulated
src/parachain/nomination.ts:124
▸ getFilteredNominations(vaultAccountId?, collateralCurrency?, nominatorId?): Promise<Nomination[]>
| Name | Type | Description |
|---|---|---|
vaultAccountId? |
AccountId |
Id of vault who is opted in to nomination |
collateralCurrency? |
CollateralCurrencyExt |
- |
nominatorId? |
AccountId |
Id of user who nominated to one or more vaults |
Promise<Nomination[]>
Remarks
At least one of the parameters must be specified
src/parachain/nomination.ts:102
▸ getNominatorReward(vaultId, collateralCurrency, rewardCurrency, nominatorId): Promise<MonetaryAmount<Currency>>
| Name | Type | Description |
|---|---|---|
vaultId |
AccountId |
- |
collateralCurrency |
CollateralCurrencyExt |
The currency towards whose issuance the nomination was made |
rewardCurrency |
Currency |
The reward currency, e.g. kBTC, KINT, interBTC, INTR |
nominatorId |
AccountId |
Id of user who nominated to one or more vaults |
Promise<MonetaryAmount<Currency>>
The rewards a (possibly inactive) nominator has accumulated
src/parachain/nomination.ts:132
▸ getNonces(): Promise<Map<InterbtcPrimitivesVaultId, number>>
Promise<Map<InterbtcPrimitivesVaultId, number>>
A map (vaultId => nonce), representing the nonces for each reward pool with the given currency
src/parachain/nomination.ts:141
▸ getTotalNomination(vaultAccountId?, collateralCurrency?, nominatorId?): Promise<MonetaryAmount<CollateralCurrencyExt>>
| Name | Type | Description |
|---|---|---|
vaultAccountId? |
AccountId |
Id of vault who is opted in to nomination |
collateralCurrency? |
CollateralCurrencyExt |
The collateral currency of the nominations |
nominatorId? |
AccountId |
Id of user who nominated to one or more vaults |
Promise<MonetaryAmount<CollateralCurrencyExt>>
The total nominated amount, filtered using the given parameters
Remarks
At least one of the parameters must be specified
src/parachain/nomination.ts:114
▸ isNominationEnabled(): Promise<boolean>
Promise<boolean>
A boolean value representing whether the vault nomination feature is enabled
src/parachain/nomination.ts:77
▸ isVaultOptedIn(accountId, collateralCurrency): Promise<boolean>
| Name | Type |
|---|---|
accountId |
AccountId |
collateralCurrency |
CollateralCurrencyExt |
Promise<boolean>
A boolean value
src/parachain/nomination.ts:95
▸ list(): Promise<Nomination[]>
Promise<Nomination[]>
All nominations for the wrapped currency set in the API
src/parachain/nomination.ts:81
▸ listNominatorRewards(): Promise<NominationData[]>
Promise<NominationData[]>
The rewards a nominator has accumulated, in wrapped token (e.g. interBTC, kBTC)
src/parachain/nomination.ts:86
▸ listVaults(): Promise<InterbtcPrimitivesVaultId[]>
Promise<InterbtcPrimitivesVaultId[]>
A list of all vaults that opted in to the nomination feature.
src/parachain/nomination.ts:90
▸ optIn(collateralCurrency): ExtrinsicData
| Name | Type | Description |
|---|---|---|
collateralCurrency |
CollateralCurrencyExt |
Currency to accept as nomination |
A submittable extrinsic and an event that is emitted when extrinsic is submitted.
Remarks
Function callable by vaults to opt in to the nomination feature
src/parachain/nomination.ts:62
▸ optOut(collateralCurrency): ExtrinsicData
| Name | Type | Description |
|---|---|---|
collateralCurrency |
CollateralCurrencyExt |
Currency to stop accepting as nomination |
A submittable extrinsic and an event that is emitted when extrinsic is submitted.
Remarks
Function callable by vaults to opt out of the nomination feature
src/parachain/nomination.ts:68
▸ setNominationEnabled(enabled): ExtrinsicData
| Name | Type |
|---|---|
enabled |
boolean |
A submittable extrinsic and an event that is emitted when extrinsic is submitted.
Remarks
Testnet utility function
src/parachain/nomination.ts:73
▸ withdrawCollateral(vaultAccountId, amount): Promise<ExtrinsicData>
| Name | Type | Description |
|---|---|---|
vaultAccountId |
AccountId |
Vault that collateral was nominated to |
amount |
MonetaryAmount<CollateralCurrencyExt> |
Amount to withdraw, as a Monetary.js object or ForeignAsset |
Promise<ExtrinsicData>
A submittable extrinsic and an event that is emitted when extrinsic is submitted.