aftermath-ts-sdk 0.0.144 → 0.0.146
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coinGeckoApiHelpers.d.ts","sourceRoot":"","sources":["../../../../src/general/prices/coingecko/coinGeckoApiHelpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAE9E,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAEzE,qBAAa,mBAAmB;IAKnB,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAAf,eAAe,EAAE,MAAM;IAU7C,gBAAgB,QAAa,QACnC,OAAO,QAAQ,EAAE,iBAAiB,CAAC,CACnC,CA2CC;IAMK,mBAAmB,WAAkB;QAC3C,SAAS,EAAE,kBAAkB,CAAC;QAC9B,OAAO,EAAE,MAAM,CAAC;KAChB,KAAG,QAAQ,kBAAkB,CAAC,
|
|
1
|
+
{"version":3,"file":"coinGeckoApiHelpers.d.ts","sourceRoot":"","sources":["../../../../src/general/prices/coingecko/coinGeckoApiHelpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAE9E,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAEzE,qBAAa,mBAAmB;IAKnB,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAAf,eAAe,EAAE,MAAM;IAU7C,gBAAgB,QAAa,QACnC,OAAO,QAAQ,EAAE,iBAAiB,CAAC,CACnC,CA2CC;IAMK,mBAAmB,WAAkB;QAC3C,SAAS,EAAE,kBAAkB,CAAC;QAC9B,OAAO,EAAE,MAAM,CAAC;KAChB,KAAG,QAAQ,kBAAkB,CAAC,CAuB7B;IAMK,qBAAqB,WAAkB;QAC7C,YAAY,EAAE,OAAO,QAAQ,EAAE,kBAAkB,CAAC,CAAC;KACnD,KAAG,QAAQ,OAAO,QAAQ,EAAE,aAAa,CAAC,CAAC,CAsC1C;IAUF,OAAO,CAAC,OAAO,CAkBb;CACF"}
|
|
@@ -65,6 +65,8 @@ class CoinGeckoApiHelpers {
|
|
|
65
65
|
time: inputs.daysAgo,
|
|
66
66
|
timeUnit: "D",
|
|
67
67
|
};
|
|
68
|
+
if (allData.prices.some((val) => val[0] <= 0))
|
|
69
|
+
throw new Error("invalid historical data for coin api id: " + coinApiId);
|
|
68
70
|
return formattedData;
|
|
69
71
|
});
|
|
70
72
|
/////////////////////////////////////////////////////////////////////
|
|
@@ -103,6 +105,8 @@ class CoinGeckoApiHelpers {
|
|
|
103
105
|
(this.coinGeckoApiKey === ""
|
|
104
106
|
? ""
|
|
105
107
|
: `&x_cg_pro_api_key=${this.coinGeckoApiKey}`))).json();
|
|
108
|
+
if (endpoint.includes("market_chart"))
|
|
109
|
+
console.log("someJson", someJson);
|
|
106
110
|
const castedRes = someJson;
|
|
107
111
|
return castedRes;
|
|
108
112
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aftermath-ts-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.146",
|
|
4
4
|
"description": "Aftermath TypeScript SDK",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/AftermathFinance/aftermath-ts-sdk#readme",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@mysten/sui.js": "^0.
|
|
36
|
+
"@mysten/sui.js": "^0.34.1",
|
|
37
37
|
"@pythnetwork/pyth-evm-js": "^1.16.1",
|
|
38
38
|
"dayjs": "^1.11.7",
|
|
39
39
|
"i": "^0.3.7",
|