Class Transfer

Represents a transfer transaction, which can be either version 1 (V1) or version 2 (V2).

Hierarchy

  • Transfer

Constructors

Properties

The amount being transferred in the transaction.

The initiator address of the transfer, containing details about the sender.

gas: number

The gas used for the transfer.

id?: number

The optional ID of the transfer.

originTransferV1?: TransferV1
originTransferV2?: TransferV2
source: URef

The source URef (Universal Reference) of the transfer.

target: URef

The target URef (Universal Reference) of the transfer.

The optional account hash representing the recipient of the transfer.

transactionHash: TransactionHash

The transaction hash associated with the transfer.

Methods

  • Gets the version 1 transfer details if available.

    Returns

    The version 1 transfer details, or undefined if not present.

    Returns undefined | TransferV1

  • Gets the version 2 transfer details if available.

    Returns

    The version 2 transfer details, or undefined if not present.

    Returns undefined | TransferV2

  • Deserializes a Transfer instance from JSON. It can handle both version 1 and version 2 transfer formats.

    Returns

    A Transfer instance.

    Throws

    Error if the transfer format is invalid or unrecognized.

    Parameters

    • data: any

      The JSON data representing the transfer.

    Returns Transfer

Generated using TypeDoc