Table of Contents

Class Transfer

Namespace
Concordium.Sdk.Transactions
Assembly
Concordium.Sdk.dll

Represents a "transfer" account transaction.

Used for transferring CCD from one account to another.

public sealed record Transfer : AccountTransactionPayload, IEquatable<AccountTransactionPayload>, IEquatable<Transfer>
Inheritance
Transfer
Implements
Inherited Members

Constructors

Transfer(CcdAmount, AccountAddress)

Represents a "transfer" account transaction.

Used for transferring CCD from one account to another.

public Transfer(CcdAmount Amount, AccountAddress Receiver)

Parameters

Amount CcdAmount

Amount to send.

Receiver AccountAddress

Address of the receiver account to which the amount will be sent.

Properties

Amount

Amount to send.

public CcdAmount Amount { get; init; }

Property Value

CcdAmount

Receiver

Address of the receiver account to which the amount will be sent.

public AccountAddress Receiver { get; init; }

Property Value

AccountAddress

Methods

Prepare(AccountAddress, AccountSequenceNumber, Expiry)

Prepares the account transaction payload for signing.

public PreparedAccountTransaction Prepare(AccountAddress sender, AccountSequenceNumber sequenceNumber, Expiry expiry)

Parameters

sender AccountAddress

Address of the sender of the transaction.

sequenceNumber AccountSequenceNumber

Account sequence number to use for the transaction.

expiry Expiry

Expiration time of the transaction.

Returns

PreparedAccountTransaction

ToBytes()

Copies the "transfer" account transaction in the binary format expected by the node to a byte array.

public override byte[] ToBytes()

Returns

byte[]

TryDeserial(ReadOnlySpan<byte>, out (Transfer? Transfer, string? Error))

Create a "transfer" payload from a serialized as bytes.

public static bool TryDeserial(ReadOnlySpan<byte> bytes, out (Transfer? Transfer, string? Error) output)

Parameters

bytes ReadOnlySpan<byte>

The "transfer" payload as bytes.

output (Transfer Transfer, string Error)

Where to write the result of the operation.

Returns

bool