Class CryptoAllowance
Represents an allowance allocation permitting a spender account privileges of spending the specified amount of hBars from the owning account.
Implements
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed record CryptoAllowance : IEquatable<CryptoAllowance>
Constructors
| Edit this page View SourceCryptoAllowance(EntityId, EntityId, long)
Represents an allowance allocation permitting a delegate account privileges of spending the specified amount of hBars from the owning account.
Declaration
public CryptoAllowance(EntityId owner, EntityId spender, long amount)
Parameters
| Type | Name | Description |
|---|---|---|
| EntityId | owner | The account holding the hBars that may be spent by the delegate spender. |
| EntityId | spender | The account that may spend the allocated allowance of hBars |
| long | amount | The amount, in tinybars, that the spender may spend from the owner's account. Setting an allowance replaces any earlier one for the same owner and spender; zero revokes it. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | If any of the addresses are null or empty. |
| ArgumentOutOfRangeException | If the amount of allowance is less than zero. |
Properties
| Edit this page View SourceAmount
The amount, in tinybars, that the spender may spend from the owner's account. Setting an allowance replaces any earlier one for the same owner and spender; zero revokes it.
Declaration
public long Amount { get; }
Property Value
| Type | Description |
|---|---|
| long |
Owner
The account holding the hBars that may be spent by the delegate spender.
Declaration
public EntityId Owner { get; }
Property Value
| Type | Description |
|---|---|
| EntityId |
Spender
The account that may spend the allocated allowance of hBars
Declaration
public EntityId Spender { get; }
Property Value
| Type | Description |
|---|---|
| EntityId |