Class TokenAllowance
Represents an allowance allocation permitting a delegate 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 an agent account privileges of spending the specified amount of tokens from the owning account.
Declaration
public TokenAllowance(EntityId token, EntityId owner, EntityId agent, 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 delegate. |
| EntityId | agent | The account that may spend the allocated allowance of tokens. |
| long | amount | The increase or decrease of the amount of tokens that the delegate 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 SourceAgent
The account that may spend the allocated allowance of tokens.
Declaration
public EntityId Agent { get; }
Property Value
| Type | Description |
|---|---|
| EntityId |
Amount
The increase or decrease of the amount of tokens that the delegate 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 delegate.
Declaration
public EntityId Owner { 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 |