UNPKG

@ledgerhq/live-common

Version:
30 lines 1.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FearAndGreedIndexSchema = exports.FearAndGreedResponseSchema = exports.FearAndGreedTags = void 0; const zod_1 = require("zod"); var FearAndGreedTags; (function (FearAndGreedTags) { FearAndGreedTags["Latest"] = "FearAndGreedLatest"; })(FearAndGreedTags || (exports.FearAndGreedTags = FearAndGreedTags = {})); const FearAndGreedDataSchema = zod_1.z.object({ value: zod_1.z.number().min(0).max(100), value_classification: zod_1.z.string(), update_time: zod_1.z.string(), }); const FearAndGreedStatusSchema = zod_1.z.object({ timestamp: zod_1.z.string(), error_code: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]), error_message: zod_1.z.string(), elapsed: zod_1.z.number(), credit_count: zod_1.z.number(), notice: zod_1.z.string().optional(), }); exports.FearAndGreedResponseSchema = zod_1.z.object({ data: FearAndGreedDataSchema, status: FearAndGreedStatusSchema, }); exports.FearAndGreedIndexSchema = zod_1.z.object({ value: zod_1.z.number().min(0).max(100), classification: zod_1.z.string(), }); //# sourceMappingURL=types.js.map