Class NftRoyalty
Represents a Royalty type computed from value given in exchange for receiving an NFT.
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed record NftRoyalty : IRoyalty, IEquatable<NftRoyalty>
Constructors
| Edit this page View SourceNftRoyalty(EntityId, long, long, long, EntityId)
Public Constructor, an
NftRoyalty
is immutable after creation.
Declaration
public NftRoyalty(EntityId receiver, long numerator, long denominator, long fallbackAmount, EntityId fallbackToken)
Parameters
| Type | Name | Description |
|---|---|---|
| EntityId | receiver | Address receiving the royalty assessment. |
| long | numerator | The numerator portion of the assessment fraction of the value exchanged in return for the NFT. |
| long | denominator | The denominator portion of the assessment fraction of the value exchanged in return for the NFT. |
| long | fallbackAmount | The fixed amount of token or cryptocurrency that will be assessed from the receiver receiving the associated token(s) if the transaction transferring the token provides no other discernible exchange of value in payment. |
| EntityId | fallbackToken |
then native hBar crypto is assumed. |
Properties
| Edit this page View SourceDenominator
The denominator portion of the assessment fraction of the value exchanged in return for the NFT.
Declaration
public long Denominator { get; }
Property Value
| Type | Description |
|---|---|
| long |
Remarks
This is not expressed as a floating point number in order to avoid rounding errors inherent in computing platforms.
FallbackAmount
The fixed amount of token or cryptocurrency that will be assessed from the receiver receiving the associated token(s) if the transaction transferring the token provides no other discernible exchange of value in payment.
Declaration
public long FallbackAmount { get; }
Property Value
| Type | Description |
|---|---|
| long |
Remarks
Set to
0
if no fallback amount is required.
FallbackToken
The address id of the token type used to pay
the royalty if no other transfer value exists
in payment for the transfer of the associated token
or asset, if set to
None
then native hBar crypto is assumed.
Declaration
public EntityId FallbackToken { get; }
Property Value
| Type | Description |
|---|---|
| EntityId |
Numerator
The numerator portion of the assessment fraction of the value exchanged in return for the NFT.
Declaration
public long Numerator { get; }
Property Value
| Type | Description |
|---|---|
| long |
Remarks
This is not expressed as a floating point number in order to avoid rounding errors inherent in computing platforms.
Receiver
Holder receiving the royalty assessment.
Declaration
public EntityId Receiver { get; }
Property Value
| Type | Description |
|---|---|
| EntityId |
RoyaltyType
Identifies this royalty as an Nft Royalty type.
Declaration
public RoyaltyType RoyaltyType { get; }
Property Value
| Type | Description |
|---|---|
| RoyaltyType |