@fileverse-dev/formulajs 4.4.11-mod-9 → 4.4.11-mod-10
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.
- package/lib/browser/formula.js +20 -11
- package/lib/browser/formula.min.js +2 -2
- package/lib/browser/formula.min.js.map +1 -1
- package/lib/cjs/index.cjs +10 -14
- package/lib/esm/index.mjs +10 -14
- package/package.json +1 -1
- package/types/cjs/index.d.cts +1 -1
- package/types/esm/index.d.mts +1 -1
package/lib/cjs/index.cjs
CHANGED
|
@@ -12967,6 +12967,9 @@ async function GETTXLIST(address, page, offset) {
|
|
|
12967
12967
|
if (json.result.includes("Invalid API Key")) {
|
|
12968
12968
|
return `${SERVICE_API_KEY.Etherscan}_MISSING`
|
|
12969
12969
|
}
|
|
12970
|
+
/*
|
|
12971
|
+
[{blockNumber: '0x1d3d1', timeStamp: '0x5f7e4f', hash: '0x3c3c3c3c', nonce: '0x1',}]
|
|
12972
|
+
*/
|
|
12970
12973
|
return json.result;
|
|
12971
12974
|
} catch (error) {
|
|
12972
12975
|
return "ERROR IN FETCHING"
|
|
@@ -12985,22 +12988,12 @@ async function GETPRICE(token, vs_currencies) {
|
|
|
12985
12988
|
try {
|
|
12986
12989
|
const response = await fetch(url, options);
|
|
12987
12990
|
if (!response.ok) {
|
|
12988
|
-
|
|
12991
|
+
const json = await response.json();
|
|
12992
|
+
if (json.status.error_message.includes("API Key Missing")) {
|
|
12993
|
+
return `${SERVICE_API_KEY.Coingecko}_MISSING`
|
|
12994
|
+
}
|
|
12989
12995
|
}
|
|
12990
12996
|
const jsonResponse = await response.json();
|
|
12991
|
-
/*
|
|
12992
|
-
JSON RESPONSE EXAMPLE
|
|
12993
|
-
{
|
|
12994
|
-
"bitcoin": {
|
|
12995
|
-
"usd": 103457,
|
|
12996
|
-
"inr": 8854165
|
|
12997
|
-
},
|
|
12998
|
-
"solana": {
|
|
12999
|
-
"usd": 167.56,
|
|
13000
|
-
"inr": 14340.55
|
|
13001
|
-
}
|
|
13002
|
-
}
|
|
13003
|
-
*/
|
|
13004
12997
|
|
|
13005
12998
|
// Free Coingecko API does not require API key, not need to handle API key error
|
|
13006
12999
|
|
|
@@ -13011,6 +13004,9 @@ async function GETPRICE(token, vs_currencies) {
|
|
|
13011
13004
|
output[key] = value;
|
|
13012
13005
|
}
|
|
13013
13006
|
}
|
|
13007
|
+
/*
|
|
13008
|
+
[{Bitcon_usd: 1, Bitcoin_eur: 1},{Ethereum_usd: 1, Ethereum_eur: 1}}]
|
|
13009
|
+
*/
|
|
13014
13010
|
return [output];
|
|
13015
13011
|
} catch (error) {
|
|
13016
13012
|
return "ERROR IN FETCHING"
|
package/lib/esm/index.mjs
CHANGED
|
@@ -12965,6 +12965,9 @@ async function GETTXLIST(address, page, offset) {
|
|
|
12965
12965
|
if (json.result.includes("Invalid API Key")) {
|
|
12966
12966
|
return `${SERVICE_API_KEY.Etherscan}_MISSING`
|
|
12967
12967
|
}
|
|
12968
|
+
/*
|
|
12969
|
+
[{blockNumber: '0x1d3d1', timeStamp: '0x5f7e4f', hash: '0x3c3c3c3c', nonce: '0x1',}]
|
|
12970
|
+
*/
|
|
12968
12971
|
return json.result;
|
|
12969
12972
|
} catch (error) {
|
|
12970
12973
|
return "ERROR IN FETCHING"
|
|
@@ -12983,22 +12986,12 @@ async function GETPRICE(token, vs_currencies) {
|
|
|
12983
12986
|
try {
|
|
12984
12987
|
const response = await fetch(url, options);
|
|
12985
12988
|
if (!response.ok) {
|
|
12986
|
-
|
|
12989
|
+
const json = await response.json();
|
|
12990
|
+
if (json.status.error_message.includes("API Key Missing")) {
|
|
12991
|
+
return `${SERVICE_API_KEY.Coingecko}_MISSING`
|
|
12992
|
+
}
|
|
12987
12993
|
}
|
|
12988
12994
|
const jsonResponse = await response.json();
|
|
12989
|
-
/*
|
|
12990
|
-
JSON RESPONSE EXAMPLE
|
|
12991
|
-
{
|
|
12992
|
-
"bitcoin": {
|
|
12993
|
-
"usd": 103457,
|
|
12994
|
-
"inr": 8854165
|
|
12995
|
-
},
|
|
12996
|
-
"solana": {
|
|
12997
|
-
"usd": 167.56,
|
|
12998
|
-
"inr": 14340.55
|
|
12999
|
-
}
|
|
13000
|
-
}
|
|
13001
|
-
*/
|
|
13002
12995
|
|
|
13003
12996
|
// Free Coingecko API does not require API key, not need to handle API key error
|
|
13004
12997
|
|
|
@@ -13009,6 +13002,9 @@ async function GETPRICE(token, vs_currencies) {
|
|
|
13009
13002
|
output[key] = value;
|
|
13010
13003
|
}
|
|
13011
13004
|
}
|
|
13005
|
+
/*
|
|
13006
|
+
[{Bitcon_usd: 1, Bitcoin_eur: 1},{Ethereum_usd: 1, Ethereum_eur: 1}}]
|
|
13007
|
+
*/
|
|
13012
13008
|
return [output];
|
|
13013
13009
|
} catch (error) {
|
|
13014
13010
|
return "ERROR IN FETCHING"
|
package/package.json
CHANGED
package/types/cjs/index.d.cts
CHANGED
|
@@ -1784,7 +1784,7 @@ export function GEOMEAN(...args: any[]): any;
|
|
|
1784
1784
|
* @returns
|
|
1785
1785
|
*/
|
|
1786
1786
|
export function GESTEP(number: any, step: any): any;
|
|
1787
|
-
export function GETPRICE(token: any, vs_currencies: any): Promise<
|
|
1787
|
+
export function GETPRICE(token: any, vs_currencies: any): Promise<string | {}[]>;
|
|
1788
1788
|
export function GETTXLIST(address: any, page: any, offset: any): Promise<any>;
|
|
1789
1789
|
/**
|
|
1790
1790
|
* Returns values along an exponential trend.
|
package/types/esm/index.d.mts
CHANGED
|
@@ -1784,7 +1784,7 @@ export function GEOMEAN(...args: any[]): any;
|
|
|
1784
1784
|
* @returns
|
|
1785
1785
|
*/
|
|
1786
1786
|
export function GESTEP(number: any, step: any): any;
|
|
1787
|
-
export function GETPRICE(token: any, vs_currencies: any): Promise<
|
|
1787
|
+
export function GETPRICE(token: any, vs_currencies: any): Promise<string | {}[]>;
|
|
1788
1788
|
export function GETTXLIST(address: any, page: any, offset: any): Promise<any>;
|
|
1789
1789
|
/**
|
|
1790
1790
|
* Returns values along an exponential trend.
|