Skip to main content

AssetPrice

@nevermined-io/sdk - v3.0.40 / AssetPrice

Class: AssetPrice

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new AssetPrice(): AssetPrice

Returns

AssetPrice

Defined in

src/models/AssetPrice.ts:10

new AssetPrice(_rewards): AssetPrice

Parameters

NameType
_rewardsMap\<string, bigint>

Returns

AssetPrice

Defined in

src/models/AssetPrice.ts:11

new AssetPrice(address, amount): AssetPrice

Parameters

NameType
addressstring
amountbigint

Returns

AssetPrice

Defined in

src/models/AssetPrice.ts:12

new AssetPrice(address, amount, tokenAddress): AssetPrice

Parameters

NameType
addressstring
amountbigint
tokenAddressstring

Returns

AssetPrice

Defined in

src/models/AssetPrice.ts:13

Properties

rewards

Private rewards: Map\<string, bigint>

Defined in

src/models/AssetPrice.ts:6


tokenAddress

Private Optional tokenAddress: string

Defined in

src/models/AssetPrice.ts:8


totalPrice

Private totalPrice: bigint

Defined in

src/models/AssetPrice.ts:4

Methods

addNetworkFees

addNetworkFees(feeReceiver, networkFeePercent): AssetPrice

It adds network fees on top of the already configured asset rewards

Parameters

NameTypeDescription
feeReceiverstringthe address receiving the fees
networkFeePercentbigintthe percent of fees to receive, it uses the contract denominator

Returns

AssetPrice

the asset rewards object

See

AssetPrice.NETWORK_FEE_DENOMINATOR

Defined in

src/models/AssetPrice.ts:77


adjustToIncludeNetworkFees

adjustToIncludeNetworkFees(feeReceiver, networkFeePercent): AssetPrice

It includes network fees on the existing asset rewards subtracting the proportion taking into account the receivers percent

Parameters

NameTypeDescription
feeReceiverstringthe address receiving the fees
networkFeePercentbigintthe percent of fees to receive, it uses the contract denominator

Returns

AssetPrice

the asset rewards object

See

AssetPrice.NETWORK_FEE_DENOMINATOR

Defined in

src/models/AssetPrice.ts:88


getAmounts

getAmounts(): bigint[]

Returns

bigint[]

Defined in

src/models/AssetPrice.ts:46


getAmountsString

getAmountsString(): string

Returns

string

Defined in

src/models/AssetPrice.ts:104


getReceivers

getReceivers(): string[]

Returns

string[]

Defined in

src/models/AssetPrice.ts:50


getReceiversString

getReceiversString(): string

Returns

string

Defined in

src/models/AssetPrice.ts:110


getRewards

getRewards(): Map\<string, bigint>

Returns

Map\<string, bigint>

Defined in

src/models/AssetPrice.ts:42


getTokenAddress

getTokenAddress(): string

Returns

string

Defined in

src/models/AssetPrice.ts:67


getTotalPrice

getTotalPrice(): bigint

Returns

bigint

Defined in

src/models/AssetPrice.ts:38


setReceiver

setReceiver(receiver, amount): AssetPrice

Parameters

NameType
receiverstring
amountbigint

Returns

AssetPrice

Defined in

src/models/AssetPrice.ts:54


setTokenAddress

setTokenAddress(address): AssetPrice

Parameters

NameType
addressstring

Returns

AssetPrice

Defined in

src/models/AssetPrice.ts:62


toString

toString(): string

Returns

string

Defined in

src/models/AssetPrice.ts:115


sumAmounts

sumAmounts(amounts): bigint

Parameters

NameType
amountsbigint[]

Returns

bigint

Defined in

src/models/AssetPrice.ts:34