Show / Hide Table of Contents

Class NftAllowance

Represents an allowance allocation permitting a spender account privileges of spending the specified NFT(s) from the owning account.

Inheritance
object
NftAllowance
Implements
IEquatable<NftAllowance>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed record NftAllowance : IEquatable<NftAllowance>

Constructors

| Edit this page View Source

NftAllowance(EntityId, EntityId, EntityId, IReadOnlyList<long>?, EntityId?)

Represents an allowance allocation permitting a spender account privileges of spending the specified amount assets from the owning account.

Declaration
public NftAllowance(EntityId token, EntityId owner, EntityId spender, IReadOnlyList<long>? serialNumbers = null, EntityId? ownersDelegate = null)
Parameters
Type Name Description
EntityId token

The address of the NFT's token definition having the allocated allowance.

EntityId owner

The Address owner holding the NFT(s) that may be spent by the spender.

EntityId spender

The account that may spend the allocated allowance of NFT(s).

IReadOnlyList<long> serialNumbers
The explicit list of serial numbers that
can be spent by the spender.  If the value
is 
null

then all NFTs of the token class may be spent.

EntityId ownersDelegate

The optional delegating account controlling NFTs for the owner.

Exceptions
Type Condition
ArgumentException

If any of the addresses are null or empty.

| Edit this page View Source

NftAllowance(Nft, EntityId, EntityId, EntityId?)

Represents an allowance allocation permitting a spender account privileges of spending the specified NFT instance from the owning account.

Declaration
public NftAllowance(Nft asset, EntityId owner, EntityId spender, EntityId? ownersDelegate = null)
Parameters
Type Name Description
Nft asset

Single NFT instance to grant the allowance.

EntityId owner

The Address owner holding the NFT that may be spent by the spender.

EntityId spender

The account that may spend the allocated allowance of NFT.

EntityId ownersDelegate

The optional delegating account controlling NFTs for the owner.

Remarks

Convenience constructor for a singular NFT allowance.

Exceptions
Type Condition
ArgumentException

If any of the addresses are null or empty.

Properties

| Edit this page View Source

Owner

The account holding the NFT(s) that may be spent by the delegate spender.

Declaration
public EntityId Owner { get; }
Property Value
Type Description
EntityId
| Edit this page View Source

OwnersDelegate

An account, approved by the owner, that is given access to all of the Owner's NFTs of this class, and can therefore in turn allocate a specific NFT instance to a 3rd party to sell on behalf of the original owner.

Declaration
public EntityId OwnersDelegate { get; }
Property Value
Type Description
EntityId
| Edit this page View Source

SerialNumbers

The explicit list of serial numbers that
can be spent by the delegate.  If the value
is 
null

then all assets of the token class may be spent. If the list is empty, it means all of the identified assets with specific serial numbers have already been removed from the account.

Declaration
public IReadOnlyList<long>? SerialNumbers { get; }
Property Value
Type Description
IReadOnlyList<long>
| Edit this page View Source

Spender

The account that may spend the allocated allowance of NFT(s).

Declaration
public EntityId Spender { get; }
Property Value
Type Description
EntityId
| Edit this page View Source

Token

The address of the NFT's token definition having the allocated allowance.

Declaration
public EntityId Token { get; }
Property Value
Type Description
EntityId

Implements

IEquatable<T>
  • Edit this page
  • View Source
In this article
Back to top .NET Client Library for Hiero Network and Hedera Hashgraph