UNPKG

@parifi/sdk

Version:

Parifi SDK with common utility functions

47 lines (46 loc) 1.67 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/pyth/pythMapper.ts var pythMapper_exports = {}; __export(pythMapper_exports, { mapPythPriceResponseToInterface: () => mapPythPriceResponseToInterface }); module.exports = __toCommonJS(pythMapper_exports); var mapPythPriceResponseToInterface = (response) => { return response.map((item) => ({ id: item.id || "", price: { price: item.price.price || "0", conf: item.price.conf || "0", expo: item.price.expo || 0, publish_time: item.price.publish_time || 0 }, ema_price: { price: item.ema_price.price || "0", conf: item.ema_price.conf || "0", expo: item.ema_price.expo || 0, publish_time: item.ema_price.publish_time || 0 } })); }; // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { mapPythPriceResponseToInterface }); //# sourceMappingURL=pythMapper.js.map