@nevermined-io/sdk - v3.1.2 / AssetPrice
• new AssetPrice(): AssetPrice
• new AssetPrice(_rewards): AssetPrice
| Name | Type |
|---|---|
_rewards |
Map<string, bigint> |
• new AssetPrice(address, amount): AssetPrice
| Name | Type |
|---|---|
address |
string |
amount |
bigint |
• new AssetPrice(address, amount, tokenAddress): AssetPrice
| Name | Type |
|---|---|
address |
string |
amount |
bigint |
tokenAddress |
string |
• Private rewards: Map<string, bigint>
• Private Optional tokenAddress: string
• Private totalPrice: bigint
▸ addNetworkFees(feeReceiver, networkFeePercent): AssetPrice
It adds network fees on top of the already configured asset rewards
| Name | Type | Description |
|---|---|---|
feeReceiver |
string |
the address receiving the fees |
networkFeePercent |
bigint |
the percent of fees to receive, it uses the contract denominator |
the asset rewards object
See
AssetPrice.NETWORK_FEE_DENOMINATOR
▸ adjustToIncludeNetworkFees(feeReceiver, networkFeePercent): AssetPrice
It includes network fees on the existing asset rewards subtracting the proportion taking into account the receivers percent
| Name | Type | Description |
|---|---|---|
feeReceiver |
string |
the address receiving the fees |
networkFeePercent |
bigint |
the percent of fees to receive, it uses the contract denominator |
the asset rewards object
See
AssetPrice.NETWORK_FEE_DENOMINATOR
▸ getAmounts(): bigint[]
bigint[]
▸ getAmountsString(): string
string
▸ getReceivers(): string[]
string[]
▸ getReceiversString(): string
string
▸ getRewards(): Map<string, bigint>
Map<string, bigint>
▸ getTokenAddress(): string
string
▸ getTotalPrice(): bigint
bigint
▸ setReceiver(receiver, amount): AssetPrice
| Name | Type |
|---|---|
receiver |
string |
amount |
bigint |
▸ setTokenAddress(address): AssetPrice
| Name | Type |
|---|---|
address |
string |
▸ toString(): string
string
▸ sumAmounts(amounts): bigint
| Name | Type |
|---|---|
amounts |
bigint[] |
bigint