"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const light_1 = require("protobufjs/light");
const protobuf_1 = require("../../protobuf");
const EMPTY_BUFFER = Buffer.allocUnsafe(0);
/**
 * ByzCoin metadata
 */
class DataHeader extends light_1.Message {
    constructor(props) {
        super(props);
        this.trieRoot = Buffer.from(this.trieRoot || EMPTY_BUFFER);
        this.clientTransactionHash = Buffer.from(this.clientTransactionHash || EMPTY_BUFFER);
        this.stateChangeHash = Buffer.from(this.stateChangeHash || EMPTY_BUFFER);
        /* Protobuf aliases */
        Object.defineProperty(this, "trieroot", {
            get() {
                return this.trieRoot;
            },
            set(value) {
                this.trieRoot = value;
            },
        });
        Object.defineProperty(this, "clienttransactionhash", {
            get() {
                return this.clientTransactionHash;
            },
            set(value) {
                this.clientTransactionHash = value;
            },
        });
        Object.defineProperty(this, "statechangehash", {
            get() {
                return this.stateChangeHash;
            },
            set(value) {
                this.stateChangeHash = value;
            },
        });
    }
    /**
     * @see README#Message classes
     */
    static register() {
        protobuf_1.registerMessage("byzcoin.DataHeader", DataHeader);
    }
}
exports.default = DataHeader;
DataHeader.register();
