Show / Hide Table of Contents

Class TransferParams

Supports complex atomic multi-party multi-token and crypto transfers requests. Can support multi-account crypto transfers and/or multi-account token transfers in the same transaction. The crypto transfer list or token transfer list may be null if not used, however at least one transfer of some type must be defined to be valid.

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

Atomic multi-party HBAR transfer. Each negative amount is debited from the corresponding account and the sum across the list must net to zero:

// Atomic multi-party transfer: two senders each contribute 0.5 HBAR,
// one receiver takes the full 1 HBAR. Every negative amount must be
// authorized by the sending account's signatory, and the sum across
// the transfer list must be zero.
var receipt = await client.TransferAsync(new TransferParams
{
    CryptoTransfers = new[]
    {
        new CryptoTransfer(sender1, -50_000_000),
        new CryptoTransfer(sender2, -50_000_000),
        new CryptoTransfer(receiver, 100_000_000),
    }
});
Console.WriteLine($"Transfer status: {receipt.Status}");

Properties

| Edit this page View Source

CancellationToken

Optional Cancellation token that interrupts the transfer submission process.

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

CryptoTransfers

Transfer tinybars from an arbitrary set of accounts to another arbitrary set of accounts.

Declaration
public IEnumerable<CryptoTransfer>? CryptoTransfers { get; set; }
Property Value
Type Description
IEnumerable<CryptoTransfer>
| Edit this page View Source

NftTransfers

A list of NFTs transferred from an arbitrary set of accounts to another arbitrary set of accounts.

Declaration
public IEnumerable<NftTransfer>? NftTransfers { get; set; }
Property Value
Type Description
IEnumerable<NftTransfer>
| Edit this page View Source

Signatory

Additional private key, keys or signing callback method required to authorize the transfers. Typically matches the Endorsement assigned to sending accounts.

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

TokenTransfers

A list of tokens transferred from an arbitrary set of accounts to another arbitrary set of accounts.

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