lisk-framework
Version:
Lisk blockchain application platform
64 lines • 1.9 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.getValidatorResponseSchema = exports.getValidatorRequestSchema = exports.validateBLSKeyResponseSchema = exports.validateBLSKeyRequestSchema = void 0;
const constants_1 = require("./constants");
exports.validateBLSKeyRequestSchema = {
$id: '/validators/endpoint/validateBLSKeyRequest',
title: 'Bls Key Properties',
type: 'object',
properties: {
proofOfPossession: {
type: 'string',
format: 'hex',
minLength: constants_1.BLS_POP_LENGTH * 2,
maxLength: constants_1.BLS_POP_LENGTH * 2,
},
blsKey: {
type: 'string',
format: 'hex',
minLength: constants_1.BLS_PUBLIC_KEY_LENGTH * 2,
maxLength: constants_1.BLS_PUBLIC_KEY_LENGTH * 2,
},
},
required: ['proofOfPossession', 'blsKey'],
};
exports.validateBLSKeyResponseSchema = {
$id: '/validators/endpoint/validateBLSKeyResponse',
title: 'Bls Key Properties',
type: 'object',
properties: {
valid: {
type: 'boolean',
},
},
required: ['valid'],
};
exports.getValidatorRequestSchema = {
$id: '/validators/endpoint/getValidatorRequest',
title: 'Validator properties',
type: 'object',
properties: {
address: {
dataType: 'string',
format: 'lisk32',
},
},
required: ['address'],
};
exports.getValidatorResponseSchema = {
$id: '/validators/endpoint/getValidatorResponse',
title: 'Validator properties',
type: 'object',
properties: {
generatorKey: {
type: 'string',
format: 'hex',
},
blsKey: {
type: 'string',
format: 'hex',
},
},
required: ['generatorKey', 'blsKey'],
};
//# sourceMappingURL=schemas.js.map
;