Class PayloadFields

Class representing a collection of fields used in transaction serialization. This class handles serialization and deserialization of transaction data fields.

Hierarchy

  • PayloadFields

Constructors

Properties

args: Args

Arguments for the transaction.

Entry point for the transaction execution.

fields: Map<number, Uint8Array> = ...

Internal map to store serialized fields, where the key is the field identifier.

Scheduling details for the transaction execution.

Target destination of the transaction.

Methods

  • Adds a serialized field to the payload.

    Parameters

    • field: number

      Field identifier.

    • value: Uint8Array

      Serialized value of the field.

    Returns void

  • Retrieves the value of a specific field.

    Returns

    Serialized value of the field.

    Parameters

    • fieldIndex: number

      Identifier of the field.

    Returns undefined | Uint8Array

  • Serializes the fields of the object into a Uint8Array for transmission or storage.

    This method iterates over the fields map, serializing each key-value pair. The key is written as a 16-bit unsigned integer, and the value is written as a sequence of bytes. The resulting byte array contains all serialized fields in order, preceded by the number of fields.

    Returns

    A Uint8Array containing the serialized representation of the fields.

    Returns Uint8Array

Generated using TypeDoc