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