@fileverse-dev/formulajs 4.4.11-mod-64-patch-2 → 4.4.11-mod-66
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 +810 -1104
- package/lib/browser/formula.min.js +2 -2
- package/lib/browser/formula.min.js.map +1 -1
- package/lib/cjs/index.cjs +255 -531
- package/lib/esm/crypto-constants.mjs +51 -41
- package/lib/esm/index.mjs +254 -532
- package/package.json +3 -5
- package/types/cjs/index.d.cts +23 -12
- package/types/esm/index.d.mts +23 -12
package/lib/cjs/index.cjs
CHANGED
|
@@ -7014,6 +7014,26 @@ function SUM() {
|
|
|
7014
7014
|
return result
|
|
7015
7015
|
}
|
|
7016
7016
|
|
|
7017
|
+
function MINUS$1() {
|
|
7018
|
+
const args = argsToArray(arguments);
|
|
7019
|
+
if (args.length !== 2) {
|
|
7020
|
+
return value; // or some other error message
|
|
7021
|
+
}
|
|
7022
|
+
|
|
7023
|
+
const num1 = args[0];
|
|
7024
|
+
const num2 = args[1];
|
|
7025
|
+
|
|
7026
|
+
if (num1 instanceof Error || num2 instanceof Error) {
|
|
7027
|
+
return num1 instanceof Error ? num1 : num2;
|
|
7028
|
+
}
|
|
7029
|
+
|
|
7030
|
+
if (typeof num1 !== 'number' || typeof num2 !== 'number') {
|
|
7031
|
+
return value; // or some other error message
|
|
7032
|
+
}
|
|
7033
|
+
|
|
7034
|
+
return num1 - num2;
|
|
7035
|
+
}
|
|
7036
|
+
|
|
7017
7037
|
/**
|
|
7018
7038
|
* Adds the values specified by a given criteria.
|
|
7019
7039
|
*
|
|
@@ -13098,19 +13118,15 @@ const SAFE_CHAIN_MAP = {
|
|
|
13098
13118
|
};
|
|
13099
13119
|
|
|
13100
13120
|
const ERROR_MESSAGES_FLAG = {
|
|
13101
|
-
INVALID_API_KEY: '
|
|
13102
|
-
RATE_LIMIT: '
|
|
13103
|
-
DEFAULT: '
|
|
13104
|
-
MISSING_KEY: '
|
|
13105
|
-
INVALID_CHAIN: '
|
|
13106
|
-
INVALID_TYPE: '
|
|
13107
|
-
INVALID_ADDRESS: '
|
|
13108
|
-
INVALID_PARAM: '
|
|
13109
|
-
MAX_PAGE_LIMIT: '
|
|
13110
|
-
NETWORK_ERROR: 'NETWORK_ERROR',
|
|
13111
|
-
ENS: 'ENS',
|
|
13112
|
-
CUSTOM: 'CUSTOM',
|
|
13113
|
-
MISSING_PARAM: 'MISSING_PARAM'
|
|
13121
|
+
INVALID_API_KEY: '_INVALID_KEY',
|
|
13122
|
+
RATE_LIMIT: '_RATE_LIMIT_REACHED',
|
|
13123
|
+
DEFAULT: 'FETCH_ERROR',
|
|
13124
|
+
MISSING_KEY: '_MISSING',
|
|
13125
|
+
INVALID_CHAIN: '_INVALID_CHAIN',
|
|
13126
|
+
INVALID_TYPE: '_INVALID_TYPE',
|
|
13127
|
+
INVALID_ADDRESS: '_INVALID_ADDRESS',
|
|
13128
|
+
INVALID_PARAM: '_INVALID_PARAM',
|
|
13129
|
+
MAX_PAGE_LIMIT: 'Max page limit is 250'
|
|
13114
13130
|
};
|
|
13115
13131
|
|
|
13116
13132
|
const UTILITY = {
|
|
@@ -13118,16 +13134,16 @@ const UTILITY = {
|
|
|
13118
13134
|
};
|
|
13119
13135
|
const MAX_PAGE_LIMIT = 250;
|
|
13120
13136
|
|
|
13121
|
-
const
|
|
13122
|
-
Etherscan: '
|
|
13123
|
-
Coingecko: '
|
|
13124
|
-
Safe: '
|
|
13125
|
-
Basescan: '
|
|
13126
|
-
Gnosisscan: '
|
|
13127
|
-
Firefly: '
|
|
13128
|
-
GnosisPay: '
|
|
13129
|
-
Neynar: '
|
|
13130
|
-
Defillama: '
|
|
13137
|
+
const SERVICE_API_KEY = {
|
|
13138
|
+
Etherscan: 'ETHERSCAN_API_KEY',
|
|
13139
|
+
Coingecko: 'COINGECKO_API_KEY',
|
|
13140
|
+
Safe: 'SAFE_API_KEY',
|
|
13141
|
+
Basescan: 'BASESCAN_API_KEY',
|
|
13142
|
+
Gnosisscan: 'GNOSIS_API_KEY',
|
|
13143
|
+
Firefly: 'FIRE_FLY_API_KEY',
|
|
13144
|
+
GnosisPay: 'GNOSIS_API_KEY',
|
|
13145
|
+
Neynar: 'NEYNAR_API_KEY',
|
|
13146
|
+
Defillama: 'DEFILLAMA_API_KEY'
|
|
13131
13147
|
};
|
|
13132
13148
|
|
|
13133
13149
|
const fromTimeStampToBlock = async (timestamp, chain, apiKey) => {
|
|
@@ -13140,10 +13156,6 @@ if(!timestamp || !chain || !apiKey) return
|
|
|
13140
13156
|
|
|
13141
13157
|
};
|
|
13142
13158
|
|
|
13143
|
-
var fromTimestampToBlock = {
|
|
13144
|
-
fromTimeStampToBlock
|
|
13145
|
-
};
|
|
13146
|
-
|
|
13147
13159
|
function toTimestamp(dateStr) {
|
|
13148
13160
|
// Expecting format: "DD/MM/YYYY"
|
|
13149
13161
|
const [day, month, year] = dateStr.split("/").map(Number);
|
|
@@ -13155,16 +13167,6 @@ const isAddress = (input) => {
|
|
|
13155
13167
|
return (/^0x[a-fA-F0-9]{40}$/.test(input))
|
|
13156
13168
|
};
|
|
13157
13169
|
|
|
13158
|
-
var isAddress$1 = {
|
|
13159
|
-
isAddress
|
|
13160
|
-
};
|
|
13161
|
-
|
|
13162
|
-
/* global document */
|
|
13163
|
-
/* global window */
|
|
13164
|
-
/* global ethers */
|
|
13165
|
-
|
|
13166
|
-
|
|
13167
|
-
|
|
13168
13170
|
async function fromEnsNameToAddress(name) {
|
|
13169
13171
|
if (typeof ethers === 'undefined') {
|
|
13170
13172
|
await new Promise((resolve, reject) => {
|
|
@@ -13192,170 +13194,33 @@ async function fromEnsNameToAddress(name) {
|
|
|
13192
13194
|
}
|
|
13193
13195
|
}
|
|
13194
13196
|
|
|
13195
|
-
var fromEnsNameToAddress$1 = {
|
|
13196
|
-
fromEnsNameToAddress
|
|
13197
|
-
};
|
|
13198
|
-
|
|
13199
|
-
const errorMessageHandler = (errorFlag, input, functionName) => {
|
|
13200
|
-
if (!functionName) {
|
|
13201
|
-
const stack = new Error().stack?.split('\n')[2];
|
|
13202
|
-
const match = stack?.match(/at (\w+)/);
|
|
13203
|
-
functionName = match?.[1];
|
|
13204
|
-
}
|
|
13205
|
-
|
|
13206
|
-
switch (errorFlag) {
|
|
13207
|
-
case ERROR_MESSAGES_FLAG.INVALID_ADDRESS:
|
|
13208
|
-
return {
|
|
13209
|
-
message: `${input} is not a supported address`,
|
|
13210
|
-
functionName,
|
|
13211
|
-
type: errorFlag
|
|
13212
|
-
}
|
|
13213
|
-
|
|
13214
|
-
case ERROR_MESSAGES_FLAG.INVALID_PARAM: {
|
|
13215
|
-
const key = Object.keys(input)[0];
|
|
13216
|
-
const value = input[key];
|
|
13217
|
-
return {
|
|
13218
|
-
message: `${value} is an invalid value for ${key}`,
|
|
13219
|
-
functionName,
|
|
13220
|
-
type: errorFlag
|
|
13221
|
-
}
|
|
13222
|
-
}
|
|
13223
|
-
|
|
13224
|
-
case ERROR_MESSAGES_FLAG.INVALID_CHAIN:
|
|
13225
|
-
return {
|
|
13226
|
-
message: `${input} is not a supported chain for this function `,
|
|
13227
|
-
functionName,
|
|
13228
|
-
type: errorFlag
|
|
13229
|
-
}
|
|
13230
|
-
|
|
13231
|
-
case ERROR_MESSAGES_FLAG.RATE_LIMIT:
|
|
13232
|
-
return {
|
|
13233
|
-
message: `Rate limit for ${input || functionName || 'this api'} has been reached`,
|
|
13234
|
-
functionName,
|
|
13235
|
-
type: errorFlag
|
|
13236
|
-
}
|
|
13237
|
-
|
|
13238
|
-
case ERROR_MESSAGES_FLAG.MISSING_KEY:
|
|
13239
|
-
return {
|
|
13240
|
-
message: `Api key for ${input || functionName || 'this api'} is missing`,
|
|
13241
|
-
functionName,
|
|
13242
|
-
type: errorFlag
|
|
13243
|
-
}
|
|
13244
|
-
|
|
13245
|
-
case ERROR_MESSAGES_FLAG.NETWORK_ERROR:
|
|
13246
|
-
if (input === 429) {
|
|
13247
|
-
return {
|
|
13248
|
-
message: `Rate limit for ${functionName || 'this function'} has been reached`,
|
|
13249
|
-
functionName,
|
|
13250
|
-
type: ERROR_MESSAGES_FLAG.RATE_LIMIT
|
|
13251
|
-
}
|
|
13252
|
-
}
|
|
13253
|
-
return {
|
|
13254
|
-
message: `Api failed with status code ${input}`,
|
|
13255
|
-
functionName,
|
|
13256
|
-
type: errorFlag
|
|
13257
|
-
}
|
|
13258
|
-
|
|
13259
|
-
case ERROR_MESSAGES_FLAG.MISSING_PARAM:
|
|
13260
|
-
return {
|
|
13261
|
-
message: `Missing param: ${input}`,
|
|
13262
|
-
functionName,
|
|
13263
|
-
type: errorFlag
|
|
13264
|
-
}
|
|
13265
|
-
|
|
13266
|
-
case ERROR_MESSAGES_FLAG.ENS:
|
|
13267
|
-
return {
|
|
13268
|
-
message: `${input} is not a supported ens name`,
|
|
13269
|
-
functionName,
|
|
13270
|
-
type: errorFlag
|
|
13271
|
-
}
|
|
13272
|
-
|
|
13273
|
-
case ERROR_MESSAGES_FLAG.CUSTOM:
|
|
13274
|
-
return {
|
|
13275
|
-
message: input.message,
|
|
13276
|
-
functionName,
|
|
13277
|
-
type: errorFlag,
|
|
13278
|
-
reason: input.reason || input.message
|
|
13279
|
-
}
|
|
13280
|
-
|
|
13281
|
-
case ERROR_MESSAGES_FLAG.MAX_PAGE_LIMIT:
|
|
13282
|
-
return {
|
|
13283
|
-
message: `Max page limit is ${MAX_PAGE_LIMIT}`,
|
|
13284
|
-
functionName,
|
|
13285
|
-
type: errorFlag
|
|
13286
|
-
}
|
|
13287
|
-
|
|
13288
|
-
case ERROR_MESSAGES_FLAG.INVALID_API_KEY:
|
|
13289
|
-
return {
|
|
13290
|
-
message: `${input}: Invalid API key`,
|
|
13291
|
-
functionName,
|
|
13292
|
-
type: errorFlag
|
|
13293
|
-
}
|
|
13294
|
-
|
|
13295
|
-
default:
|
|
13296
|
-
return {
|
|
13297
|
-
message: 'An unexpected error occured',
|
|
13298
|
-
functionName,
|
|
13299
|
-
type: errorFlag,
|
|
13300
|
-
reason: input
|
|
13301
|
-
}
|
|
13302
|
-
}
|
|
13303
|
-
};
|
|
13304
|
-
|
|
13305
|
-
|
|
13306
|
-
|
|
13307
|
-
|
|
13308
|
-
|
|
13309
|
-
const checkRequiredParams = (inputMap) => {
|
|
13310
|
-
for (const key in inputMap) {
|
|
13311
|
-
if (!inputMap[key]) {
|
|
13312
|
-
const stack = new Error().stack?.split('\n')[2];
|
|
13313
|
-
console.log('STACK LINE:', stack);
|
|
13314
|
-
|
|
13315
|
-
const match = stack?.match(/at (.+?) \(/);
|
|
13316
|
-
const rawFnName = match?.[1];
|
|
13317
|
-
const parentFunctionName = rawFnName?.split('.').pop() || 'anonymous';
|
|
13318
|
-
|
|
13319
|
-
const paramName = key;
|
|
13320
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.MISSING_PARAM, paramName, parentFunctionName);
|
|
13321
|
-
}
|
|
13322
|
-
}
|
|
13323
|
-
};
|
|
13324
|
-
|
|
13325
13197
|
async function handleScanRequest({
|
|
13198
|
+
scanKey,
|
|
13199
|
+
baseUrl,
|
|
13326
13200
|
type,
|
|
13201
|
+
chain,
|
|
13327
13202
|
address,
|
|
13328
13203
|
startDate,
|
|
13329
13204
|
endDate,
|
|
13330
13205
|
page = 1,
|
|
13331
|
-
offset = 10
|
|
13332
|
-
apiKey,
|
|
13333
|
-
functionName,
|
|
13334
|
-
chainId,
|
|
13335
|
-
network
|
|
13206
|
+
offset = 10
|
|
13336
13207
|
}) {
|
|
13337
|
-
const
|
|
13338
|
-
|
|
13339
|
-
|
|
13340
|
-
|
|
13341
|
-
|
|
13342
|
-
|
|
13343
|
-
if (!isAddress$1.isAddress(address)) {
|
|
13344
|
-
const ensName = address;
|
|
13345
|
-
address = await fromEnsNameToAddress$1.fromEnsNameToAddress(address);
|
|
13346
|
-
if (!address) {
|
|
13347
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.ENS, ensName, functionName)
|
|
13348
|
-
}
|
|
13208
|
+
const API_KEY = window.localStorage.getItem(scanKey);
|
|
13209
|
+
if (!API_KEY) return `${scanKey}${ERROR_MESSAGES_FLAG.MISSING_KEY}`
|
|
13210
|
+
if (API_KEY === 'xxxx') return `${scanKey}${ERROR_MESSAGES_FLAG.RATE_LIMIT}`
|
|
13211
|
+
if (offset > MAX_PAGE_LIMIT) {
|
|
13212
|
+
return ERROR_MESSAGES_FLAG.MAX_PAGE_LIMIT
|
|
13349
13213
|
}
|
|
13350
13214
|
|
|
13351
|
-
|
|
13352
|
-
|
|
13215
|
+
let chainId = CHAIN_ID_MAP[chain?.toLowerCase()];
|
|
13216
|
+
if (!chainId) return `${scanKey}${ERROR_MESSAGES_FLAG.INVALID_CHAIN}`
|
|
13217
|
+
|
|
13218
|
+
if (!isAddress(address)) {
|
|
13219
|
+
address = await fromEnsNameToAddress(address);
|
|
13220
|
+
}
|
|
13353
13221
|
|
|
13354
|
-
if (!
|
|
13355
|
-
return
|
|
13356
|
-
message: 'Api not found',
|
|
13357
|
-
reason: ` Api not found for: ${functionName}`
|
|
13358
|
-
}, functionName)
|
|
13222
|
+
if (!address) {
|
|
13223
|
+
return `${address}${ERROR_MESSAGES_FLAG.INVALID_PARAM}`
|
|
13359
13224
|
}
|
|
13360
13225
|
|
|
13361
13226
|
const ACTION_MAP = {
|
|
@@ -13366,40 +13231,41 @@ async function handleScanRequest({
|
|
|
13366
13231
|
};
|
|
13367
13232
|
|
|
13368
13233
|
const action = ACTION_MAP[type];
|
|
13369
|
-
if (!action) return
|
|
13234
|
+
if (!action) return `${scanKey}${ERROR_MESSAGES_FLAG.INVALID_TYPE}`
|
|
13235
|
+
|
|
13236
|
+
if (scanKey === SERVICE_API_KEY.Basescan) chainId = 'base';
|
|
13237
|
+
if (scanKey === SERVICE_API_KEY.Gnosisscan) chainId = 'gnosis';
|
|
13370
13238
|
|
|
13371
|
-
let url = `${baseUrl}?chainid=${chainId}&module=account&action=${action}&apikey=${
|
|
13239
|
+
let url = `${baseUrl}?chainid=${chainId}&module=account&action=${action}&apikey=${API_KEY}`;
|
|
13372
13240
|
|
|
13373
13241
|
if (['all-txns', 'token-txns', 'nft-txns'].includes(type)) {
|
|
13242
|
+
if (!address) return `${scanKey}${ERROR_MESSAGES_FLAG.INVALID_ADDRESS}`
|
|
13374
13243
|
url += `&address=${address}&startblock=0&endblock=99999999&sort=asc`;
|
|
13375
13244
|
|
|
13376
13245
|
if (!isNaN(startDate) && !isNaN(endDate)) {
|
|
13377
13246
|
const [startBlock, endBlock] = await Promise.all([
|
|
13378
|
-
|
|
13379
|
-
|
|
13247
|
+
fromTimeStampToBlock(toTimestamp(startDate), chain, API_KEY),
|
|
13248
|
+
fromTimeStampToBlock(toTimestamp(endDate), chain, API_KEY)
|
|
13380
13249
|
]);
|
|
13381
|
-
url += `&startblock=${startBlock
|
|
13250
|
+
url += `&startblock=${startBlock}&endblock=${endBlock}`;
|
|
13382
13251
|
}
|
|
13383
13252
|
url += `&page=${page}&offset=${offset}`;
|
|
13384
13253
|
}
|
|
13385
13254
|
|
|
13386
13255
|
try {
|
|
13387
13256
|
const res = await fetch(url);
|
|
13388
|
-
if (!res.ok) {
|
|
13389
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.NETWORK_ERROR, res.status, functionName)
|
|
13390
|
-
}
|
|
13257
|
+
if (!res.ok) throw new Error(`HTTP error: ${res.status}`)
|
|
13391
13258
|
const json = await res.json();
|
|
13392
13259
|
|
|
13393
13260
|
if (typeof json.result === 'string') {
|
|
13394
|
-
if (json.result.includes('Invalid API Key'))
|
|
13395
|
-
|
|
13396
|
-
if (json.result.includes('Max rate limit reached'))
|
|
13397
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.RATE_LIMIT, apiInfo.apiKeyName, functionName)
|
|
13261
|
+
if (json.result.includes('Invalid API Key')) return `${scanKey}${ERROR_MESSAGES_FLAG.INVALID_API_KEY}`
|
|
13262
|
+
if (json.result.includes('Max rate limit reached')) return `${scanKey}${ERROR_MESSAGES_FLAG.RATE_LIMIT}`
|
|
13398
13263
|
}
|
|
13399
13264
|
|
|
13400
13265
|
return json.result
|
|
13401
13266
|
} catch (err) {
|
|
13402
|
-
|
|
13267
|
+
console.error(`[${scanKey}]`, err);
|
|
13268
|
+
return ERROR_MESSAGES_FLAG.DEFAULT
|
|
13403
13269
|
}
|
|
13404
13270
|
}
|
|
13405
13271
|
|
|
@@ -13417,9 +13283,6 @@ const fromUsernameToFid = async (username, apiKey) => {
|
|
|
13417
13283
|
const user = users.find(user => user.username === username);
|
|
13418
13284
|
return user && user.fid || null;
|
|
13419
13285
|
};
|
|
13420
|
-
var fromUsernameToFid$1 = {
|
|
13421
|
-
fromUsernameToFid
|
|
13422
|
-
};
|
|
13423
13286
|
|
|
13424
13287
|
// remove nested structure from the response
|
|
13425
13288
|
const removeNestedStructure = (json) => {
|
|
@@ -13434,22 +13297,13 @@ const removeNestedStructure = (json) => {
|
|
|
13434
13297
|
});
|
|
13435
13298
|
};
|
|
13436
13299
|
|
|
13437
|
-
/* global window */
|
|
13438
|
-
|
|
13439
13300
|
async function FIREFLY() {
|
|
13440
13301
|
const [platform, contentType, identifier, start = 0, end = 10] = argsToArray(arguments);
|
|
13441
|
-
const missingParamsError = checkRequiredParams({ platform, contentType, identifier });
|
|
13442
|
-
|
|
13443
|
-
if (missingParamsError) {
|
|
13444
|
-
return missingParamsError
|
|
13445
|
-
}
|
|
13446
|
-
|
|
13447
13302
|
if (end > MAX_PAGE_LIMIT) {
|
|
13448
|
-
return
|
|
13303
|
+
return ERROR_MESSAGES_FLAG.MAX_PAGE_LIMIT
|
|
13449
13304
|
}
|
|
13450
|
-
|
|
13451
|
-
|
|
13452
|
-
if (!API_KEY) return errorMessageHandler(ERROR_MESSAGES_FLAG.MISSING_KEY, SERVICES_API_KEY.Firefly)
|
|
13305
|
+
const API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Firefly);
|
|
13306
|
+
if (!API_KEY) return `${SERVICE_API_KEY.Firefly}${ERROR_MESSAGES_FLAG.MISSING_KEY}`
|
|
13453
13307
|
|
|
13454
13308
|
const baseUrl = 'https://openapi.firefly.land/v1/fileverse/fetch';
|
|
13455
13309
|
const headers = { 'x-api-key': API_KEY };
|
|
@@ -13465,14 +13319,10 @@ async function FIREFLY() {
|
|
|
13465
13319
|
replies: 'lenspostid'
|
|
13466
13320
|
}
|
|
13467
13321
|
};
|
|
13468
|
-
|
|
13469
|
-
|
|
13470
|
-
|
|
13471
|
-
|
|
13472
|
-
const platformContentType = platformType[contentType];
|
|
13473
|
-
if (!platformContentType) {
|
|
13474
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.INVALID_PARAM, { contentType })
|
|
13475
|
-
}
|
|
13322
|
+
|
|
13323
|
+
const platformType = typeMap[platform]?.[contentType];
|
|
13324
|
+
if (!platformType) return `${SERVICE_API_KEY.Firefly}${ERROR_MESSAGES_FLAG.INVALID_TYPE}`
|
|
13325
|
+
|
|
13476
13326
|
const query = identifier
|
|
13477
13327
|
.split(',')
|
|
13478
13328
|
.map((s) => s.trim())
|
|
@@ -13487,7 +13337,7 @@ async function FIREFLY() {
|
|
|
13487
13337
|
|
|
13488
13338
|
try {
|
|
13489
13339
|
const res = await fetch(url.toString(), { headers });
|
|
13490
|
-
if (!res.ok)
|
|
13340
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`)
|
|
13491
13341
|
|
|
13492
13342
|
const json = await res.json();
|
|
13493
13343
|
if (!Array.isArray(json?.data)) return []
|
|
@@ -13503,21 +13353,19 @@ async function FIREFLY() {
|
|
|
13503
13353
|
return flat
|
|
13504
13354
|
})
|
|
13505
13355
|
} catch (err) {
|
|
13506
|
-
|
|
13356
|
+
console.error('FIREFLY fetch error:', err);
|
|
13357
|
+
return ERROR_MESSAGES_FLAG.DEFAULT
|
|
13507
13358
|
}
|
|
13508
13359
|
}
|
|
13509
13360
|
|
|
13510
13361
|
async function LENS() {
|
|
13511
13362
|
const [contentType, identifier, start = 0, end = 10] = argsToArray(arguments);
|
|
13512
|
-
const
|
|
13513
|
-
if (
|
|
13514
|
-
|
|
13515
|
-
}
|
|
13363
|
+
const API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Firefly);
|
|
13364
|
+
if (!API_KEY) return `${SERVICE_API_KEY.Firefly}${ERROR_MESSAGES_FLAG.MISSING_KEY}`
|
|
13365
|
+
|
|
13516
13366
|
if (end > MAX_PAGE_LIMIT) {
|
|
13517
|
-
return
|
|
13367
|
+
return ERROR_MESSAGES_FLAG.MAX_PAGE_LIMIT
|
|
13518
13368
|
}
|
|
13519
|
-
const API_KEY = window.localStorage.getItem(SERVICES_API_KEY.Firefly);
|
|
13520
|
-
if (!API_KEY) return errorMessageHandler(ERROR_MESSAGES_FLAG.MISSING_KEY, SERVICES_API_KEY.Firefly)
|
|
13521
13369
|
|
|
13522
13370
|
const baseUrl = 'https://openapi.firefly.land/v1/fileverse/fetch';
|
|
13523
13371
|
const headers = { 'x-api-key': API_KEY };
|
|
@@ -13526,10 +13374,10 @@ async function LENS() {
|
|
|
13526
13374
|
posts: 'lensid',
|
|
13527
13375
|
replies: 'lenspostid'
|
|
13528
13376
|
};
|
|
13529
|
-
|
|
13530
|
-
|
|
13531
|
-
|
|
13532
|
-
|
|
13377
|
+
|
|
13378
|
+
const platformType = typeMap[contentType];
|
|
13379
|
+
if (!platformType) return `Lens: ${ERROR_MESSAGES_FLAG.INVALID_TYPE}`
|
|
13380
|
+
|
|
13533
13381
|
const query = identifier
|
|
13534
13382
|
.split(',')
|
|
13535
13383
|
.map((s) => s.trim())
|
|
@@ -13538,15 +13386,13 @@ async function LENS() {
|
|
|
13538
13386
|
|
|
13539
13387
|
const url = new URL(baseUrl);
|
|
13540
13388
|
url.searchParams.set('query', query);
|
|
13541
|
-
url.searchParams.set('type',
|
|
13389
|
+
url.searchParams.set('type', platformType);
|
|
13542
13390
|
url.searchParams.set('start', String(start));
|
|
13543
13391
|
url.searchParams.set('end', String(end));
|
|
13544
13392
|
|
|
13545
13393
|
try {
|
|
13546
13394
|
const res = await fetch(url.toString(), { headers });
|
|
13547
|
-
if (!res.ok) {
|
|
13548
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.NETWORK_ERROR, res.status)
|
|
13549
|
-
}
|
|
13395
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`)
|
|
13550
13396
|
|
|
13551
13397
|
const json = await res.json();
|
|
13552
13398
|
if (!Array.isArray(json?.data)) return []
|
|
@@ -13562,21 +13408,18 @@ async function LENS() {
|
|
|
13562
13408
|
return flat
|
|
13563
13409
|
})
|
|
13564
13410
|
} catch (err) {
|
|
13565
|
-
|
|
13411
|
+
console.error('LENS fetch error:', err);
|
|
13412
|
+
return ERROR_MESSAGES_FLAG.DEFAULT
|
|
13566
13413
|
}
|
|
13567
13414
|
}
|
|
13568
13415
|
|
|
13569
13416
|
async function FARCASTER() {
|
|
13570
13417
|
const [contentType, identifier, start = 0, end = 10] = argsToArray(arguments);
|
|
13571
|
-
const
|
|
13572
|
-
if (
|
|
13573
|
-
return missingParamsError
|
|
13574
|
-
}
|
|
13418
|
+
const API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Firefly);
|
|
13419
|
+
if (!API_KEY) return `${SERVICE_API_KEY.Firefly}${ERROR_MESSAGES_FLAG.MISSING_KEY}`
|
|
13575
13420
|
if (end > MAX_PAGE_LIMIT) {
|
|
13576
|
-
return
|
|
13421
|
+
return ERROR_MESSAGES_FLAG.MAX_PAGE_LIMIT
|
|
13577
13422
|
}
|
|
13578
|
-
const API_KEY = window.localStorage.getItem(SERVICES_API_KEY.Firefly);
|
|
13579
|
-
if (!API_KEY) return errorMessageHandler(ERROR_MESSAGES_FLAG.MISSING_KEY, SERVICES_API_KEY.Firefly)
|
|
13580
13423
|
const baseUrl = 'https://openapi.firefly.land/v1/fileverse/fetch';
|
|
13581
13424
|
const headers = { 'x-api-key': API_KEY };
|
|
13582
13425
|
|
|
@@ -13586,10 +13429,9 @@ async function FARCASTER() {
|
|
|
13586
13429
|
channels: 'farcasterchannels'
|
|
13587
13430
|
};
|
|
13588
13431
|
|
|
13589
|
-
const
|
|
13590
|
-
if (!
|
|
13591
|
-
|
|
13592
|
-
}
|
|
13432
|
+
const platformType = typeMap[contentType];
|
|
13433
|
+
if (!platformType) return `Farcaster: ${ERROR_MESSAGES_FLAG.INVALID_TYPE}`
|
|
13434
|
+
|
|
13593
13435
|
const query = identifier
|
|
13594
13436
|
.split(',')
|
|
13595
13437
|
.map((s) => s.trim())
|
|
@@ -13598,13 +13440,13 @@ async function FARCASTER() {
|
|
|
13598
13440
|
|
|
13599
13441
|
const url = new URL(baseUrl);
|
|
13600
13442
|
url.searchParams.set('query', query);
|
|
13601
|
-
url.searchParams.set('type',
|
|
13443
|
+
url.searchParams.set('type', platformType);
|
|
13602
13444
|
url.searchParams.set('start', String(start));
|
|
13603
13445
|
url.searchParams.set('end', String(end));
|
|
13604
13446
|
|
|
13605
13447
|
try {
|
|
13606
13448
|
const res = await fetch(url.toString(), { headers });
|
|
13607
|
-
if (!res.ok)
|
|
13449
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`)
|
|
13608
13450
|
|
|
13609
13451
|
const json = await res.json();
|
|
13610
13452
|
if (!Array.isArray(json?.data)) return []
|
|
@@ -13620,24 +13462,24 @@ async function FARCASTER() {
|
|
|
13620
13462
|
return flat
|
|
13621
13463
|
})
|
|
13622
13464
|
} catch (err) {
|
|
13623
|
-
|
|
13465
|
+
console.error('Farcaster fetch error:', err);
|
|
13466
|
+
return ERROR_MESSAGES_FLAG.DEFAULT
|
|
13624
13467
|
}
|
|
13625
13468
|
}
|
|
13626
13469
|
|
|
13627
13470
|
async function BLOCKSCOUT() {
|
|
13628
13471
|
let [address, type, chain, startTimestamp, endTimestamp, page = 1, offset = 10] = argsToArray(arguments);
|
|
13629
|
-
const missingParamsError = checkRequiredParams({ address, type });
|
|
13630
|
-
|
|
13631
|
-
if (missingParamsError) {
|
|
13632
|
-
return missingParamsError
|
|
13633
|
-
}
|
|
13634
13472
|
if (offset > MAX_PAGE_LIMIT) {
|
|
13635
|
-
return
|
|
13473
|
+
return ERROR_MESSAGES_FLAG.MAX_PAGE_LIMIT
|
|
13636
13474
|
}
|
|
13637
13475
|
if (!chain) {
|
|
13638
13476
|
chain = 'ethereum';
|
|
13639
13477
|
}
|
|
13640
13478
|
|
|
13479
|
+
if (!type) {
|
|
13480
|
+
return 'TYPE_MISSING'
|
|
13481
|
+
}
|
|
13482
|
+
|
|
13641
13483
|
if (!startTimestamp) {
|
|
13642
13484
|
const currentTimestamp = Date.now();
|
|
13643
13485
|
startTimestamp = currentTimestamp - 30 * 24 * 60 * 60 * 1000;
|
|
@@ -13652,19 +13494,16 @@ async function BLOCKSCOUT() {
|
|
|
13652
13494
|
endTimestamp = toTimestamp(endTimestamp);
|
|
13653
13495
|
}
|
|
13654
13496
|
|
|
13655
|
-
if (!isAddress
|
|
13656
|
-
|
|
13657
|
-
address = await fromEnsNameToAddress$1.fromEnsNameToAddress(address);
|
|
13658
|
-
if (!address) {
|
|
13659
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.ENS, ensName)
|
|
13660
|
-
}
|
|
13497
|
+
if (!isAddress(address)) {
|
|
13498
|
+
address = await fromEnsNameToAddress(address);
|
|
13661
13499
|
}
|
|
13662
|
-
const hostname = BLOCKSCOUT_CHAINS_MAP[chain];
|
|
13663
13500
|
|
|
13664
|
-
if (!
|
|
13665
|
-
return
|
|
13501
|
+
if (!address) {
|
|
13502
|
+
return `${address}${ERROR_MESSAGES_FLAG.INVALID_PARAM}`
|
|
13666
13503
|
}
|
|
13667
13504
|
|
|
13505
|
+
const hostname = BLOCKSCOUT_CHAINS_MAP[chain];
|
|
13506
|
+
|
|
13668
13507
|
let requestUrl;
|
|
13669
13508
|
|
|
13670
13509
|
switch (type) {
|
|
@@ -13678,26 +13517,22 @@ async function BLOCKSCOUT() {
|
|
|
13678
13517
|
requestUrl = `${hostname}/api?module=account&action=tokenlist&address=${address}`;
|
|
13679
13518
|
break
|
|
13680
13519
|
default:
|
|
13681
|
-
return
|
|
13520
|
+
return 'INVALID_TYPE'
|
|
13682
13521
|
}
|
|
13683
13522
|
try {
|
|
13684
13523
|
const response = await fetch(requestUrl);
|
|
13685
13524
|
|
|
13686
13525
|
if (!response.ok) {
|
|
13687
|
-
|
|
13526
|
+
throw new Error(`HTTP error! Status: ${response.status}`)
|
|
13688
13527
|
}
|
|
13689
13528
|
const json = await response.json();
|
|
13529
|
+
|
|
13530
|
+
console.log(json);
|
|
13690
13531
|
if (json?.result?.includes('Invalid parameter(s)')) {
|
|
13691
|
-
return
|
|
13692
|
-
message: 'Invalid parameters',
|
|
13693
|
-
reason: json.result
|
|
13694
|
-
})
|
|
13532
|
+
return `INVALID_REQUEST_PARAMS`
|
|
13695
13533
|
}
|
|
13696
13534
|
if (json?.result?.includes('Not found')) {
|
|
13697
|
-
return
|
|
13698
|
-
message: 'Address information not found',
|
|
13699
|
-
reason: json.result
|
|
13700
|
-
})
|
|
13535
|
+
return `ADDRESS_NOT_FOUND`
|
|
13701
13536
|
}
|
|
13702
13537
|
|
|
13703
13538
|
if (type === 'stat') {
|
|
@@ -13717,75 +13552,52 @@ async function BLOCKSCOUT() {
|
|
|
13717
13552
|
*/
|
|
13718
13553
|
return json.result
|
|
13719
13554
|
} catch (error) {
|
|
13720
|
-
return
|
|
13555
|
+
return 'ERROR IN FETCHING'
|
|
13721
13556
|
}
|
|
13722
13557
|
}
|
|
13723
13558
|
|
|
13724
13559
|
async function BASE() {
|
|
13725
|
-
const [type, address, startDate, endDate, page, limit] = argsToArray(arguments);
|
|
13726
|
-
const missingParamsError = checkRequiredParams({ type, address });
|
|
13727
|
-
|
|
13728
|
-
if (missingParamsError) {
|
|
13729
|
-
return missingParamsError
|
|
13730
|
-
}
|
|
13731
|
-
const API_KEY = window.localStorage.getItem(SERVICES_API_KEY.Basescan);
|
|
13732
|
-
if (!API_KEY) return errorMessageHandler(ERROR_MESSAGES_FLAG.MISSING_KEY, SERVICES_API_KEY.Basescan)
|
|
13733
|
-
if (limit > MAX_PAGE_LIMIT) {
|
|
13734
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.MAX_PAGE_LIMIT)
|
|
13735
|
-
}
|
|
13560
|
+
const [type, chain, address, startDate, endDate, page, limit] = argsToArray(arguments);
|
|
13736
13561
|
return handleScanRequest({
|
|
13562
|
+
scanKey: SERVICE_API_KEY.Basescan,
|
|
13563
|
+
baseUrl: 'https://api.basescan.org/api',
|
|
13737
13564
|
type,
|
|
13565
|
+
chain,
|
|
13738
13566
|
address,
|
|
13739
13567
|
startDate,
|
|
13740
13568
|
endDate,
|
|
13741
13569
|
page,
|
|
13742
|
-
offset: limit
|
|
13743
|
-
apiKey: API_KEY,
|
|
13744
|
-
functionName: 'BASE',
|
|
13745
|
-
chainId: CHAIN_ID_MAP.base,
|
|
13746
|
-
network: 'base'
|
|
13570
|
+
offset: limit
|
|
13747
13571
|
})
|
|
13748
13572
|
}
|
|
13749
13573
|
async function GNOSIS() {
|
|
13750
|
-
const [type, address, startDate, endDate, page, limit] = argsToArray(arguments);
|
|
13751
|
-
const missingParamsError = checkRequiredParams({ type, address });
|
|
13752
|
-
|
|
13753
|
-
if (missingParamsError) {
|
|
13754
|
-
return missingParamsError
|
|
13755
|
-
}
|
|
13756
|
-
const API_KEY = window.localStorage.getItem(SERVICES_API_KEY.Gnosisscan);
|
|
13757
|
-
if (!API_KEY) return errorMessageHandler(ERROR_MESSAGES_FLAG.MISSING_KEY, SERVICES_API_KEY.Gnosisscan)
|
|
13758
|
-
if (limit > MAX_PAGE_LIMIT) {
|
|
13759
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.MAX_PAGE_LIMIT)
|
|
13760
|
-
}
|
|
13574
|
+
const [type, chain, address, startDate, endDate, page, limit] = argsToArray(arguments);
|
|
13761
13575
|
return handleScanRequest({
|
|
13576
|
+
scanKey: SERVICE_API_KEY.Gnosisscan,
|
|
13577
|
+
baseUrl: 'https://api.gnosisscan.io/api',
|
|
13762
13578
|
type,
|
|
13763
|
-
|
|
13579
|
+
chain,
|
|
13764
13580
|
address,
|
|
13765
13581
|
startDate,
|
|
13766
13582
|
endDate,
|
|
13767
13583
|
page,
|
|
13768
|
-
|
|
13769
|
-
offset: limit,
|
|
13770
|
-
chainId: CHAIN_ID_MAP.gnosis,
|
|
13771
|
-
functionName: 'GNOSIS'
|
|
13584
|
+
offset: limit
|
|
13772
13585
|
})
|
|
13773
13586
|
}
|
|
13774
13587
|
|
|
13775
13588
|
async function NEYNAR() {
|
|
13776
13589
|
const [username] = argsToArray(arguments);
|
|
13777
|
-
const
|
|
13590
|
+
const API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Neynar);
|
|
13591
|
+
if (!API_KEY) return `${SERVICE_API_KEY.Neynar}${ERROR_MESSAGES_FLAG.MISSING_KEY}`
|
|
13778
13592
|
|
|
13779
|
-
if (
|
|
13780
|
-
return
|
|
13593
|
+
if (!username) {
|
|
13594
|
+
return `${SERVICE_API_KEY.Neynar}${ERROR_MESSAGES_FLAG.INVALID_PARAM}`
|
|
13781
13595
|
}
|
|
13782
|
-
const API_KEY = window.localStorage.getItem(SERVICES_API_KEY.Neynar);
|
|
13783
|
-
if (!API_KEY) return errorMessageHandler(ERROR_MESSAGES_FLAG.MISSING_KEY, SERVICES_API_KEY.Neynar)
|
|
13784
13596
|
|
|
13785
|
-
const fid = await fromUsernameToFid
|
|
13597
|
+
const fid = await fromUsernameToFid(username, API_KEY);
|
|
13786
13598
|
|
|
13787
13599
|
if (!fid) {
|
|
13788
|
-
return
|
|
13600
|
+
return `${SERVICE_API_KEY.Neynar}${ERROR_MESSAGES_FLAG.INVALID_PARAM}`
|
|
13789
13601
|
}
|
|
13790
13602
|
|
|
13791
13603
|
const url = `https://api.neynar.com/v2/farcaster/followers?fid=${fid}`;
|
|
@@ -13797,9 +13609,7 @@ async function NEYNAR() {
|
|
|
13797
13609
|
'x-neynar-experimental': 'false'
|
|
13798
13610
|
}
|
|
13799
13611
|
});
|
|
13800
|
-
if (!response.ok) {
|
|
13801
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.NETWORK_ERROR, response.status)
|
|
13802
|
-
}
|
|
13612
|
+
if (!response.ok) throw new Error(`HTTP ${response.status}`)
|
|
13803
13613
|
const json = await response.json();
|
|
13804
13614
|
if (!json?.users?.length) return []
|
|
13805
13615
|
|
|
@@ -13811,108 +13621,83 @@ async function NEYNAR() {
|
|
|
13811
13621
|
city: user.profile?.location?.address?.city || ''
|
|
13812
13622
|
}))
|
|
13813
13623
|
} catch (err) {
|
|
13814
|
-
|
|
13815
|
-
|
|
13816
|
-
}
|
|
13817
|
-
|
|
13818
|
-
|
|
13819
|
-
|
|
13820
|
-
|
|
13821
|
-
|
|
13822
|
-
|
|
13823
|
-
|
|
13824
|
-
|
|
13825
|
-
|
|
13826
|
-
// if (!API_KEY) return `${apiKeyKey}${ERROR_MESSAGES_FLAG.MISSING_KEY}`;
|
|
13827
|
-
// if (!cardId) return `${apiKeyKey}${ERROR_MESSAGES_FLAG.INVALID_PARAM}`;
|
|
13828
|
-
// if(limit > MAX_PAGE_LIMIT){
|
|
13829
|
-
// return ERROR_MESSAGES_FLAG.MAX_PAGE_LIMIT
|
|
13830
|
-
// }
|
|
13831
|
-
|
|
13832
|
-
// const url = new URL(`https://api.gnosispay.com/cards/${cardId}/transactions`);
|
|
13833
|
-
// url.searchParams.set('limit', limit.toString());
|
|
13834
|
-
// url.searchParams.set('offset', offset.toString());
|
|
13624
|
+
console.error('NEYNAR_FETCH_FOLLOWERS error:', err);
|
|
13625
|
+
return ERROR_MESSAGES_FLAG.DEFAULT
|
|
13626
|
+
}
|
|
13627
|
+
}
|
|
13628
|
+
async function GNOSISPAY({ cardId, startDate, endDate, limit = 20, offset = 0 }) {
|
|
13629
|
+
const apiKeyKey = SERVICE_API_KEY.GnosisPay;
|
|
13630
|
+
const API_KEY = window.localStorage.getItem(apiKeyKey);
|
|
13631
|
+
if (!API_KEY) return `${apiKeyKey}${ERROR_MESSAGES_FLAG.MISSING_KEY}`
|
|
13632
|
+
if (!cardId) return `${apiKeyKey}${ERROR_MESSAGES_FLAG.INVALID_PARAM}`
|
|
13633
|
+
if (limit > MAX_PAGE_LIMIT) {
|
|
13634
|
+
return ERROR_MESSAGES_FLAG.MAX_PAGE_LIMIT
|
|
13635
|
+
}
|
|
13835
13636
|
|
|
13836
|
-
|
|
13837
|
-
|
|
13838
|
-
|
|
13637
|
+
const url = new URL(`https://api.gnosispay.com/cards/${cardId}/transactions`);
|
|
13638
|
+
url.searchParams.set('limit', limit.toString());
|
|
13639
|
+
url.searchParams.set('offset', offset.toString());
|
|
13839
13640
|
|
|
13840
|
-
|
|
13841
|
-
|
|
13842
|
-
|
|
13641
|
+
if (!isNaN(toTimestamp(startDate))) {
|
|
13642
|
+
url.searchParams.set('startDate', new Date(startDate * 1000).toISOString());
|
|
13643
|
+
}
|
|
13843
13644
|
|
|
13844
|
-
|
|
13845
|
-
|
|
13846
|
-
|
|
13847
|
-
// Authorization: `Bearer ${API_KEY}`,
|
|
13848
|
-
// 'Content-Type': 'application/json',
|
|
13849
|
-
// },
|
|
13850
|
-
// });
|
|
13851
|
-
|
|
13852
|
-
// if (!res.ok) throw new Error(`HTTP error! Status: ${res.status}`);
|
|
13853
|
-
|
|
13854
|
-
// const json = await res.json();
|
|
13855
|
-
|
|
13856
|
-
// if (!Array.isArray(json)) return [];
|
|
13857
|
-
|
|
13858
|
-
// return json.map(tx => ({
|
|
13859
|
-
// createdAt: tx.createdAt,
|
|
13860
|
-
// clearedAt: tx.clearedAt,
|
|
13861
|
-
// country: tx.country,
|
|
13862
|
-
// merchant: tx.merchant,
|
|
13863
|
-
// billingAmount: tx.billingAmount,
|
|
13864
|
-
// billingCurrency: tx.billingCurrency,
|
|
13865
|
-
// transactionAmount: tx.transactionAmount,
|
|
13866
|
-
// transactionCurrency: tx.transactionCurrency,
|
|
13867
|
-
// transactionType: tx.transactionType,
|
|
13868
|
-
// kind: tx.kind,
|
|
13869
|
-
// status: tx.status || null,
|
|
13870
|
-
// mcc: tx.mcc,
|
|
13871
|
-
// }));
|
|
13872
|
-
// } catch (err) {
|
|
13873
|
-
// console.error('GNOSISPAY_CARD_TXNS error:', err);
|
|
13874
|
-
// return ERROR_MESSAGES_FLAG.DEFAULT;
|
|
13875
|
-
// }
|
|
13876
|
-
// }
|
|
13645
|
+
if (!isNaN(toTimestamp(endDate))) {
|
|
13646
|
+
url.searchParams.set('endDate', new Date(endDate * 1000).toISOString());
|
|
13647
|
+
}
|
|
13877
13648
|
|
|
13878
|
-
|
|
13879
|
-
|
|
13880
|
-
|
|
13649
|
+
try {
|
|
13650
|
+
const res = await fetch(url.toString(), {
|
|
13651
|
+
headers: {
|
|
13652
|
+
Authorization: `Bearer ${API_KEY}`,
|
|
13653
|
+
'Content-Type': 'application/json'
|
|
13654
|
+
}
|
|
13655
|
+
});
|
|
13881
13656
|
|
|
13882
|
-
|
|
13883
|
-
return missingParamsError
|
|
13884
|
-
}
|
|
13657
|
+
if (!res.ok) throw new Error(`HTTP error! Status: ${res.status}`)
|
|
13885
13658
|
|
|
13886
|
-
|
|
13659
|
+
const json = await res.json();
|
|
13887
13660
|
|
|
13888
|
-
|
|
13889
|
-
|
|
13661
|
+
if (!Array.isArray(json)) return []
|
|
13662
|
+
|
|
13663
|
+
return json.map((tx) => ({
|
|
13664
|
+
createdAt: tx.createdAt,
|
|
13665
|
+
clearedAt: tx.clearedAt,
|
|
13666
|
+
country: tx.country,
|
|
13667
|
+
merchant: tx.merchant,
|
|
13668
|
+
billingAmount: tx.billingAmount,
|
|
13669
|
+
billingCurrency: tx.billingCurrency,
|
|
13670
|
+
transactionAmount: tx.transactionAmount,
|
|
13671
|
+
transactionCurrency: tx.transactionCurrency,
|
|
13672
|
+
transactionType: tx.transactionType,
|
|
13673
|
+
kind: tx.kind,
|
|
13674
|
+
status: tx.status || null,
|
|
13675
|
+
mcc: tx.mcc
|
|
13676
|
+
}))
|
|
13677
|
+
} catch (err) {
|
|
13678
|
+
console.error('GNOSISPAY_CARD_TXNS error:', err);
|
|
13679
|
+
return ERROR_MESSAGES_FLAG.DEFAULT
|
|
13890
13680
|
}
|
|
13891
|
-
|
|
13892
|
-
|
|
13681
|
+
}
|
|
13682
|
+
|
|
13683
|
+
async function ETHERSCAN(...args) {
|
|
13684
|
+
const [type, chain, address, startDate, endDate, page, limit] = args;
|
|
13893
13685
|
return handleScanRequest({
|
|
13686
|
+
scanKey: SERVICE_API_KEY.Etherscan,
|
|
13687
|
+
baseUrl: 'https://api.etherscan.io/v2/api',
|
|
13894
13688
|
type,
|
|
13689
|
+
chain,
|
|
13895
13690
|
address,
|
|
13896
13691
|
startDate,
|
|
13897
13692
|
endDate,
|
|
13898
13693
|
page,
|
|
13899
|
-
offset: limit
|
|
13900
|
-
chainId,
|
|
13901
|
-
network: chain,
|
|
13902
|
-
functionName: 'ETHERSCAN',
|
|
13903
|
-
apiKey: API_KEY
|
|
13694
|
+
offset: limit
|
|
13904
13695
|
})
|
|
13905
13696
|
}
|
|
13906
13697
|
|
|
13907
|
-
async function COINGECKO() {
|
|
13908
|
-
const
|
|
13909
|
-
|
|
13910
|
-
|
|
13911
|
-
if (missingParamsError) {
|
|
13912
|
-
return missingParamsError
|
|
13913
|
-
}
|
|
13914
|
-
const API_KEY = window.localStorage.getItem(SERVICES_API_KEY.Coingecko);
|
|
13915
|
-
if (!API_KEY) return errorMessageHandler(ERROR_MESSAGES_FLAG.MISSING_KEY, SERVICES_API_KEY.Coingecko)
|
|
13698
|
+
async function COINGECKO(category, param1, param2) {
|
|
13699
|
+
const API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Coingecko);
|
|
13700
|
+
if (!API_KEY) return `${SERVICE_API_KEY.Coingecko}${ERROR_MESSAGES_FLAG.MISSING_KEY}`
|
|
13916
13701
|
|
|
13917
13702
|
const headers = {
|
|
13918
13703
|
accept: 'application/json',
|
|
@@ -13927,7 +13712,7 @@ async function COINGECKO() {
|
|
|
13927
13712
|
const token = param1;
|
|
13928
13713
|
const vsCurrencies = param2;
|
|
13929
13714
|
if (!token) {
|
|
13930
|
-
return
|
|
13715
|
+
return `${SERVICE_API_KEY.Coingecko}${ERROR_MESSAGES_FLAG.INVALID_PARAM}`
|
|
13931
13716
|
}
|
|
13932
13717
|
url = `https://api.coingecko.com/api/v3/simple/price?vs_currencies=${vsCurrencies ? vsCurrencies : 'usd'}&symbols=${token}`;
|
|
13933
13718
|
break
|
|
@@ -13976,7 +13761,7 @@ async function COINGECKO() {
|
|
|
13976
13761
|
}
|
|
13977
13762
|
|
|
13978
13763
|
default:
|
|
13979
|
-
return
|
|
13764
|
+
return `${SERVICE_API_KEY.Coingecko}${ERROR_MESSAGES_FLAG.INVALID_PARAM}`
|
|
13980
13765
|
}
|
|
13981
13766
|
|
|
13982
13767
|
try {
|
|
@@ -13985,10 +13770,12 @@ async function COINGECKO() {
|
|
|
13985
13770
|
|
|
13986
13771
|
if (!response.ok) {
|
|
13987
13772
|
const message = json?.status?.error_message || '';
|
|
13773
|
+
if (response.status === 429) {
|
|
13774
|
+
return `${SERVICE_API_KEY.Coingecko}${ERROR_MESSAGES_FLAG.RATE_LIMIT}`
|
|
13775
|
+
}
|
|
13988
13776
|
if (message.includes('API Key Missing')) {
|
|
13989
|
-
return
|
|
13777
|
+
return `${SERVICE_API_KEY.Coingecko}${ERROR_MESSAGES_FLAG.INVALID_API_KEY}`
|
|
13990
13778
|
}
|
|
13991
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.NETWORK_ERROR, response.status)
|
|
13992
13779
|
}
|
|
13993
13780
|
|
|
13994
13781
|
if (lowerCategory === 'price') {
|
|
@@ -14041,27 +13828,18 @@ async function COINGECKO() {
|
|
|
14041
13828
|
return flat
|
|
14042
13829
|
})
|
|
14043
13830
|
} catch (error) {
|
|
14044
|
-
|
|
13831
|
+
console.error(error);
|
|
13832
|
+
return ERROR_MESSAGES_FLAG.DEFAULT
|
|
14045
13833
|
}
|
|
14046
13834
|
}
|
|
14047
13835
|
|
|
14048
13836
|
async function EOA() {
|
|
13837
|
+
const API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Etherscan);
|
|
13838
|
+
if (!API_KEY) return `${SERVICE_API_KEY.Etherscan}${ERROR_MESSAGES_FLAG.MISSING_KEY}`
|
|
14049
13839
|
let [addresses, category, chains, startTime, endTime, page = 1, offset = 10] = argsToArray(arguments);
|
|
14050
|
-
|
|
14051
|
-
const optionalParams = category === 'balance' ? {} : {startTime, endTime};
|
|
14052
|
-
|
|
14053
|
-
const missingParamsError = checkRequiredParams({ addresses, category, chains, ...optionalParams });
|
|
14054
|
-
|
|
14055
|
-
if (missingParamsError) {
|
|
14056
|
-
return missingParamsError
|
|
14057
|
-
}
|
|
14058
|
-
|
|
14059
13840
|
if (offset > MAX_PAGE_LIMIT) {
|
|
14060
|
-
return
|
|
13841
|
+
return ERROR_MESSAGES_FLAG.MAX_PAGE_LIMIT
|
|
14061
13842
|
}
|
|
14062
|
-
|
|
14063
|
-
const API_KEY = window.localStorage.getItem(SERVICES_API_KEY.Etherscan);
|
|
14064
|
-
if (!API_KEY) return errorMessageHandler(ERROR_MESSAGES_FLAG.MISSING_KEY, SERVICES_API_KEY.Etherscan)
|
|
14065
13843
|
const INPUTS = addresses
|
|
14066
13844
|
.split(',')
|
|
14067
13845
|
.map((a) => a.trim())
|
|
@@ -14074,21 +13852,21 @@ async function EOA() {
|
|
|
14074
13852
|
// Map: finalAddress => ENS name (if applicable)
|
|
14075
13853
|
const ADDRESS_MAP = {};
|
|
14076
13854
|
for (const input of INPUTS) {
|
|
14077
|
-
if (isAddress
|
|
13855
|
+
if (isAddress(input)) {
|
|
14078
13856
|
ADDRESS_MAP[input.toLowerCase()] = null; // it's a direct address
|
|
14079
13857
|
} else {
|
|
14080
13858
|
try {
|
|
14081
|
-
const resolved = await fromEnsNameToAddress
|
|
13859
|
+
const resolved = await fromEnsNameToAddress(input); // ENS -> address
|
|
14082
13860
|
if (resolved) ADDRESS_MAP[resolved.toLowerCase()] = input;
|
|
14083
13861
|
} catch {
|
|
14084
|
-
return
|
|
13862
|
+
return `${input}${ERROR_MESSAGES_FLAG.INVALID_PARAM}`
|
|
14085
13863
|
}
|
|
14086
13864
|
}
|
|
14087
13865
|
}
|
|
14088
13866
|
const ADDRS = Object.keys(ADDRESS_MAP);
|
|
14089
13867
|
for (const chain of CHAINS) {
|
|
14090
13868
|
const chainId = CHAIN_ID_MAP[chain];
|
|
14091
|
-
if (!chainId) return
|
|
13869
|
+
if (!chainId) return ERROR_MESSAGES_FLAG.UNSUPPORTED_CHAIN
|
|
14092
13870
|
if (category === 'balance') {
|
|
14093
13871
|
for (let i = 0; i < ADDRS.length; i += 20) {
|
|
14094
13872
|
const slice = ADDRS.slice(i, i + 20).join(',');
|
|
@@ -14098,7 +13876,7 @@ async function EOA() {
|
|
|
14098
13876
|
`&module=account&action=${action}&address=${slice}` +
|
|
14099
13877
|
`&page=${page}&offset=100&apikey=${API_KEY}`;
|
|
14100
13878
|
const data = await fetchJSON(url);
|
|
14101
|
-
if (
|
|
13879
|
+
if (typeof data === 'string') return data
|
|
14102
13880
|
data.forEach((tx) =>
|
|
14103
13881
|
out.push({
|
|
14104
13882
|
chain,
|
|
@@ -14111,14 +13889,8 @@ async function EOA() {
|
|
|
14111
13889
|
continue
|
|
14112
13890
|
}
|
|
14113
13891
|
if (category === 'txns') {
|
|
14114
|
-
const startBlock = await
|
|
14115
|
-
const endBlock = await
|
|
14116
|
-
if (!startBlock?.toString()) {
|
|
14117
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.INVALID_PARAM, { startTime })
|
|
14118
|
-
}
|
|
14119
|
-
if (!endBlock?.toString()) {
|
|
14120
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.INVALID_PARAM, { endTime })
|
|
14121
|
-
}
|
|
13892
|
+
const startBlock = await fromTimeStampToBlock(toTimestamp(startTime), chain, API_KEY);
|
|
13893
|
+
const endBlock = await fromTimeStampToBlock(toTimestamp(endTime), chain, API_KEY);
|
|
14122
13894
|
for (const addr of ADDRS) {
|
|
14123
13895
|
const url =
|
|
14124
13896
|
`https://api.etherscan.io/v2/api?chainid=${chainId}` +
|
|
@@ -14126,7 +13898,7 @@ async function EOA() {
|
|
|
14126
13898
|
`&startblock=${startBlock}&endblock=${endBlock}` +
|
|
14127
13899
|
`&page=${page}&offset=${offset}&sort=asc&apikey=${API_KEY}`;
|
|
14128
13900
|
const data = await fetchJSON(url);
|
|
14129
|
-
if (
|
|
13901
|
+
if (typeof data === 'string') return data
|
|
14130
13902
|
data.forEach((tx) =>
|
|
14131
13903
|
out.push({
|
|
14132
13904
|
chain,
|
|
@@ -14138,7 +13910,7 @@ async function EOA() {
|
|
|
14138
13910
|
}
|
|
14139
13911
|
continue
|
|
14140
13912
|
}
|
|
14141
|
-
return
|
|
13913
|
+
return ERROR_MESSAGES_FLAG.INVALID_CATEGORY
|
|
14142
13914
|
}
|
|
14143
13915
|
|
|
14144
13916
|
return out
|
|
@@ -14146,27 +13918,21 @@ async function EOA() {
|
|
|
14146
13918
|
async function fetchJSON(url) {
|
|
14147
13919
|
try {
|
|
14148
13920
|
const res = await fetch(url);
|
|
14149
|
-
if (!res.ok) {
|
|
14150
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.NETWORK_ERROR, res.status)
|
|
14151
|
-
}
|
|
13921
|
+
if (!res.ok) return `HTTP_${res.status}`
|
|
14152
13922
|
|
|
14153
13923
|
const json = await res.json();
|
|
14154
13924
|
|
|
14155
13925
|
if (json.result?.includes?.('Invalid API Key'))
|
|
14156
|
-
return
|
|
13926
|
+
return `${SERVICE_API_KEY.Etherscan}${ERROR_MESSAGES_FLAG.INVALID_API_KEY}`
|
|
14157
13927
|
|
|
14158
13928
|
if (json.result?.includes?.('Max rate limit reached'))
|
|
14159
|
-
return
|
|
13929
|
+
return `${SERVICE_API_KEY.Etherscan}${ERROR_MESSAGES_FLAG.RATE_LIMIT}`
|
|
14160
13930
|
|
|
14161
|
-
if (json.status === '0' && json.message !== 'No transactions found')
|
|
14162
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.CUSTOM, {
|
|
14163
|
-
message: json.message || 'Api Error',
|
|
14164
|
-
reason: json.message || 'json.status === "0" && json.message !== "No transactions found"'
|
|
14165
|
-
})
|
|
13931
|
+
if (json.status === '0' && json.message !== 'No transactions found') return ERROR_MESSAGES_FLAG.DEFAULT
|
|
14166
13932
|
|
|
14167
13933
|
return json.result
|
|
14168
|
-
} catch
|
|
14169
|
-
return
|
|
13934
|
+
} catch {
|
|
13935
|
+
return ERROR_MESSAGES_FLAG.DEFAULT
|
|
14170
13936
|
}
|
|
14171
13937
|
}
|
|
14172
13938
|
}
|
|
@@ -14182,38 +13948,25 @@ async function FLVURL(token, vs_currencies) {
|
|
|
14182
13948
|
async function SAFE() {
|
|
14183
13949
|
let [address, utility, chain, limit = 10, offset = 0] = argsToArray(arguments);
|
|
14184
13950
|
|
|
14185
|
-
|
|
14186
|
-
|
|
14187
|
-
if (
|
|
14188
|
-
return missingParamsError
|
|
14189
|
-
}
|
|
14190
|
-
|
|
14191
|
-
if (offset > MAX_PAGE_LIMIT) {
|
|
14192
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.MAX_PAGE_LIMIT)
|
|
14193
|
-
}
|
|
14194
|
-
|
|
14195
|
-
const apiKey = window.localStorage.getItem(SERVICES_API_KEY.Safe);
|
|
14196
|
-
|
|
14197
|
-
if (!apiKey) return errorMessageHandler(ERROR_MESSAGES_FLAG.MISSING_KEY, SERVICES_API_KEY.Safe)
|
|
14198
|
-
|
|
14199
|
-
if (typeof limit !== 'number' || limit < 0) return errorMessageHandler(ERROR_MESSAGES_FLAG.INVALID_PARAM, { limit })
|
|
14200
|
-
if (typeof offset !== 'number' || offset < 0)
|
|
14201
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.INVALID_PARAM, { offset })
|
|
14202
|
-
if (utility !== 'txns') return errorMessageHandler(ERROR_MESSAGES_FLAG.INVALID_PARAM, { utility })
|
|
13951
|
+
if (typeof limit !== 'number' || limit < 0) return 'INVALID_LIMIT'
|
|
13952
|
+
if (typeof offset !== 'number' || offset < 0) return 'INVALID_OFFSET'
|
|
13953
|
+
if (utility !== 'txns') return 'UTILITY IS NOT SUPPORTED'
|
|
14203
13954
|
if (limit > MAX_PAGE_LIMIT) {
|
|
14204
|
-
return
|
|
13955
|
+
return ERROR_MESSAGES_FLAG.MAX_PAGE_LIMIT
|
|
14205
13956
|
}
|
|
14206
13957
|
|
|
13958
|
+
const apiKey = window.localStorage.getItem(SERVICE_API_KEY.Safe);
|
|
14207
13959
|
const chainIdentifier = SAFE_CHAIN_MAP[chain];
|
|
14208
13960
|
|
|
14209
|
-
if (!
|
|
13961
|
+
if (!apiKey) return `${SERVICE_API_KEY.Safe}_MISSING`
|
|
13962
|
+
if (!chainIdentifier) return 'CHAIN IS NOT SUPPORTED'
|
|
14210
13963
|
|
|
14211
|
-
if (!isAddress
|
|
14212
|
-
|
|
14213
|
-
|
|
14214
|
-
|
|
14215
|
-
|
|
14216
|
-
}
|
|
13964
|
+
if (!isAddress(address)) {
|
|
13965
|
+
address = await fromEnsNameToAddress(address);
|
|
13966
|
+
}
|
|
13967
|
+
|
|
13968
|
+
if (!address) {
|
|
13969
|
+
return `${address}${ERROR_MESSAGES_FLAG.INVALID_PARAM}`
|
|
14217
13970
|
}
|
|
14218
13971
|
|
|
14219
13972
|
const url = `https://api.safe.global/tx-service/${chainIdentifier}/api/v2/safes/${address}/multisig-transactions?limit=${limit}&offset=${offset}`;
|
|
@@ -14223,29 +13976,23 @@ async function SAFE() {
|
|
|
14223
13976
|
Authorization: `Bearer ${apiKey}`
|
|
14224
13977
|
}
|
|
14225
13978
|
});
|
|
14226
|
-
if (!response.ok) {
|
|
14227
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.NETWORK_ERROR, response.status)
|
|
14228
|
-
}
|
|
13979
|
+
if (!response.ok) throw new Error(`HTTP error! Status: ${response.status}`)
|
|
14229
13980
|
const json = await response.json();
|
|
14230
13981
|
if (!Array.isArray(json.results)) {
|
|
14231
|
-
return
|
|
13982
|
+
return 'INVALID API RESPONSE'
|
|
14232
13983
|
}
|
|
14233
13984
|
// remove nested structure from the response
|
|
14234
13985
|
return json.results.map(({ confirmations, dataDecoded, ...rest }) => rest)
|
|
14235
13986
|
} catch (e) {
|
|
14236
|
-
|
|
13987
|
+
console.log(e);
|
|
13988
|
+
return 'ERROR IN FETCHING'
|
|
14237
13989
|
}
|
|
14238
13990
|
}
|
|
14239
13991
|
|
|
14240
13992
|
async function DEFILLAMA() {
|
|
14241
13993
|
let [category] = argsToArray(arguments);
|
|
14242
|
-
const
|
|
14243
|
-
|
|
14244
|
-
if (missingParamsError) {
|
|
14245
|
-
return missingParamsError
|
|
14246
|
-
}
|
|
14247
|
-
const apiKey = window.localStorage.getItem(SERVICES_API_KEY.Defillama);
|
|
14248
|
-
if (!apiKey) return errorMessageHandler(ERROR_MESSAGES_FLAG.MISSING_KEY, SERVICES_API_KEY.Defillama)
|
|
13994
|
+
const apiKey = window.localStorage.getItem(SERVICE_API_KEY.Defillama);
|
|
13995
|
+
if (!apiKey) return `${SERVICE_API_KEY.Defillama}${ERROR_MESSAGES_FLAG.MISSING_KEY}`
|
|
14249
13996
|
const categoryList = ['protocols', 'yields', 'dex', 'fees'];
|
|
14250
13997
|
const categoryMap = {
|
|
14251
13998
|
[categoryList[0]]: 'https://api.llama.fi/protocols',
|
|
@@ -14257,13 +14004,9 @@ async function DEFILLAMA() {
|
|
|
14257
14004
|
};
|
|
14258
14005
|
let url = categoryMap[category];
|
|
14259
14006
|
|
|
14260
|
-
if (!url) {
|
|
14261
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.INVALID_PARAM, { category })
|
|
14262
|
-
}
|
|
14263
|
-
|
|
14264
14007
|
try {
|
|
14265
14008
|
const response = await fetch(url);
|
|
14266
|
-
if (!response.ok)
|
|
14009
|
+
if (!response.ok) throw new Error(`HTTP error! Status: ${response.status}`)
|
|
14267
14010
|
let json = await response.json();
|
|
14268
14011
|
switch (category) {
|
|
14269
14012
|
case categoryList[0]: {
|
|
@@ -14288,59 +14031,38 @@ async function DEFILLAMA() {
|
|
|
14288
14031
|
|
|
14289
14032
|
return removeNestedStructure(Array.isArray(json) ? json : [json])
|
|
14290
14033
|
} catch (e) {
|
|
14291
|
-
|
|
14034
|
+
console.log(e);
|
|
14035
|
+
return 'ERROR IN FETCHING'
|
|
14292
14036
|
}
|
|
14293
14037
|
}
|
|
14294
14038
|
|
|
14295
14039
|
async function UNISWAP() {
|
|
14296
14040
|
const [graphType, category, param1, param2] = argsToArray(arguments);
|
|
14297
|
-
const missingParamsError = checkRequiredParams({ graphType, category, param1 });
|
|
14298
|
-
|
|
14299
|
-
if (missingParamsError) {
|
|
14300
|
-
return missingParamsError
|
|
14301
|
-
}
|
|
14302
14041
|
const baseUrl = 'https://onchain-proxy.fileverse.io/third-party';
|
|
14303
14042
|
try {
|
|
14304
14043
|
const url = `${baseUrl}?service=uniswap&graphType=${graphType}&category=${category}&input1=${param1}&input2=${param2}`;
|
|
14305
14044
|
const res = await fetch(url);
|
|
14306
|
-
if (!res.ok) {
|
|
14307
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.NETWORK_ERROR, res.status)
|
|
14308
|
-
}
|
|
14045
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`)
|
|
14309
14046
|
const json = await res.json();
|
|
14310
|
-
|
|
14311
|
-
return removeNestedStructure(json)
|
|
14312
|
-
} else {
|
|
14313
|
-
return json
|
|
14314
|
-
}
|
|
14315
|
-
|
|
14047
|
+
return removeNestedStructure(json)
|
|
14316
14048
|
} catch (err) {
|
|
14317
|
-
|
|
14049
|
+
console.error('UNISWAP fetch error:', err);
|
|
14050
|
+
return ERROR_MESSAGES_FLAG.DEFAULT
|
|
14318
14051
|
}
|
|
14319
14052
|
}
|
|
14320
14053
|
|
|
14321
14054
|
async function AAVE() {
|
|
14322
14055
|
const [graphType, category, param1, param2] = argsToArray(arguments);
|
|
14323
|
-
const missingParamsError = checkRequiredParams({ graphType, category, param1 });
|
|
14324
|
-
|
|
14325
|
-
if (missingParamsError) {
|
|
14326
|
-
return missingParamsError
|
|
14327
|
-
}
|
|
14328
14056
|
const baseUrl = 'https://onchain-proxy.fileverse.io/third-party';
|
|
14329
14057
|
try {
|
|
14330
14058
|
const url = `${baseUrl}?service=aave&graphType=${graphType}&category=${category}&input1=${param1}&input2=${param2}`;
|
|
14331
14059
|
const res = await fetch(url);
|
|
14332
|
-
if (!res.ok) {
|
|
14333
|
-
return errorMessageHandler(ERROR_MESSAGES_FLAG.NETWORK_ERROR, res.status)
|
|
14334
|
-
}
|
|
14060
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`)
|
|
14335
14061
|
const json = await res.json();
|
|
14336
|
-
|
|
14337
|
-
return removeNestedStructure(json)
|
|
14338
|
-
} else {
|
|
14339
|
-
return json
|
|
14340
|
-
}
|
|
14341
|
-
|
|
14062
|
+
return removeNestedStructure(json)
|
|
14342
14063
|
} catch (err) {
|
|
14343
|
-
|
|
14064
|
+
console.error('AAVE fetch error:', err);
|
|
14065
|
+
return ERROR_MESSAGES_FLAG.DEFAULT
|
|
14344
14066
|
}
|
|
14345
14067
|
}
|
|
14346
14068
|
|
|
@@ -14537,6 +14259,7 @@ exports.GCD = GCD;
|
|
|
14537
14259
|
exports.GEOMEAN = GEOMEAN;
|
|
14538
14260
|
exports.GESTEP = GESTEP;
|
|
14539
14261
|
exports.GNOSIS = GNOSIS;
|
|
14262
|
+
exports.GNOSISPAY = GNOSISPAY;
|
|
14540
14263
|
exports.GROWTH = GROWTH;
|
|
14541
14264
|
exports.HARMEAN = HARMEAN;
|
|
14542
14265
|
exports.HEX2BIN = HEX2BIN;
|
|
@@ -14621,6 +14344,7 @@ exports.MID = MID;
|
|
|
14621
14344
|
exports.MIN = MIN;
|
|
14622
14345
|
exports.MINA = MINA;
|
|
14623
14346
|
exports.MINIFS = MINIFS;
|
|
14347
|
+
exports.MINUS = MINUS$1;
|
|
14624
14348
|
exports.MINUTE = MINUTE;
|
|
14625
14349
|
exports.MIRR = MIRR;
|
|
14626
14350
|
exports.MMULT = MMULT;
|