UNPKG

@kamino-finance/scope-sdk

Version:
22 lines 772 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateFeedParam = validateFeedParam; exports.validatePricesParam = validatePricesParam; function validateFeedParam(feedParam) { if (feedParam) { const { feed, config } = feedParam; if (feed && config) { throw new Error('Only one of feed or config is allowed'); } } } function validatePricesParam(pricesParam) { if (pricesParam) { validateFeedParam(pricesParam); const { feed, config, prices } = pricesParam; if ((feed || config) && prices) { throw new Error(`Only one of feed, config, or prices is allowed. Received ${JSON.stringify(pricesParam)}`); } } } //# sourceMappingURL=Param.js.map