Class TransactionEntryPoint

Represents a transaction entry point, which defines an action to be executed within the system. This class supports predefined entry points as well as custom-defined actions.

Hierarchy

  • TransactionEntryPoint

Constructors

Properties

customEntryPoint?: string

Custom entry point identifier, used when the type is Custom.

The type of transaction entry point, represented as an enum.

Methods

  • Retrieves the unique tag associated with the transaction entry point. Tags are used to identify entry points in a compact and efficient manner.

    Returns

    The tag number for the entry point.

    Throws

    An error if the entry point is unknown.

    Returns number

  • Serializes the transaction entry point into a byte array.

    Returns

    A Uint8Array representing the transaction entry point and any associated data.

    Returns Uint8Array

  • Converts the transaction entry point to a JSON-compatible format.

    Returns

    A JSON object representing the transaction entry point.

    Returns unknown

  • Deserializes a TransactionEntryPoint from its byte representation.

    This method takes a serialized byte array and reconstructs a TransactionEntryPoint object. It supports multiple entry point types, including both predefined and custom entry points.

    Returns

    A deserialized TransactionEntryPoint instance.

    Throws

    Will throw an error if the byte array is invalid or has missing fields.

    Example

    const serializedBytes = new Uint8Array([0, 1, 2, 3, ...]);
    const entryPoint = TransactionEntryPoint.fromBytes(serializedBytes);
    console.log(entryPoint.type); // Logs the entry point type

    Parameters

    • bytes: Uint8Array

      The byte array representing the serialized TransactionEntryPoint.

    Returns TransactionEntryPoint

Generated using TypeDoc