Show / Hide Table of Contents

Class AllowanceParams

Allowance Creation and Adjustment Parameters

Inheritance
object
TransactionParams
TransactionParams<TransactionReceipt>
AllowanceParams
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 class AllowanceParams : TransactionParams<TransactionReceipt>
Examples

Grant another account the right to spend up to a fixed amount of HBAR from the owning account (who must be the transaction Payer):

// Grant `spender` the right to spend up to 5 HBAR from `owner`.
// Owner must be the client's Payer — allowances always originate
// from the transaction payer. Setting Amount = 0 revokes the grant.
var receipt = await client.AllocateAllowanceAsync(new AllowanceParams
{
    CryptoAllowances = new[]
    {
        new CryptoAllowance(owner, spender, 500_000_000) // 5 HBAR
    }
});
Console.WriteLine($"Allowance status: {receipt.Status}");

Properties

| Edit this page View Source

CancellationToken

Optional Cancellation token that can interrupt the allowance update process.

Declaration
public CancellationToken? CancellationToken { get; set; }
Property Value
Type Description
CancellationToken?
| Edit this page View Source

CryptoAllowances

A list of accounts and allocated allowances that each account may sign transactions moving crypto out of this account up to the specified limit.

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

NftAllowances

A list of accounts and allocated allowances that each account may sign transactions moving NFTs out of this account up to the specified limit.

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

Signatory

Additional private key, keys or signing callback method required to authorize the transaction.

Declaration
public Signatory? Signatory { get; set; }
Property Value
Type Description
Signatory
Remarks

Keys/callbacks added here will be combined with those already identified in the client object's context when signing this transaction to change the state of this account.

| Edit this page View Source

TokenAllowances

A list of accounts and allocated allowances that each account may sign transactions moving tokens out of this account up to the specified limit.

Declaration
public IReadOnlyList<TokenAllowance>? TokenAllowances { get; set; }
Property Value
Type Description
IReadOnlyList<TokenAllowance>
  • Edit this page
  • View Source
In this article
Back to top .NET Client Library for Hiero Network and Hedera Hashgraph