Constructs a new BlockTransaction
instance.
The category of the transaction (e.g., Mint, Auction).
The version of the transaction protocol.
The unique hash identifying the transaction.
The category of the transaction, indicating the type of transaction. This could be one of the predefined categories such as Mint, Auction, InstallUpgrade, etc.
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.
Static
fromJSONDeserializes a JSON object into an array of BlockTransaction
instances.
The input data
is expected to contain transaction hashes categorized by their types.
An array of BlockTransaction
instances.
const jsonData = { '0': ['hash1', 'hash2'], '1': ['hash3'] };
const transactions = BlockTransaction.fromJSON(jsonData);
console.log(transactions); // Outputs an array of BlockTransaction instances.
The serialized data representing transactions categorized by type.
Generated using TypeDoc
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.