"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UtxoFullBlock = void 0;
const UtxoBlock_1 = require("../blocks/UtxoBlock");
const UtxoTransaction_1 = require("../transactions/UtxoTransaction");
class UtxoFullBlock extends UtxoBlock_1.UtxoBlock {
    constructor(data) {
        super(data);
        // Must be implemented in specific chain class
        this.transactionConstructor = UtxoTransaction_1.UtxoTransaction;
    }
    get transactions() {
        if (!this.data.tx)
            return [];
        const transactions = [];
        for (const txData of this.data.tx) {
            const modifiedTxData = Object.assign({ blockhash: this.stdBlockHash, time: this.unixTimestamp, confirmations: this.data.confirmations, blocktime: this.unixTimestamp }, txData);
            transactions.push(new this.transactionConstructor(modifiedTxData));
        }
        return transactions;
    }
}
exports.UtxoFullBlock = UtxoFullBlock;
//# sourceMappingURL=UtxoFullBlock.js.map