UNPKG

lisk-framework

Version:

Lisk blockchain application platform

40 lines 1.34 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BlsKeyRegistrationEvent = exports.blsKeyRegDataSchema = void 0; const base_event_1 = require("../../base_event"); const constants_1 = require("../constants"); exports.blsKeyRegDataSchema = { $id: '/validators/event/blsKeyRegData', type: 'object', required: ['blsKey', 'proofOfPossession', 'result'], properties: { blsKey: { dataType: 'bytes', minLength: constants_1.BLS_PUBLIC_KEY_LENGTH, maxLength: constants_1.BLS_PUBLIC_KEY_LENGTH, fieldNumber: 1, }, proofOfPossession: { dataType: 'bytes', minLength: constants_1.BLS_POP_LENGTH, maxLength: constants_1.BLS_POP_LENGTH, fieldNumber: 2, }, result: { dataType: 'uint32', fieldNumber: 3, }, }, }; class BlsKeyRegistrationEvent extends base_event_1.BaseEvent { constructor() { super(...arguments); this.schema = exports.blsKeyRegDataSchema; } log(ctx, validatorAddress, data) { const noRevert = data.result !== 0; this.add(ctx, data, [validatorAddress], noRevert); } } exports.BlsKeyRegistrationEvent = BlsKeyRegistrationEvent; //# sourceMappingURL=bls_key_registration.js.map