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.
Inherited Members
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 SourceCancellationToken
Optional Cancellation token that interrupts the transfer submission process.
Declaration
public CancellationToken? CancellationToken { get; set; }
Property Value
| Type | Description |
|---|---|
| CancellationToken? |
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> |
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> |
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.
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> |