"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializePoqoSendVoteReq = serializePoqoSendVoteReq;
exports.deserializePoqoSendVoteReq = deserializePoqoSendVoteReq;
const TypeIdentifierEnum_1 = require("./enum/TypeIdentifierEnum");
const SpreadAppliedVoteHashReq_1 = require("./SpreadAppliedVoteHashReq");
const cPoqoSendVoteReqVersion = 1;
function serializePoqoSendVoteReq(stream, inp, root = false) {
    if (root) {
        stream.writeUInt16(TypeIdentifierEnum_1.TypeIdentifierEnum.cPoqoSendVoteReq);
    }
    stream.writeUInt8(cPoqoSendVoteReqVersion);
    (0, SpreadAppliedVoteHashReq_1.serializeSpreadAppliedVoteHashReq)(stream, inp);
}
function deserializePoqoSendVoteReq(stream) {
    const version = stream.readUInt8();
    if (version != cPoqoSendVoteReqVersion) {
        throw new Error('PoqoSendVoteReq version mismatch');
    }
    return (0, SpreadAppliedVoteHashReq_1.deserializeSpreadAppliedVoteHashReq)(stream);
}
//# sourceMappingURL=PoqoSendVoteReq.js.map