Sha256: 87a10dc8b4f6b4d7a0fb4ca9229295c2aaf37ff85a0463e9a63bcf83dac26a1f

Contents?: true

Size: 872 Bytes

Versions: 1

Compression:

Stored size: 872 Bytes

Contents

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.customDataValidator = void 0;
const validators_1 = require("./validators");
const customDataV1Scheme = {
    version: validators_1.isEq(1),
    binary: validators_1.isBase64,
};
const customDataV2Scheme = {
    version: validators_1.isEq(2),
    data: validators_1.validatePipe(validators_1.isArray, (data) => data.every(validators_1.validatePipe(validators_1.isRequired(true), validators_1.isValidDataPair))),
};
const v1Validator = validators_1.validateByShema(customDataV1Scheme, validators_1.getError);
const v2Validator = validators_1.validateByShema(customDataV2Scheme, validators_1.getError);
exports.customDataValidator = validators_1.ifElse(validators_1.pipe(validators_1.prop('version'), validators_1.isEq(1)), v1Validator, v2Validator);
//# sourceMappingURL=custom-data.js.map

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
waves_lib-0.1.0 js/node_modules/@waves/waves-transactions/dist/validators/custom-data.js