@desig/web3
Version:
Desig: The Blockchain-Agnostic Multisig Solution
21 lines • 710 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MZkProofParser = void 0;
const proto_1 = require("../../proto");
class MZkProofParser {
constructor() {
this.encode = (data) => {
const er = proto_1.multisig.ZKProof.verify(data);
if (er)
throw new Error(er);
const msg = proto_1.multisig.ZKProof.create(data);
return proto_1.multisig.ZKProof.encode(msg).finish();
};
this.decode = (buf) => {
const data = proto_1.multisig.ZKProof.decode(buf);
return data;
};
}
}
exports.MZkProofParser = MZkProofParser;
//# sourceMappingURL=multisig.parser.js.map