Class TransactionV1

Represents a TransactionV1 object, including its hash, payload, and approvals.

Hierarchy

  • TransactionV1

Constructors

Properties

approvals: Approval[]

The approvals for the transaction.

hash: Hash

The hash of the transaction.

The payload of the transaction. A merge of header and body concepts from before.

APPROVALS_FIELD_INDEX: 2 = 2
HASH_FIELD_INDEX: 0 = 0
PAYLOAD_FIELD_INDEX: 1 = 1

Methods

  • Converts the TransactionV1 to a byte array for transmission or storage.

    Returns

    A Uint8Array representing the TransactionV1 instance in byte format.

    Returns Uint8Array

  • Validates the transaction by checking the transaction hash and the approval signatures.

    Throws

    Throws errors if validation fails.

    Returns boolean

  • Converts a JSON representation of a TransactionV1 to a TransactionV1 object.

    Returns

    A TransactionV1 object.

    Throws

    If parsing fails.

    Parameters

    • json: any

      A JSON representation of a TransactionV1.

    Returns TransactionV1

  • Converts the TransactionV1 object to a JSON representation.

    Returns

    A JSON version of the TransactionV1.

    Parameters

    Returns JsonTypes

Generated using TypeDoc