Class TokenAllowance
Represents an allowance allocation permitting a spender account privileges of spending the specified amount of tokens from the owning account.
Implements
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed record TokenAllowance : IEquatable<TokenAllowance>
Constructors
| Edit this page View SourceTokenAllowance(EntityId, EntityId, EntityId, long)
Represents an allowance allocation permitting a spender account privileges of spending the specified amount of tokens from the owning account.
Declaration
public TokenAllowance(EntityId token, EntityId owner, EntityId spender, long amount)
Parameters
| Type | Name | Description |
|---|---|---|
| EntityId | token | The address of the token that has the allocated allowance. |
| EntityId | owner | The Address owner holding the tokens that may be spent by the spender. |
| EntityId | spender | The account that may spend the allocated allowance of tokens. |
| long | amount | The increase or decrease of the amount of tokens that the spender may spend. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | If any of the addresses are null or None. |
| ArgumentOutOfRangeException | If the amount is negative. |
Properties
| Edit this page View SourceAmount
The increase or decrease of the amount of tokens that the spender may spend.
Declaration
public long Amount { get; }
Property Value
| Type | Description |
|---|---|
| long |
Owner
The Address owner holding the tokens that may be spent by the spender.
Declaration
public EntityId Owner { get; }
Property Value
| Type | Description |
|---|---|
| EntityId |
Spender
The account that may spend the allocated allowance of tokens.
Declaration
public EntityId Spender { get; }
Property Value
| Type | Description |
|---|---|
| EntityId |
Token
The address of the token that has the allocated allowance.
Declaration
public EntityId Token { get; }
Property Value
| Type | Description |
|---|---|
| EntityId |