redstone-sdk
Advanced tools
Comparing version
@@ -10,3 +10,3 @@ "use strict"; | ||
], | ||
// TODO: NOT DEPLOYED YET "redstone-primary-demo": [], | ||
"redstone-primary-demo": [DEMO_URL], | ||
"redstone-avalanche-prod": [ | ||
@@ -13,0 +13,0 @@ "https://oracle-gateway-1.a.redstone.finance", |
@@ -40,2 +40,3 @@ import { BigNumber } from "ethers"; | ||
export * from "./contracts/prices/IPricesContractAdapter"; | ||
export * from "./data-feed-values"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -27,3 +27,2 @@ "use strict"; | ||
const data_services_urls_1 = require("./data-services-urls"); | ||
const ALL_FEEDS_KEY = "___ALL_FEEDS___"; | ||
const DEFAULT_DECIMALS = 8; | ||
@@ -46,3 +45,3 @@ const getOracleRegistryState = async () => { | ||
const parsedResponse = {}; | ||
const requestedDataFeedIds = (_a = reqParams.dataFeeds) !== null && _a !== void 0 ? _a : [ALL_FEEDS_KEY]; | ||
const requestedDataFeedIds = (_a = reqParams.dataFeeds) !== null && _a !== void 0 ? _a : [redstone_protocol_1.consts.ALL_FEEDS_KEY]; | ||
for (const dataFeedId of requestedDataFeedIds) { | ||
@@ -71,4 +70,4 @@ const dataFeedPackages = dpResponse[dataFeedId]; | ||
} | ||
if (dataFeedId === ALL_FEEDS_KEY) { | ||
throw new Error(`Cannot sort data packages by deviation for ${ALL_FEEDS_KEY}`); | ||
if (dataFeedId === redstone_protocol_1.consts.ALL_FEEDS_KEY) { | ||
throw new Error(`Cannot sort data packages by deviation for ${redstone_protocol_1.consts.ALL_FEEDS_KEY}`); | ||
} | ||
@@ -166,2 +165,3 @@ if (!valuesToCompare[dataFeedId]) { | ||
__exportStar(require("./contracts/prices/IPricesContractAdapter"), exports); | ||
__exportStar(require("./data-feed-values"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "redstone-sdk", | ||
"prettier": "redstone-prettier-config", | ||
"version": "1.6.1", | ||
"version": "1.7.0", | ||
"main": "dist/src/index.js", | ||
@@ -6,0 +6,0 @@ "types": "dist/src/index.d.ts", |
@@ -8,3 +8,3 @@ const DEMO_URL = "https://d33trozg86ya9x.cloudfront.net"; | ||
], | ||
// TODO: NOT DEPLOYED YET "redstone-primary-demo": [], | ||
"redstone-primary-demo": [DEMO_URL], | ||
"redstone-avalanche-prod": [ | ||
@@ -11,0 +11,0 @@ "https://oracle-gateway-1.a.redstone.finance", |
@@ -12,2 +12,3 @@ import axios from "axios"; | ||
SignedDataPackagePlainObj, | ||
consts, | ||
} from "redstone-protocol"; | ||
@@ -17,3 +18,2 @@ import { SafeNumber } from "redstone-utils"; | ||
const ALL_FEEDS_KEY = "___ALL_FEEDS___"; | ||
const DEFAULT_DECIMALS = 8; | ||
@@ -63,3 +63,3 @@ | ||
const requestedDataFeedIds = reqParams.dataFeeds ?? [ALL_FEEDS_KEY]; | ||
const requestedDataFeedIds = reqParams.dataFeeds ?? [consts.ALL_FEEDS_KEY]; | ||
@@ -108,5 +108,5 @@ for (const dataFeedId of requestedDataFeedIds) { | ||
if (dataFeedId === ALL_FEEDS_KEY) { | ||
if (dataFeedId === consts.ALL_FEEDS_KEY) { | ||
throw new Error( | ||
`Cannot sort data packages by deviation for ${ALL_FEEDS_KEY}` | ||
`Cannot sort data packages by deviation for ${consts.ALL_FEEDS_KEY}` | ||
); | ||
@@ -244,1 +244,2 @@ } | ||
export * from "./contracts/prices/IPricesContractAdapter"; | ||
export * from "./data-feed-values"; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
76322
11.88%64
8.47%1255
11.46%