"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isSigHashTypeValid = exports.SigHashType = void 0;
var SigHashType;
(function (SigHashType) {
    SigHashType[SigHashType["SIGHASH_ALL"] = 1] = "SIGHASH_ALL";
    SigHashType[SigHashType["SIGHASH_NONE"] = 2] = "SIGHASH_NONE";
    SigHashType[SigHashType["SIGHASH_SINGLE"] = 3] = "SIGHASH_SINGLE";
    SigHashType[SigHashType["SIGHASH_ANYONECANPAY"] = 128] = "SIGHASH_ANYONECANPAY";
})(SigHashType = exports.SigHashType || (exports.SigHashType = {}));
function isSigHashTypeValid(type) {
    if (type === SigHashType.SIGHASH_ALL)
        return true;
    if (type === SigHashType.SIGHASH_NONE)
        return true;
    if (type === SigHashType.SIGHASH_SINGLE)
        return true;
    if (type === (SigHashType.SIGHASH_ALL | SigHashType.SIGHASH_ANYONECANPAY))
        return true;
    if (type === (SigHashType.SIGHASH_NONE | SigHashType.SIGHASH_ANYONECANPAY))
        return true;
    if (type === (SigHashType.SIGHASH_SINGLE | SigHashType.SIGHASH_ANYONECANPAY))
        return true;
    return false;
}
exports.isSigHashTypeValid = isSigHashTypeValid;
//# sourceMappingURL=SigHashType.js.map