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
CcdAmountAmount to send.
Receiver
AccountAddressAddress of the receiver account to which the amount will be sent.
Properties
Amount
Amount to send.
public CcdAmount Amount { get; init; }
Property Value
Receiver
Address of the receiver account to which the amount will be sent.
public AccountAddress Receiver { get; init; }
Property Value
Methods
Prepare(AccountAddress, AccountSequenceNumber, Expiry)
Prepares the account transaction payload for signing.
public PreparedAccountTransaction Prepare(AccountAddress sender, AccountSequenceNumber sequenceNumber, Expiry expiry)
Parameters
sender
AccountAddressAddress of the sender of the transaction.
sequenceNumber
AccountSequenceNumberAccount sequence number to use for the transaction.
expiry
ExpiryExpiration time of the transaction.
Returns
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.