Class BlockTransaction

Represents a transaction within a block, identified by a category, version, and hash. Each BlockTransaction stores the category of the transaction, its version, and a unique hash.

Hierarchy

  • BlockTransaction

Constructors

Properties

Methods

Constructors

Properties

The category of the transaction, indicating the type of transaction. This could be one of the predefined categories such as Mint, Auction, InstallUpgrade, etc.

hash: Hash

The unique hash identifying the transaction. This hash serves as a reference to the transaction.

The version of the transaction, specifying the version of the transaction protocol.

Methods

  • Deserializes a JSON object into an array of BlockTransaction instances. The input data is expected to contain transaction hashes categorized by their types.

    Returns

    An array of BlockTransaction instances.

    Example

    const jsonData = { '0': ['hash1', 'hash2'], '1': ['hash3'] };
    const transactions = BlockTransaction.fromJSON(jsonData);
    console.log(transactions); // Outputs an array of BlockTransaction instances.

    Parameters

    • data: any

      The serialized data representing transactions categorized by type.

    Returns BlockTransaction[]

Generated using TypeDoc