Socket
Socket
Sign inDemoInstall

limestone-api

Package Overview
Dependencies
13
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.13 to 2.0.0

2

lib/config.json
{
"version": "0.2"
"version": "2"
}

@@ -31,3 +31,3 @@ import ArweaveProxy from "./proxies/arweave-proxy";

* @param opts - Options object. It must contain the date property.
* * date: Date for the historical price (date)
* * date: Date for the historical price
* @returns The historical price for token

@@ -47,4 +47,4 @@ *

* @param opts - Options object. It must contain startDate, endDate, and interval properties.
* * startDate: Start time for the time range (date)
* * endDate: End time for the time range (date)
* * startDate: Start time for the time range (date | timestamp | string)
* * endDate: End time for the time range (date | timestamp | string)
* * interval: Interval in miliseconds (number)

@@ -60,3 +60,3 @@ * @returns The historical prices for the symbol with the passed interval

* @param opts - Options object. It must contain the date property.
* * date: Date for the historical price (date)
* * date: Date for the historical price (date | timestamp | string)
* @returns The historical prices for several tokens

@@ -63,0 +63,0 @@ *

@@ -128,3 +128,3 @@ "use strict";

symbols: symbolOrSymbols,
timestamp: opts.date.getTime(),
timestamp: getTimestamp(opts.date),
provider: provider,

@@ -141,4 +141,4 @@ shouldVerifySignature: shouldVerifySignature,

symbol: symbolOrSymbols,
fromTimestamp: opts.startDate.getTime(),
toTimestamp: opts.endDate.getTime(),
fromTimestamp: getTimestamp(opts.startDate),
toTimestamp: getTimestamp(opts.endDate),
interval: opts.interval,

@@ -151,3 +151,3 @@ provider: provider,

symbol: symbolOrSymbols,
timestamp: opts.date.getTime(),
timestamp: getTimestamp(opts.date),
provider: provider,

@@ -429,2 +429,5 @@ shouldVerifySignature: shouldVerifySignature,

exports.default = LimestoneApi;
function getTimestamp(date) {
return new Date(date).getTime();
}
function convertToUserFacingFormat(price) {

@@ -431,0 +434,0 @@ var result = lodash_1.default.omit(price, ["version", "signature", "providerPublicKey"]);

@@ -0,1 +1,2 @@

export declare type ConvertableToDate = Date | number | string;
export interface LimestoneApiConfig {

@@ -29,8 +30,8 @@ useCache?: boolean;

export interface GetHistoricalPriceOptions extends GetPriceOptions {
date: Date;
date: ConvertableToDate;
}
export interface GetHistoricalPriceForIntervalOptions extends GetPriceOptions {
startDate: Date;
endDate: Date;
startDate: ConvertableToDate;
endDate: ConvertableToDate;
interval: number;
}
{
"name": "limestone-api",
"version": "0.2.13",
"version": "2.0.0",
"description": "Javascript library for fetching trusted token pricing data from Limestone data ecosystem",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc