@fileverse-dev/formulajs 4.4.11-mod-21 → 4.4.11-mod-21-patch-2
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 +234 -125
- package/lib/browser/formula.min.js +2 -2
- package/lib/browser/formula.min.js.map +1 -1
- package/lib/cjs/index.cjs +162 -102
- package/lib/esm/crypto-constants.mjs +43 -2
- package/lib/esm/index.mjs +161 -102
- package/package.json +1 -1
- package/types/cjs/index.d.cts +3 -2
- package/types/esm/index.d.mts +3 -2
package/lib/esm/index.mjs
CHANGED
|
@@ -5224,6 +5224,75 @@ Z.TEST = (array, x, sigma) => {
|
|
|
5224
5224
|
return 1 - NORM.S.DIST((AVERAGE(array) - x) / (sigma / Math.sqrt(n)), true)
|
|
5225
5225
|
};
|
|
5226
5226
|
|
|
5227
|
+
function PNL() {
|
|
5228
|
+
const [A, B] = argsToArray(arguments);
|
|
5229
|
+
|
|
5230
|
+
const toNumberOrThrow = (val) => {
|
|
5231
|
+
const num = Number(val);
|
|
5232
|
+
if (isNaN(num)) throw new Error(`Invalid number value: ${val}`);
|
|
5233
|
+
return num;
|
|
5234
|
+
};
|
|
5235
|
+
|
|
5236
|
+
// Single numbers
|
|
5237
|
+
if (typeof A === "number" && typeof B === "number") {
|
|
5238
|
+
return A - B;
|
|
5239
|
+
}
|
|
5240
|
+
|
|
5241
|
+
// 1D arrays
|
|
5242
|
+
if (Array.isArray(A) && Array.isArray(B) && typeof A[0] !== "object") {
|
|
5243
|
+
const maxLen = Math.max(A.length, B.length);
|
|
5244
|
+
let total = 0;
|
|
5245
|
+
for (let i = 0; i < maxLen; i++) {
|
|
5246
|
+
const aVal = i < A.length ? toNumberOrThrow(A[i]) : 0;
|
|
5247
|
+
const bVal = i < B.length ? toNumberOrThrow(B[i]) : 0;
|
|
5248
|
+
total += aVal - bVal;
|
|
5249
|
+
}
|
|
5250
|
+
return total;
|
|
5251
|
+
}
|
|
5252
|
+
|
|
5253
|
+
// 2D arrays
|
|
5254
|
+
if (Array.isArray(A[0]) && typeof A[0][0] !== "object") {
|
|
5255
|
+
let total = 0;
|
|
5256
|
+
const maxRows = Math.max(A.length, B.length);
|
|
5257
|
+
for (let i = 0; i < maxRows; i++) {
|
|
5258
|
+
const rowA = A[i] || [];
|
|
5259
|
+
const rowB = B[i] || [];
|
|
5260
|
+
const maxCols = Math.max(rowA.length, rowB.length);
|
|
5261
|
+
for (let j = 0; j < maxCols; j++) {
|
|
5262
|
+
const aVal = j < rowA.length ? toNumberOrThrow(rowA[j]) : 0;
|
|
5263
|
+
const bVal = j < rowB.length ? toNumberOrThrow(rowB[j]) : 0;
|
|
5264
|
+
total += aVal - bVal;
|
|
5265
|
+
}
|
|
5266
|
+
}
|
|
5267
|
+
return total;
|
|
5268
|
+
}
|
|
5269
|
+
|
|
5270
|
+
// 3D arrays
|
|
5271
|
+
if (Array.isArray(A[0][0])) {
|
|
5272
|
+
let total = 0;
|
|
5273
|
+
const maxX = Math.max(A.length, B.length);
|
|
5274
|
+
for (let i = 0; i < maxX; i++) {
|
|
5275
|
+
const matA = A[i] || [];
|
|
5276
|
+
const matB = B[i] || [];
|
|
5277
|
+
const maxY = Math.max(matA.length, matB.length);
|
|
5278
|
+
for (let j = 0; j < maxY; j++) {
|
|
5279
|
+
const rowA = matA[j] || [];
|
|
5280
|
+
const rowB = matB[j] || [];
|
|
5281
|
+
const maxZ = Math.max(rowA.length, rowB.length);
|
|
5282
|
+
for (let k = 0; k < maxZ; k++) {
|
|
5283
|
+
const aVal = k < rowA.length ? toNumberOrThrow(rowA[k]) : 0;
|
|
5284
|
+
const bVal = k < rowB.length ? toNumberOrThrow(rowB[k]) : 0;
|
|
5285
|
+
total += aVal - bVal;
|
|
5286
|
+
}
|
|
5287
|
+
}
|
|
5288
|
+
}
|
|
5289
|
+
return total;
|
|
5290
|
+
}
|
|
5291
|
+
|
|
5292
|
+
throw new Error("Unsupported or mismatched structure");
|
|
5293
|
+
}
|
|
5294
|
+
|
|
5295
|
+
|
|
5227
5296
|
/**
|
|
5228
5297
|
* Returns the absolute value of a number.
|
|
5229
5298
|
*
|
|
@@ -13009,13 +13078,25 @@ function SWITCH() {
|
|
|
13009
13078
|
const SERVICE_API_KEY = {
|
|
13010
13079
|
Etherscan: "ETHERSCAN_API_KEY",
|
|
13011
13080
|
Coingecko: "COINGECKO_API_KEY",
|
|
13081
|
+
Safe: "SAFE_API_KEY",
|
|
13012
13082
|
};
|
|
13013
13083
|
|
|
13014
13084
|
const CHAIN_ID_MAP = {
|
|
13015
|
-
|
|
13016
|
-
|
|
13017
|
-
|
|
13018
|
-
|
|
13085
|
+
ethereum: 1,
|
|
13086
|
+
gnosis: 100,
|
|
13087
|
+
base: 8453,
|
|
13088
|
+
};
|
|
13089
|
+
|
|
13090
|
+
const SAFE_CHAIN_MAP = {
|
|
13091
|
+
ethereum: 'eth',
|
|
13092
|
+
gnosis: 'gno',
|
|
13093
|
+
};
|
|
13094
|
+
|
|
13095
|
+
const ERROR_MESSAGES_FLAG = {
|
|
13096
|
+
INVALID_API_KEY: '_MISSING',
|
|
13097
|
+
RATE_LIMIT: '_RATE_LIMIT_REACHED',
|
|
13098
|
+
DEFAULT: 'FETCH_ERROR'
|
|
13099
|
+
};
|
|
13019
13100
|
|
|
13020
13101
|
const fromTimeStampToBlock = async (timestamp, chain, apiKey) => {
|
|
13021
13102
|
if(!timestamp || !chain || !apiKey) return
|
|
@@ -13028,28 +13109,32 @@ if(!timestamp || !chain || !apiKey) return
|
|
|
13028
13109
|
};
|
|
13029
13110
|
|
|
13030
13111
|
async function ETHERSCAN(address, page, offset) {
|
|
13031
|
-
|
|
13032
|
-
const
|
|
13033
|
-
|
|
13034
|
-
|
|
13035
|
-
|
|
13036
|
-
|
|
13037
|
-
|
|
13038
|
-
|
|
13039
|
-
|
|
13040
|
-
|
|
13041
|
-
|
|
13042
|
-
|
|
13043
|
-
|
|
13044
|
-
|
|
13045
|
-
|
|
13046
|
-
|
|
13047
|
-
|
|
13048
|
-
|
|
13049
|
-
|
|
13050
|
-
|
|
13051
|
-
|
|
13052
|
-
|
|
13112
|
+
return `${SERVICE_API_KEY.Etherscan}${ERROR_MESSAGES_FLAG.RATE_LIMIT}`
|
|
13113
|
+
// const API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Etherscan);
|
|
13114
|
+
// const url = `https://api.etherscan.io/v2/api?chainid=1&module=account&action=txlist&address=${address}&startblock=0&endblock=99999999&page=${page || 1}&offset=${offset || 10}&sort=asc&apikey=${API_KEY}`
|
|
13115
|
+
|
|
13116
|
+
// try {
|
|
13117
|
+
// const response = await fetch(url)
|
|
13118
|
+
// if (!response.ok) {
|
|
13119
|
+
// throw new Error(`HTTP error! Status: ${response.status}`)
|
|
13120
|
+
// }
|
|
13121
|
+
// const json = await response.json()
|
|
13122
|
+
// if (json.result.includes("Invalid API Key")) {
|
|
13123
|
+
// return `${SERVICE_API_KEY.Etherscan}${ERROR_MESSAGES_FLAG.INVALID_API_KEY}`
|
|
13124
|
+
// }
|
|
13125
|
+
// if(json.result.includes('Max rate limit reached')){
|
|
13126
|
+
// return `${SERVICE_API_KEY.Etherscan}${ERROR_MESSAGES_FLAG.RATE_LIMIT}`
|
|
13127
|
+
// }
|
|
13128
|
+
// /*
|
|
13129
|
+
// [{blockNumber: '0x1d3d1', timeStamp: '0x5f7e4f', hash: '0x3c3c3c3c', nonce: '0x1',}]
|
|
13130
|
+
// */
|
|
13131
|
+
// return json.result;
|
|
13132
|
+
// } catch (error) {
|
|
13133
|
+
// return ERROR_MESSAGES_FLAG.DEFAULT
|
|
13134
|
+
// }
|
|
13135
|
+
}
|
|
13136
|
+
|
|
13137
|
+
async function COINGECKO(token, vs_currencies) {
|
|
13053
13138
|
const API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Coingecko);
|
|
13054
13139
|
const url = `https://api.coingecko.com/api/v3/simple/price?vs_currencies=${vs_currencies}&ids=${token}`;
|
|
13055
13140
|
|
|
@@ -13063,7 +13148,10 @@ async function GETPRICE(token, vs_currencies) {
|
|
|
13063
13148
|
if (!response.ok) {
|
|
13064
13149
|
const json = await response.json();
|
|
13065
13150
|
if (json.status.error_message.includes("API Key Missing")) {
|
|
13066
|
-
return `${SERVICE_API_KEY.Coingecko}
|
|
13151
|
+
return `${SERVICE_API_KEY.Coingecko}${ERROR_MESSAGES_FLAG.INVALID_API_KEY}`
|
|
13152
|
+
}
|
|
13153
|
+
if(response.status === 429){
|
|
13154
|
+
return `${SERVICE_API_KEY.Coingecko}${ERROR_MESSAGES_FLAG.RATE_LIMIT}`
|
|
13067
13155
|
}
|
|
13068
13156
|
}
|
|
13069
13157
|
const jsonResponse = await response.json();
|
|
@@ -13082,7 +13170,7 @@ async function GETPRICE(token, vs_currencies) {
|
|
|
13082
13170
|
*/
|
|
13083
13171
|
return [output];
|
|
13084
13172
|
} catch (error) {
|
|
13085
|
-
return
|
|
13173
|
+
return ERROR_MESSAGES_FLAG.DEFAULT
|
|
13086
13174
|
}
|
|
13087
13175
|
}
|
|
13088
13176
|
|
|
@@ -13098,12 +13186,12 @@ async function EOA(address, categories, chain, startTime, endTime) {
|
|
|
13098
13186
|
|
|
13099
13187
|
let action = '';
|
|
13100
13188
|
if (categories === 'txns') action = 'account.txlist';
|
|
13101
|
-
else {action = 'account.balance';} let timeQuery = '';
|
|
13102
|
-
if(!isNaN(startTime) && !isNaN(endTime)){
|
|
13103
|
-
|
|
13104
|
-
|
|
13189
|
+
else { action = 'account.balance'; } let timeQuery = '';
|
|
13190
|
+
if (!isNaN(startTime) && !isNaN(endTime)) {
|
|
13191
|
+
const startBlock = await fromTimeStampToBlock(startTime, chain, apiKey);
|
|
13192
|
+
const endBlock = await fromTimeStampToBlock(endTime, chain, apiKey);
|
|
13105
13193
|
timeQuery = `&startblock=${startBlock}&endblock=${endBlock}`;
|
|
13106
|
-
} else if(categories === 'balance') {
|
|
13194
|
+
} else if (categories === 'balance') {
|
|
13107
13195
|
timeQuery = `&tag=latest`;
|
|
13108
13196
|
} else {
|
|
13109
13197
|
throw new Error('Start and End Time is required for querying transaction list ')
|
|
@@ -13116,91 +13204,62 @@ async function EOA(address, categories, chain, startTime, endTime) {
|
|
|
13116
13204
|
if (json.result?.includes?.("Invalid API Key")) {
|
|
13117
13205
|
return `${SERVICE_API_KEY[chain.charAt(0).toUpperCase() + chain.slice(1)]}_MISSING`;
|
|
13118
13206
|
}
|
|
13207
|
+
if(json.result.includes('Max rate limit reached')){
|
|
13208
|
+
return `${SERVICE_API_KEY.Etherscan}${ERROR_MESSAGES_FLAG.RATE_LIMIT}`
|
|
13209
|
+
}
|
|
13119
13210
|
return json.result;
|
|
13120
13211
|
} catch (e) {
|
|
13121
13212
|
console.log(e);
|
|
13122
|
-
return
|
|
13213
|
+
return ERROR_MESSAGES_FLAG.DEFAULT;
|
|
13123
13214
|
}
|
|
13124
13215
|
}
|
|
13125
13216
|
|
|
13126
13217
|
|
|
13127
|
-
function PNL() {
|
|
13128
|
-
const [A, B] = argsToArray(arguments);
|
|
13129
|
-
|
|
13130
|
-
const toNumberOrThrow = (val) => {
|
|
13131
|
-
const num = Number(val);
|
|
13132
|
-
if (isNaN(num)) throw new Error(`Invalid number value: ${val}`);
|
|
13133
|
-
return num;
|
|
13134
|
-
};
|
|
13135
|
-
|
|
13136
|
-
// Single numbers
|
|
13137
|
-
if (typeof A === "number" && typeof B === "number") {
|
|
13138
|
-
return A - B;
|
|
13139
|
-
}
|
|
13140
|
-
|
|
13141
|
-
// 1D arrays
|
|
13142
|
-
if (Array.isArray(A) && Array.isArray(B) && typeof A[0] !== "object") {
|
|
13143
|
-
const maxLen = Math.max(A.length, B.length);
|
|
13144
|
-
let total = 0;
|
|
13145
|
-
for (let i = 0; i < maxLen; i++) {
|
|
13146
|
-
const aVal = i < A.length ? toNumberOrThrow(A[i]) : 0;
|
|
13147
|
-
const bVal = i < B.length ? toNumberOrThrow(B[i]) : 0;
|
|
13148
|
-
total += aVal - bVal;
|
|
13149
|
-
}
|
|
13150
|
-
return total;
|
|
13151
|
-
}
|
|
13152
|
-
|
|
13153
|
-
// 2D arrays
|
|
13154
|
-
if (Array.isArray(A[0]) && typeof A[0][0] !== "object") {
|
|
13155
|
-
let total = 0;
|
|
13156
|
-
const maxRows = Math.max(A.length, B.length);
|
|
13157
|
-
for (let i = 0; i < maxRows; i++) {
|
|
13158
|
-
const rowA = A[i] || [];
|
|
13159
|
-
const rowB = B[i] || [];
|
|
13160
|
-
const maxCols = Math.max(rowA.length, rowB.length);
|
|
13161
|
-
for (let j = 0; j < maxCols; j++) {
|
|
13162
|
-
const aVal = j < rowA.length ? toNumberOrThrow(rowA[j]) : 0;
|
|
13163
|
-
const bVal = j < rowB.length ? toNumberOrThrow(rowB[j]) : 0;
|
|
13164
|
-
total += aVal - bVal;
|
|
13165
|
-
}
|
|
13166
|
-
}
|
|
13167
|
-
return total;
|
|
13168
|
-
}
|
|
13169
|
-
|
|
13170
|
-
// 3D arrays
|
|
13171
|
-
if (Array.isArray(A[0][0])) {
|
|
13172
|
-
let total = 0;
|
|
13173
|
-
const maxX = Math.max(A.length, B.length);
|
|
13174
|
-
for (let i = 0; i < maxX; i++) {
|
|
13175
|
-
const matA = A[i] || [];
|
|
13176
|
-
const matB = B[i] || [];
|
|
13177
|
-
const maxY = Math.max(matA.length, matB.length);
|
|
13178
|
-
for (let j = 0; j < maxY; j++) {
|
|
13179
|
-
const rowA = matA[j] || [];
|
|
13180
|
-
const rowB = matB[j] || [];
|
|
13181
|
-
const maxZ = Math.max(rowA.length, rowB.length);
|
|
13182
|
-
for (let k = 0; k < maxZ; k++) {
|
|
13183
|
-
const aVal = k < rowA.length ? toNumberOrThrow(rowA[k]) : 0;
|
|
13184
|
-
const bVal = k < rowB.length ? toNumberOrThrow(rowB[k]) : 0;
|
|
13185
|
-
total += aVal - bVal;
|
|
13186
|
-
}
|
|
13187
|
-
}
|
|
13188
|
-
}
|
|
13189
|
-
return total;
|
|
13190
|
-
}
|
|
13191
13218
|
|
|
13192
|
-
throw new Error("Unsupported or mismatched structure");
|
|
13193
|
-
}
|
|
13194
13219
|
|
|
13195
13220
|
|
|
13196
13221
|
async function FLVURL(token, vs_currencies) {
|
|
13197
13222
|
return new Promise((resolve) => {
|
|
13198
13223
|
setTimeout(() => {
|
|
13199
|
-
resolve([{"Yoo": "gotcha"}]);
|
|
13224
|
+
resolve([{ "Yoo": "gotcha" }]);
|
|
13200
13225
|
}, 10000);
|
|
13201
13226
|
});
|
|
13202
13227
|
}
|
|
13203
13228
|
|
|
13229
|
+
async function SAFE(address, utility, chain, limit, offset) {
|
|
13230
|
+
|
|
13231
|
+
if (typeof limit !== 'number' || limit < 0) return 'INVALID_LIMIT';
|
|
13232
|
+
if (typeof offset !== 'number' || offset < 0) return 'INVALID_OFFSET';
|
|
13233
|
+
if (utility !== 'txns') return 'UTILITY IS NOT SUPPORTED';
|
|
13234
|
+
|
|
13235
|
+
const apiKey = window.localStorage.getItem(SERVICE_API_KEY.Safe);
|
|
13236
|
+
const chainIdentifier = SAFE_CHAIN_MAP[chain];
|
|
13237
|
+
|
|
13238
|
+
if (!apiKey) return `${SERVICE_API_KEY.Safe}_MISSING`;
|
|
13239
|
+
if (!chainIdentifier) return 'CHAIN IS NOT SUPPORTED';
|
|
13240
|
+
|
|
13241
|
+
const url = `https://api.safe.global/tx-service/${chainIdentifier}/api/v2/safes/${address}/multisig-transactions?limit=${limit}&offset=${offset}`;
|
|
13242
|
+
try {
|
|
13243
|
+
const response = await fetch(url,
|
|
13244
|
+
{
|
|
13245
|
+
headers: {
|
|
13246
|
+
'Authorization': `Bearer ${apiKey}`,
|
|
13247
|
+
},
|
|
13248
|
+
}
|
|
13249
|
+
);
|
|
13250
|
+
if (!response.ok) throw new Error(`HTTP error! Status: ${response.status}`);
|
|
13251
|
+
const json = await response.json();
|
|
13252
|
+
if (!Array.isArray(json.results)) {
|
|
13253
|
+
return "INVALID API RESPONSE";
|
|
13254
|
+
}
|
|
13255
|
+
// remove nested structure from the response
|
|
13256
|
+
return json.results.map(({ confirmations, dataDecoded, ...rest }) => rest);
|
|
13257
|
+
} catch (e) {
|
|
13258
|
+
console.log(e);
|
|
13259
|
+
return "ERROR IN FETCHING";
|
|
13260
|
+
}
|
|
13261
|
+
}
|
|
13262
|
+
|
|
13204
13263
|
const utils = { errors, symbols, date };
|
|
13205
13264
|
|
|
13206
|
-
export { ABS, ACCRINT, ACOS, ACOSH, ACOT, ACOTH, AGGREGATE, AND, ARABIC, ASIN, ASINH, ATAN, ATAN2, ATANH, AVEDEV, AVERAGE, AVERAGEA, AVERAGEIF, AVERAGEIFS, BASE, BESSELI, BESSELJ, BESSELK, BESSELY, BETA, BETADIST, BETAINV, BIN2DEC, BIN2HEX, BIN2OCT, BINOM, BINOMDIST, BITAND, BITLSHIFT, BITOR, BITRSHIFT, BITXOR, CEILING, CEILINGMATH, CEILINGPRECISE, CHAR, CHIDIST, CHIDISTRT, CHIINV, CHIINVRT, CHISQ, CHITEST, CHOOSE, CLEAN, CODE, COLUMN, COLUMNS, COMBIN, COMBINA, COMPLEX, CONCAT, CONCATENATE, CONFIDENCE, CONVERT, CORREL, COS, COSH, COT, COTH, COUNT, COUNTA, COUNTBLANK, COUNTIF, COUNTIFS, COUPDAYS, COVAR, COVARIANCE, COVARIANCEP, COVARIANCES, CRITBINOM, CSC, CSCH, CUMIPMT, CUMPRINC, DATE, DATEDIF, DATEVALUE, DAVERAGE, DAY, DAYS, DAYS360, DB, DCOUNT, DCOUNTA, DDB, DEC2BIN, DEC2HEX, DEC2OCT, DECIMAL, DEGREES, DELTA, DEVSQ, DGET, DISC, DMAX, DMIN, DOLLAR, DOLLARDE, DOLLARFR, DPRODUCT, DSTDEV, DSTDEVP, DSUM, DVAR, DVARP, EDATE, EFFECT, EOA, EOMONTH, ERF, ERFC, ERFCPRECISE, ERFPRECISE, ERROR, ETHERSCAN, EVEN, EXACT, EXP, EXPON, EXPONDIST, F, FACT, FACTDOUBLE, FALSE, FDIST, FDISTRT, FIND, FINV, FINVRT, FISHER, FISHERINV, FIXED, FLOOR, FLOORMATH, FLOORPRECISE, FLVURL, FORECAST, FREQUENCY, FTEST, FV, FVSCHEDULE, GAMMA, GAMMADIST, GAMMAINV, GAMMALN, GAMMALNPRECISE, GAUSS, GCD, GEOMEAN, GESTEP,
|
|
13265
|
+
export { ABS, ACCRINT, ACOS, ACOSH, ACOT, ACOTH, AGGREGATE, AND, ARABIC, ASIN, ASINH, ATAN, ATAN2, ATANH, AVEDEV, AVERAGE, AVERAGEA, AVERAGEIF, AVERAGEIFS, BASE, BESSELI, BESSELJ, BESSELK, BESSELY, BETA, BETADIST, BETAINV, BIN2DEC, BIN2HEX, BIN2OCT, BINOM, BINOMDIST, BITAND, BITLSHIFT, BITOR, BITRSHIFT, BITXOR, CEILING, CEILINGMATH, CEILINGPRECISE, CHAR, CHIDIST, CHIDISTRT, CHIINV, CHIINVRT, CHISQ, CHITEST, CHOOSE, CLEAN, CODE, COINGECKO, COLUMN, COLUMNS, COMBIN, COMBINA, COMPLEX, CONCAT, CONCATENATE, CONFIDENCE, CONVERT, CORREL, COS, COSH, COT, COTH, COUNT, COUNTA, COUNTBLANK, COUNTIF, COUNTIFS, COUPDAYS, COVAR, COVARIANCE, COVARIANCEP, COVARIANCES, CRITBINOM, CSC, CSCH, CUMIPMT, CUMPRINC, DATE, DATEDIF, DATEVALUE, DAVERAGE, DAY, DAYS, DAYS360, DB, DCOUNT, DCOUNTA, DDB, DEC2BIN, DEC2HEX, DEC2OCT, DECIMAL, DEGREES, DELTA, DEVSQ, DGET, DISC, DMAX, DMIN, DOLLAR, DOLLARDE, DOLLARFR, DPRODUCT, DSTDEV, DSTDEVP, DSUM, DVAR, DVARP, EDATE, EFFECT, EOA, EOMONTH, ERF, ERFC, ERFCPRECISE, ERFPRECISE, ERROR, ETHERSCAN, EVEN, EXACT, EXP, EXPON, EXPONDIST, F, FACT, FACTDOUBLE, FALSE, FDIST, FDISTRT, FIND, FINV, FINVRT, FISHER, FISHERINV, FIXED, FLOOR, FLOORMATH, FLOORPRECISE, FLVURL, FORECAST, FREQUENCY, FTEST, FV, FVSCHEDULE, GAMMA, GAMMADIST, GAMMAINV, GAMMALN, GAMMALNPRECISE, GAUSS, GCD, GEOMEAN, GESTEP, GROWTH, HARMEAN, HEX2BIN, HEX2DEC, HEX2OCT, HLOOKUP, HOUR, HYPGEOM, HYPGEOMDIST, IF, IFERROR, IFNA, IFS, IMABS, IMAGINARY, IMARGUMENT, IMCONJUGATE, IMCOS, IMCOSH, IMCOT, IMCSC, IMCSCH, IMDIV, IMEXP, IMLN, IMLOG10, IMLOG2, IMPOWER, IMPRODUCT, IMREAL, IMSEC, IMSECH, IMSIN, IMSINH, IMSQRT, IMSUB, IMSUM, IMTAN, INDEX, INT, INTERCEPT, IPMT, IRR, ISBLANK, ISDATE, ISERR, ISERROR, ISEVEN, ISLOGICAL, ISNA, ISNONTEXT, ISNUMBER, ISO, ISODD, ISOWEEKNUM, ISPMT, ISTEXT, KURT, LARGE, LCM, LEFT, LEN, LINEST, LN, LOG, LOG10, LOGEST, LOGINV, LOGNORM, LOGNORMDIST, LOGNORMINV, LOOKUP, LOWER, MATCH, MAX, MAXA, MAXIFS, MEDIAN, MID, MIN, MINA, MINIFS, MINUTE, MIRR, MMULT, MOD, MODE, MODEMULT, MODESNGL, MONTH, MROUND, MULTINOMIAL, MUNIT, N, NA, NEGBINOM, NEGBINOMDIST, NETWORKDAYS, NETWORKDAYSINTL, NETWORKDAYS_INTL, NOMINAL, NORM, NORMDIST, NORMINV, NORMSDIST, NORMSINV, NOT, NOW, NPER, NPV, NUMBERVALUE, OCT2BIN, OCT2DEC, OCT2HEX, ODD, OR, PDURATION, PEARSON, PERCENTILE, PERCENTILEEXC, PERCENTILEINC, PERCENTRANK, PERCENTRANKEXC, PERCENTRANKINC, PERMUT, PERMUTATIONA, PHI, PI, PMT, PNL, POISSON, POISSONDIST, POWER, PPMT, PRICEDISC, PROB, PRODUCT, PROPER, PV, QUARTILE, QUARTILEEXC, QUARTILEINC, QUOTIENT, RADIANS, RAND, RANDBETWEEN, RANK, RANKAVG, RANKEQ, RATE, REPLACE, REPT, RIGHT, ROMAN, ROUND, ROUNDDOWN, ROUNDUP, ROW, ROWS, RRI, RSQ, SAFE, SEARCH, SEC, SECH, SECOND, SERIESSUM, SIGN, SIN, SINH, SKEW, SKEWP, SLN, SLOPE, SMALL, SORT, SQRT, SQRTPI, STANDARDIZE, STDEV, STDEVA, STDEVP, STDEVPA, STDEVS, STEYX, SUBSTITUTE, SUBTOTAL, SUM, SUMIF, SUMIFS, SUMPRODUCT, SUMSQ, SUMX2MY2, SUMX2PY2, SUMXMY2, SWITCH, SYD, T, TAN, TANH, TBILLEQ, TBILLPRICE, TBILLYIELD, TDIST, TDISTRT, TEXT, TEXTJOIN, TIME, TIMEVALUE, TINV, TODAY, TRANSPOSE, TREND, TRIM, TRIMMEAN, TRUE, TRUNC, TTEST, TYPE, UNICHAR, UNICODE, UNIQUE, UPPER, VALUE, VAR, VARA, VARP, VARPA, VARS, VLOOKUP, WEEKDAY, WEEKNUM, WEIBULL, WEIBULLDIST, WORKDAY, WORKDAYINTL, WORKDAY_INTL, XIRR, XNPV, XOR, YEAR, YEARFRAC, Z, ZTEST, utils };
|
package/package.json
CHANGED
package/types/cjs/index.d.cts
CHANGED
|
@@ -624,6 +624,7 @@ export function CLEAN(text: any): any;
|
|
|
624
624
|
* @returns
|
|
625
625
|
*/
|
|
626
626
|
export function CODE(text: any): any;
|
|
627
|
+
export function COINGECKO(token: any, vs_currencies: any): Promise<string | {}[]>;
|
|
627
628
|
/**
|
|
628
629
|
* Returns the column number of a reference.
|
|
629
630
|
*
|
|
@@ -1328,7 +1329,7 @@ export const ERFPRECISE: any;
|
|
|
1328
1329
|
export namespace ERROR {
|
|
1329
1330
|
function TYPE(error_val: any): Error | 1 | 2 | 3 | 4 | 8 | 5 | 6 | 7;
|
|
1330
1331
|
}
|
|
1331
|
-
export function ETHERSCAN(address: any, page: any, offset: any): Promise<
|
|
1332
|
+
export function ETHERSCAN(address: any, page: any, offset: any): Promise<string>;
|
|
1332
1333
|
/**
|
|
1333
1334
|
* Rounds a number up to the nearest even integer.
|
|
1334
1335
|
*
|
|
@@ -1787,7 +1788,6 @@ export function GEOMEAN(...args: any[]): any;
|
|
|
1787
1788
|
* @returns
|
|
1788
1789
|
*/
|
|
1789
1790
|
export function GESTEP(number: any, step: any): any;
|
|
1790
|
-
export function GETPRICE(token: any, vs_currencies: any): Promise<string | {}[]>;
|
|
1791
1791
|
/**
|
|
1792
1792
|
* Returns values along an exponential trend.
|
|
1793
1793
|
*
|
|
@@ -3528,6 +3528,7 @@ export function RRI(nper: any, pv: any, fv: any): number | Error;
|
|
|
3528
3528
|
* @returns
|
|
3529
3529
|
*/
|
|
3530
3530
|
export function RSQ(known_y: any, known_x: any): number | Error;
|
|
3531
|
+
export function SAFE(address: any, utility: any, chain: any, limit: any, offset: any): Promise<any>;
|
|
3531
3532
|
/**
|
|
3532
3533
|
* Finds one text value within another (not case-sensitive)
|
|
3533
3534
|
*
|
package/types/esm/index.d.mts
CHANGED
|
@@ -624,6 +624,7 @@ export function CLEAN(text: any): any;
|
|
|
624
624
|
* @returns
|
|
625
625
|
*/
|
|
626
626
|
export function CODE(text: any): any;
|
|
627
|
+
export function COINGECKO(token: any, vs_currencies: any): Promise<string | {}[]>;
|
|
627
628
|
/**
|
|
628
629
|
* Returns the column number of a reference.
|
|
629
630
|
*
|
|
@@ -1328,7 +1329,7 @@ export const ERFPRECISE: any;
|
|
|
1328
1329
|
export namespace ERROR {
|
|
1329
1330
|
function TYPE(error_val: any): Error | 1 | 2 | 3 | 4 | 8 | 5 | 6 | 7;
|
|
1330
1331
|
}
|
|
1331
|
-
export function ETHERSCAN(address: any, page: any, offset: any): Promise<
|
|
1332
|
+
export function ETHERSCAN(address: any, page: any, offset: any): Promise<string>;
|
|
1332
1333
|
/**
|
|
1333
1334
|
* Rounds a number up to the nearest even integer.
|
|
1334
1335
|
*
|
|
@@ -1787,7 +1788,6 @@ export function GEOMEAN(...args: any[]): any;
|
|
|
1787
1788
|
* @returns
|
|
1788
1789
|
*/
|
|
1789
1790
|
export function GESTEP(number: any, step: any): any;
|
|
1790
|
-
export function GETPRICE(token: any, vs_currencies: any): Promise<string | {}[]>;
|
|
1791
1791
|
/**
|
|
1792
1792
|
* Returns values along an exponential trend.
|
|
1793
1793
|
*
|
|
@@ -3528,6 +3528,7 @@ export function RRI(nper: any, pv: any, fv: any): number | Error;
|
|
|
3528
3528
|
* @returns
|
|
3529
3529
|
*/
|
|
3530
3530
|
export function RSQ(known_y: any, known_x: any): number | Error;
|
|
3531
|
+
export function SAFE(address: any, utility: any, chain: any, limit: any, offset: any): Promise<any>;
|
|
3531
3532
|
/**
|
|
3532
3533
|
* Finds one text value within another (not case-sensitive)
|
|
3533
3534
|
*
|