UNPKG

@ledgerhq/live-common

Version:
25 lines 1.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MarketChartApiResponseSchema = exports.SupportedCounterCurrenciesSchema = exports.SupportedCoinsSchema = exports.MarketCoinSchema = exports.GcDataTags = void 0; const zod_1 = require("zod"); var GcDataTags; (function (GcDataTags) { GcDataTags["Coins"] = "Coins"; GcDataTags["CounterCurrencies"] = "CounterCurrencies"; GcDataTags["ChartData"] = "ChartData"; })(GcDataTags || (exports.GcDataTags = GcDataTags = {})); // --- Zod Schemas --- exports.MarketCoinSchema = zod_1.z.object({ id: zod_1.z.string().min(1), name: zod_1.z.string().min(1), symbol: zod_1.z.string().min(1), }); exports.SupportedCoinsSchema = zod_1.z.array(exports.MarketCoinSchema); exports.SupportedCounterCurrenciesSchema = zod_1.z.array(zod_1.z.string().min(1)); const ChartDataPointSchema = zod_1.z.tuple([zod_1.z.number(), zod_1.z.number()]); exports.MarketChartApiResponseSchema = zod_1.z.object({ prices: zod_1.z.array(ChartDataPointSchema), market_caps: zod_1.z.array(ChartDataPointSchema), total_volumes: zod_1.z.array(ChartDataPointSchema), }); //# sourceMappingURL=types.js.map