@fileverse-dev/formulajs 4.4.11-mod-23 → 4.4.11-mod-24
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 +654 -244
- package/lib/browser/formula.min.js +2 -2
- package/lib/browser/formula.min.js.map +1 -1
- package/lib/cjs/index.cjs +259 -52
- package/lib/esm/crypto-constants.mjs +122 -3
- package/lib/esm/index.mjs +255 -53
- package/package.json +2 -1
- package/types/cjs/index.d.cts +24 -0
- package/types/esm/index.d.mts +24 -0
package/lib/cjs/index.cjs
CHANGED
|
@@ -13104,13 +13104,17 @@ const ERROR_MESSAGES_FLAG = {
|
|
|
13104
13104
|
MISSING_KEY: '_MISSING',
|
|
13105
13105
|
INVALID_CHAIN: '_INVALID_CHAIN',
|
|
13106
13106
|
INVALID_TYPE: '_INVALID_TYPE',
|
|
13107
|
-
INVALID_ADDRESS: '_INVALID_ADDRESS'
|
|
13107
|
+
INVALID_ADDRESS: '_INVALID_ADDRESS',
|
|
13108
|
+
INVALID_PARAM: '_INVALID_PARAM'
|
|
13108
13109
|
};
|
|
13109
13110
|
|
|
13110
13111
|
const SERVICE_API_KEY = {
|
|
13111
13112
|
Etherscan: "ETHERSCAN_API_KEY",
|
|
13112
13113
|
Coingecko: "COINGECKO_API_KEY",
|
|
13113
13114
|
Safe: "SAFE_API_KEY",
|
|
13115
|
+
Basescan: "BASESCAN_API_KEY",
|
|
13116
|
+
Gnosisscan: "GNOSIS_API_KEY",
|
|
13117
|
+
Firefly: "FIRE_FLY_API_KEY"
|
|
13114
13118
|
};
|
|
13115
13119
|
|
|
13116
13120
|
const fromTimeStampToBlock = async (timestamp, chain, apiKey) => {
|
|
@@ -13123,6 +13127,131 @@ if(!timestamp || !chain || !apiKey) return
|
|
|
13123
13127
|
|
|
13124
13128
|
};
|
|
13125
13129
|
|
|
13130
|
+
async function handleScanRequest({
|
|
13131
|
+
scanKey,
|
|
13132
|
+
baseUrl,
|
|
13133
|
+
type,
|
|
13134
|
+
chain,
|
|
13135
|
+
address,
|
|
13136
|
+
startDate,
|
|
13137
|
+
endDate,
|
|
13138
|
+
}) {
|
|
13139
|
+
const API_KEY = window.localStorage.getItem(scanKey);
|
|
13140
|
+
if (!API_KEY) return `${scanKey}${ERROR_MESSAGES_FLAG.MISSING_KEY}`;
|
|
13141
|
+
if (API_KEY === 'xxxx') return `${scanKey}${ERROR_MESSAGES_FLAG.RATE_LIMIT}`;
|
|
13142
|
+
|
|
13143
|
+
const chainId = CHAIN_ID_MAP[chain?.toLowerCase()];
|
|
13144
|
+
if (!chainId) return `${scanKey}${ERROR_MESSAGES_FLAG.INVALID_CHAIN}`;
|
|
13145
|
+
|
|
13146
|
+
const ACTION_MAP = {
|
|
13147
|
+
'all-txns': 'txlist',
|
|
13148
|
+
'token-txns': 'tokentx',
|
|
13149
|
+
'nft-txns': 'tokennfttx',
|
|
13150
|
+
'gas': 'gastracker',
|
|
13151
|
+
};
|
|
13152
|
+
|
|
13153
|
+
const action = ACTION_MAP[type];
|
|
13154
|
+
if (!action) return `${scanKey}${ERROR_MESSAGES_FLAG.INVALID_TYPE}`;
|
|
13155
|
+
|
|
13156
|
+
let url = `${baseUrl}?chainid=${chainId}&module=account&action=${action}&apikey=${API_KEY}`;
|
|
13157
|
+
|
|
13158
|
+
if (['all-txns', 'token-txns', 'nft-txns'].includes(type)) {
|
|
13159
|
+
if (!address) return `${scanKey}${ERROR_MESSAGES_FLAG.INVALID_ADDRESS}`;
|
|
13160
|
+
url += `&address=${address}&startblock=0&endblock=99999999&sort=asc`;
|
|
13161
|
+
|
|
13162
|
+
if (!isNaN(startDate) && !isNaN(endDate)) {
|
|
13163
|
+
const [startBlock, endBlock] = await Promise.all([
|
|
13164
|
+
fromTimeStampToBlock(startDate, chain, API_KEY),
|
|
13165
|
+
fromTimeStampToBlock(endDate, chain, API_KEY),
|
|
13166
|
+
]);
|
|
13167
|
+
url += `&startblock=${startBlock}&endblock=${endBlock}`;
|
|
13168
|
+
}
|
|
13169
|
+
}
|
|
13170
|
+
|
|
13171
|
+
try {
|
|
13172
|
+
const res = await fetch(url);
|
|
13173
|
+
if (!res.ok) throw new Error(`HTTP error: ${res.status}`);
|
|
13174
|
+
const json = await res.json();
|
|
13175
|
+
|
|
13176
|
+
if (typeof json.result === 'string') {
|
|
13177
|
+
if (json.result.includes('Invalid API Key')) return `${scanKey}${ERROR_MESSAGES_FLAG.INVALID_API_KEY}`;
|
|
13178
|
+
if (json.result.includes('Max rate limit reached')) return `${scanKey}${ERROR_MESSAGES_FLAG.RATE_LIMIT}`;
|
|
13179
|
+
}
|
|
13180
|
+
|
|
13181
|
+
return json.result;
|
|
13182
|
+
} catch (err) {
|
|
13183
|
+
console.error(`[${scanKey}]`, err);
|
|
13184
|
+
return ERROR_MESSAGES_FLAG.DEFAULT;
|
|
13185
|
+
}
|
|
13186
|
+
}
|
|
13187
|
+
|
|
13188
|
+
async function FIREFLY(platform, contentType, identifier) {
|
|
13189
|
+
const API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Firefly);
|
|
13190
|
+
if (!API_KEY) return `${SERVICE_API_KEY.Firefly}${ERROR_MESSAGES_FLAG.MISSING_KEY}`;
|
|
13191
|
+
|
|
13192
|
+
const baseUrl = "https://openapi.firefly.land/v1/fileverse/fetch";
|
|
13193
|
+
const headers = {
|
|
13194
|
+
"x-api-key": API_KEY,
|
|
13195
|
+
};
|
|
13196
|
+
|
|
13197
|
+
let query = "";
|
|
13198
|
+
let type = "";
|
|
13199
|
+
|
|
13200
|
+
// normalize input
|
|
13201
|
+
const normalizedId = identifier.trim().replace(/.*\/([^\/]+)$/, "$1"); // extract last part of URL if needed
|
|
13202
|
+
|
|
13203
|
+
if (platform === "farcaster") {
|
|
13204
|
+
if (contentType === "posts") {
|
|
13205
|
+
type = "farcasterid";
|
|
13206
|
+
query = normalizedId;
|
|
13207
|
+
} else if (contentType === "replies") {
|
|
13208
|
+
type = "farcasterpostid";
|
|
13209
|
+
query = normalizedId.startsWith("0x") ? normalizedId : Number(normalizedId).toString();
|
|
13210
|
+
} else {
|
|
13211
|
+
return `${SERVICE_API_KEY.Firefly}${ERROR_MESSAGES_FLAG.INVALID_TYPE}`;
|
|
13212
|
+
}
|
|
13213
|
+
} else if (platform === "lens") {
|
|
13214
|
+
if (contentType === "posts") {
|
|
13215
|
+
type = "lensid";
|
|
13216
|
+
query = normalizedId;
|
|
13217
|
+
} else if (contentType === "replies") {
|
|
13218
|
+
type = "lenspostid";
|
|
13219
|
+
query = normalizedId;
|
|
13220
|
+
} else {
|
|
13221
|
+
return `${SERVICE_API_KEY.Firefly}${ERROR_MESSAGES_FLAG.INVALID_TYPE}`;
|
|
13222
|
+
}
|
|
13223
|
+
} else {
|
|
13224
|
+
return `${SERVICE_API_KEY.Firefly}${ERROR_MESSAGES_FLAG.INVALID_PARAM}`;
|
|
13225
|
+
}
|
|
13226
|
+
|
|
13227
|
+
const url = new URL(baseUrl);
|
|
13228
|
+
url.searchParams.set("query", query);
|
|
13229
|
+
url.searchParams.set("type", type);
|
|
13230
|
+
url.searchParams.set("size", "10");
|
|
13231
|
+
url.searchParams.set("cursor", "0");
|
|
13232
|
+
|
|
13233
|
+
try {
|
|
13234
|
+
const res = await fetch(url.toString(), { headers });
|
|
13235
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
13236
|
+
const json = await res.json();
|
|
13237
|
+
const flattened = Array.isArray(json?.data)
|
|
13238
|
+
? json.data.map(item => ({
|
|
13239
|
+
id: item?.id || null,
|
|
13240
|
+
author: item?.author?.username || item?.author?.handle || "",
|
|
13241
|
+
text: item?.text || item?.metadata?.content?.content || "",
|
|
13242
|
+
createdAt: item?.createdAt || "",
|
|
13243
|
+
platform: platform,
|
|
13244
|
+
}))
|
|
13245
|
+
: [];
|
|
13246
|
+
|
|
13247
|
+
return flattened;
|
|
13248
|
+
} catch (err) {
|
|
13249
|
+
console.error("FIREFLY fetch error:", err);
|
|
13250
|
+
return ERROR_MESSAGES_FLAG.DEFAULT;
|
|
13251
|
+
}
|
|
13252
|
+
}
|
|
13253
|
+
|
|
13254
|
+
|
|
13126
13255
|
async function BLOCKSCOUT(address, type, chain, startTimestamp, endTimestamp, page, offset) {
|
|
13127
13256
|
if (!chain) {
|
|
13128
13257
|
chain = 'ethereum';
|
|
@@ -13192,73 +13321,146 @@ async function BLOCKSCOUT(address, type, chain, startTimestamp, endTimestamp, pa
|
|
|
13192
13321
|
}
|
|
13193
13322
|
}
|
|
13194
13323
|
|
|
13195
|
-
async function
|
|
13324
|
+
async function BASESCAN(...args) {
|
|
13325
|
+
const [type, chain, address, startDate, endDate] = args;
|
|
13326
|
+
return handleScanRequest({
|
|
13327
|
+
scanKey: SERVICE_API_KEY.Basescan,
|
|
13328
|
+
baseUrl: 'https://api.basescan.org/api',
|
|
13329
|
+
type,
|
|
13330
|
+
chain,
|
|
13331
|
+
address,
|
|
13332
|
+
startDate,
|
|
13333
|
+
endDate,
|
|
13334
|
+
});
|
|
13335
|
+
}
|
|
13336
|
+
async function GNOSISSCAN(...args) {
|
|
13196
13337
|
const [type, chain, address, startDate, endDate] = args;
|
|
13338
|
+
return handleScanRequest({
|
|
13339
|
+
scanKey: SERVICE_API_KEY.Gnosisscan,
|
|
13340
|
+
baseUrl: 'https://api.gnosisscan.io/api',
|
|
13341
|
+
type,
|
|
13342
|
+
chain,
|
|
13343
|
+
address,
|
|
13344
|
+
startDate,
|
|
13345
|
+
endDate,
|
|
13346
|
+
});
|
|
13347
|
+
}
|
|
13197
13348
|
|
|
13198
|
-
|
|
13199
|
-
|
|
13200
|
-
|
|
13201
|
-
|
|
13202
|
-
|
|
13203
|
-
|
|
13204
|
-
|
|
13205
|
-
|
|
13349
|
+
async function NEYNAR(
|
|
13350
|
+
fid,
|
|
13351
|
+
viewerFid,
|
|
13352
|
+
sortType,
|
|
13353
|
+
limit,
|
|
13354
|
+
cursor
|
|
13355
|
+
) {
|
|
13356
|
+
const API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Neynar);
|
|
13357
|
+
if (!API_KEY) return `${SERVICE_API_KEY.Neynar}${ERROR_MESSAGES_FLAG.MISSING_KEY}`;
|
|
13206
13358
|
|
|
13207
|
-
const chainId = CHAIN_ID_MAP[chain?.toLowerCase()];
|
|
13208
|
-
if (!chainId) {
|
|
13209
|
-
return `${SERVICE_API_KEY.Etherscan}${ERROR_MESSAGES_FLAG.INVALID_CHAIN}`;
|
|
13210
|
-
}
|
|
13211
13359
|
|
|
13212
|
-
|
|
13213
|
-
|
|
13214
|
-
|
|
13215
|
-
|
|
13216
|
-
|
|
13217
|
-
|
|
13218
|
-
|
|
13219
|
-
|
|
13220
|
-
|
|
13221
|
-
|
|
13222
|
-
|
|
13223
|
-
|
|
13224
|
-
|
|
13225
|
-
|
|
13226
|
-
|
|
13227
|
-
|
|
13360
|
+
const url = new URL('https://api.neynar.com/v2/farcaster/followers');
|
|
13361
|
+
url.searchParams.set('fid', fid.toString());
|
|
13362
|
+
url.searchParams.set('sort_type', sortType);
|
|
13363
|
+
url.searchParams.set('limit', limit.toString());
|
|
13364
|
+
if (viewerFid !== null) url.searchParams.set('viewer_fid', viewerFid.toString());
|
|
13365
|
+
if (cursor) url.searchParams.set('cursor', cursor);
|
|
13366
|
+
|
|
13367
|
+
try {
|
|
13368
|
+
const response = await fetch(url.toString(), {
|
|
13369
|
+
headers: {
|
|
13370
|
+
'x-api-key': API_KEY,
|
|
13371
|
+
'x-neynar-experimental': 'false'
|
|
13372
|
+
}
|
|
13373
|
+
});
|
|
13374
|
+
if (!response.ok) throw new Error(`HTTP ${response.status}`);
|
|
13375
|
+
const json = await response.json();
|
|
13376
|
+
if (!json?.users?.length) return [];
|
|
13377
|
+
|
|
13378
|
+
return json.users.map(({ user }) => ({
|
|
13379
|
+
username: user.username,
|
|
13380
|
+
custody_address: user.custody_address,
|
|
13381
|
+
follower_count: user.follower_count,
|
|
13382
|
+
country: user.profile?.location?.address?.country || '',
|
|
13383
|
+
city: user.profile?.location?.address?.city || ''
|
|
13384
|
+
}));
|
|
13385
|
+
} catch (err) {
|
|
13386
|
+
console.error('NEYNAR_FETCH_FOLLOWERS error:', err);
|
|
13387
|
+
return ERROR_MESSAGES_FLAG.DEFAULT;
|
|
13228
13388
|
}
|
|
13389
|
+
}
|
|
13390
|
+
async function GNOSIS({
|
|
13391
|
+
cardId,
|
|
13392
|
+
startDate,
|
|
13393
|
+
endDate,
|
|
13394
|
+
limit = 20,
|
|
13395
|
+
offset = 0,
|
|
13396
|
+
}) {
|
|
13397
|
+
const apiKeyKey = SERVICE_API_KEY.GnosisPay;
|
|
13398
|
+
const API_KEY = window.localStorage.getItem(apiKeyKey);
|
|
13399
|
+
if (!API_KEY) return `${apiKeyKey}${ERROR_MESSAGES_FLAG.MISSING_KEY}`;
|
|
13400
|
+
if (!cardId) return `${apiKeyKey}${ERROR_MESSAGES_FLAG.INVALID_PARAM}`;
|
|
13229
13401
|
|
|
13230
|
-
|
|
13402
|
+
const url = new URL(`https://api.gnosispay.com/cards/${cardId}/transactions`);
|
|
13403
|
+
url.searchParams.set('limit', limit.toString());
|
|
13404
|
+
url.searchParams.set('offset', offset.toString());
|
|
13231
13405
|
|
|
13232
|
-
if (
|
|
13233
|
-
|
|
13234
|
-
url += `&address=${address}&startblock=0&endblock=99999999&sort=asc`;
|
|
13235
|
-
if (startDate && endDate && !isNaN(startDate) && !isNaN(endDate)) {
|
|
13236
|
-
const startBlock = await fromTimeStampToBlock(startDate, chain, API_KEY);
|
|
13237
|
-
const endBlock = await fromTimeStampToBlock(endDate, chain, API_KEY);
|
|
13238
|
-
url += `&startblock=${startBlock}&endblock=${endBlock}`;
|
|
13239
|
-
}
|
|
13406
|
+
if (!isNaN(startDate)) {
|
|
13407
|
+
url.searchParams.set('startDate', new Date(startDate * 1000).toISOString());
|
|
13240
13408
|
}
|
|
13241
13409
|
|
|
13242
|
-
|
|
13243
|
-
|
|
13244
|
-
|
|
13245
|
-
const json = await response.json();
|
|
13246
|
-
|
|
13247
|
-
if (typeof json.result === 'string' && json.result.includes('Invalid API Key')) {
|
|
13248
|
-
return `${SERVICE_API_KEY.Etherscan}${ERROR_MESSAGES_FLAG.INVALID_API_KEY}`;
|
|
13249
|
-
}
|
|
13410
|
+
if (!isNaN(endDate)) {
|
|
13411
|
+
url.searchParams.set('endDate', new Date(endDate * 1000).toISOString());
|
|
13412
|
+
}
|
|
13250
13413
|
|
|
13251
|
-
|
|
13252
|
-
|
|
13253
|
-
|
|
13414
|
+
try {
|
|
13415
|
+
const res = await fetch(url.toString(), {
|
|
13416
|
+
headers: {
|
|
13417
|
+
Authorization: `Bearer ${API_KEY}`,
|
|
13418
|
+
'Content-Type': 'application/json',
|
|
13419
|
+
},
|
|
13420
|
+
});
|
|
13254
13421
|
|
|
13255
|
-
|
|
13256
|
-
|
|
13422
|
+
if (!res.ok) throw new Error(`HTTP error! Status: ${res.status}`);
|
|
13423
|
+
|
|
13424
|
+
const json = await res.json();
|
|
13425
|
+
|
|
13426
|
+
if (!Array.isArray(json)) return [];
|
|
13427
|
+
|
|
13428
|
+
return json.map(tx => ({
|
|
13429
|
+
createdAt: tx.createdAt,
|
|
13430
|
+
clearedAt: tx.clearedAt,
|
|
13431
|
+
country: tx.country,
|
|
13432
|
+
merchant: tx.merchant,
|
|
13433
|
+
billingAmount: tx.billingAmount,
|
|
13434
|
+
billingCurrency: tx.billingCurrency,
|
|
13435
|
+
transactionAmount: tx.transactionAmount,
|
|
13436
|
+
transactionCurrency: tx.transactionCurrency,
|
|
13437
|
+
transactionType: tx.transactionType,
|
|
13438
|
+
kind: tx.kind,
|
|
13439
|
+
status: tx.status || null,
|
|
13440
|
+
mcc: tx.mcc,
|
|
13441
|
+
}));
|
|
13442
|
+
} catch (err) {
|
|
13443
|
+
console.error('GNOSISPAY_CARD_TXNS error:', err);
|
|
13257
13444
|
return ERROR_MESSAGES_FLAG.DEFAULT;
|
|
13258
13445
|
}
|
|
13259
13446
|
}
|
|
13260
13447
|
|
|
13261
13448
|
|
|
13449
|
+
|
|
13450
|
+
async function ETHERSCAN(...args) {
|
|
13451
|
+
const [type, chain, address, startDate, endDate] = args;
|
|
13452
|
+
return handleScanRequest({
|
|
13453
|
+
scanKey: SERVICE_API_KEY.Etherscan,
|
|
13454
|
+
baseUrl: 'https://api.etherscan.io/v2/api',
|
|
13455
|
+
type,
|
|
13456
|
+
chain,
|
|
13457
|
+
address,
|
|
13458
|
+
startDate,
|
|
13459
|
+
endDate,
|
|
13460
|
+
});
|
|
13461
|
+
}
|
|
13462
|
+
|
|
13463
|
+
|
|
13262
13464
|
async function COINGECKO(token, vs_currencies) {
|
|
13263
13465
|
const API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Coingecko);
|
|
13264
13466
|
const url = `https://api.coingecko.com/api/v3/simple/price?vs_currencies=${vs_currencies}&ids=${token}`;
|
|
@@ -13429,6 +13631,7 @@ exports.AVERAGEA = AVERAGEA;
|
|
|
13429
13631
|
exports.AVERAGEIF = AVERAGEIF;
|
|
13430
13632
|
exports.AVERAGEIFS = AVERAGEIFS;
|
|
13431
13633
|
exports.BASE = BASE;
|
|
13634
|
+
exports.BASESCAN = BASESCAN;
|
|
13432
13635
|
exports.BESSELI = BESSELI;
|
|
13433
13636
|
exports.BESSELJ = BESSELJ;
|
|
13434
13637
|
exports.BESSELK = BESSELK;
|
|
@@ -13545,6 +13748,7 @@ exports.FDISTRT = FDISTRT;
|
|
|
13545
13748
|
exports.FIND = FIND;
|
|
13546
13749
|
exports.FINV = FINV;
|
|
13547
13750
|
exports.FINVRT = FINVRT;
|
|
13751
|
+
exports.FIREFLY = FIREFLY;
|
|
13548
13752
|
exports.FISHER = FISHER;
|
|
13549
13753
|
exports.FISHERINV = FISHERINV;
|
|
13550
13754
|
exports.FIXED = FIXED;
|
|
@@ -13566,6 +13770,8 @@ exports.GAUSS = GAUSS;
|
|
|
13566
13770
|
exports.GCD = GCD;
|
|
13567
13771
|
exports.GEOMEAN = GEOMEAN;
|
|
13568
13772
|
exports.GESTEP = GESTEP;
|
|
13773
|
+
exports.GNOSIS = GNOSIS;
|
|
13774
|
+
exports.GNOSISSCAN = GNOSISSCAN;
|
|
13569
13775
|
exports.GROWTH = GROWTH;
|
|
13570
13776
|
exports.HARMEAN = HARMEAN;
|
|
13571
13777
|
exports.HEX2BIN = HEX2BIN;
|
|
@@ -13666,6 +13872,7 @@ exports.NEGBINOMDIST = NEGBINOMDIST;
|
|
|
13666
13872
|
exports.NETWORKDAYS = NETWORKDAYS;
|
|
13667
13873
|
exports.NETWORKDAYSINTL = NETWORKDAYSINTL;
|
|
13668
13874
|
exports.NETWORKDAYS_INTL = NETWORKDAYS_INTL;
|
|
13875
|
+
exports.NEYNAR = NEYNAR;
|
|
13669
13876
|
exports.NOMINAL = NOMINAL;
|
|
13670
13877
|
exports.NORM = NORM;
|
|
13671
13878
|
exports.NORMDIST = NORMDIST;
|
|
@@ -23,16 +23,135 @@ var ERROR_MESSAGES_FLAG = {
|
|
|
23
23
|
MISSING_KEY: "_MISSING",
|
|
24
24
|
INVALID_CHAIN: "_INVALID_CHAIN",
|
|
25
25
|
INVALID_TYPE: "_INVALID_TYPE",
|
|
26
|
-
INVALID_ADDRESS: "_INVALID_ADDRESS"
|
|
26
|
+
INVALID_ADDRESS: "_INVALID_ADDRESS",
|
|
27
|
+
INVALID_PARAM: "_INVALID_PARAM"
|
|
27
28
|
};
|
|
28
29
|
|
|
29
30
|
// src/crypto-constants.js
|
|
30
31
|
var SERVICE_API_KEY = {
|
|
31
32
|
Etherscan: "ETHERSCAN_API_KEY",
|
|
32
33
|
Coingecko: "COINGECKO_API_KEY",
|
|
33
|
-
Safe: "SAFE_API_KEY"
|
|
34
|
+
Safe: "SAFE_API_KEY",
|
|
35
|
+
Basescan: "BASESCAN_API_KEY",
|
|
36
|
+
Gnosisscan: "GNOSIS_API_KEY",
|
|
37
|
+
Firefly: "FIRE_FLY_API_KEY"
|
|
34
38
|
};
|
|
35
39
|
var FUNCTION_LOCALE = [
|
|
40
|
+
{
|
|
41
|
+
API_KEY: SERVICE_API_KEY.Firefly,
|
|
42
|
+
LOGO: "https://firefly.social/android-chrome-192x192.png",
|
|
43
|
+
BRAND_COLOR: "#f8f5fc",
|
|
44
|
+
BRAND_SECONDARY_COLOR: "#855dcd",
|
|
45
|
+
n: "FIREFLY",
|
|
46
|
+
t: 20,
|
|
47
|
+
d: "Fetches posts or replies from Farcaster or Lens using Firefly's OpenAPI and returns simplified text content.",
|
|
48
|
+
a: "Retrieves posts or replies from Firefly OpenAPI by username, user ID, or post ID/hash for Farcaster and Lens platforms. Returns a flattened array of content with id, author, text, createdAt, and platform.",
|
|
49
|
+
p: [
|
|
50
|
+
{
|
|
51
|
+
name: "platform",
|
|
52
|
+
detail: "The social platform to query. Supports 'farcaster' or 'lens'.",
|
|
53
|
+
example: `"farcaster"`,
|
|
54
|
+
require: "m",
|
|
55
|
+
type: "string"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "contentType",
|
|
59
|
+
detail: "The type of content to fetch. Can be 'posts' or 'replies'.",
|
|
60
|
+
example: `"posts"`,
|
|
61
|
+
require: "m",
|
|
62
|
+
type: "string"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "identifier",
|
|
66
|
+
detail: "The username, user ID, or post ID/hash depending on platform and contentType.",
|
|
67
|
+
example: `"toka" or "0xcb6cab2048..."`,
|
|
68
|
+
require: "m",
|
|
69
|
+
type: "string"
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
API_KEY: SERVICE_API_KEY.Neynar,
|
|
75
|
+
LOGO: "https://framerusercontent.com/images/OS5YeZ2Y7DmszAxL6Zf06pXtKzc.svg",
|
|
76
|
+
BRAND_COLOR: "##e8e6ff",
|
|
77
|
+
BRAND_SECONDARY_COLOR: "#28204A",
|
|
78
|
+
n: "NEYNAR",
|
|
79
|
+
t: 20,
|
|
80
|
+
d: "Fetches followers for a given Farcaster FID using Neynar's API.",
|
|
81
|
+
a: "Retrieves followers of a Farcaster user, with support for sorting, pagination, and optional viewer context.",
|
|
82
|
+
p: [
|
|
83
|
+
{
|
|
84
|
+
name: "fid",
|
|
85
|
+
detail: "The Farcaster FID of the user whose followers should be fetched.",
|
|
86
|
+
example: `123`,
|
|
87
|
+
require: "m",
|
|
88
|
+
type: "number"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: "viewerFid",
|
|
92
|
+
detail: "FID of the viewer, to include contextual info like mutual follows (optional).",
|
|
93
|
+
example: `456`,
|
|
94
|
+
require: "o",
|
|
95
|
+
type: "number"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: "sortType",
|
|
99
|
+
detail: "Sorting type: either 'desc_chron' (default) or 'algorithmic'.",
|
|
100
|
+
example: `"desc_chron"`,
|
|
101
|
+
require: "o",
|
|
102
|
+
type: "string"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: "limit",
|
|
106
|
+
detail: "Number of followers to return (max 100).",
|
|
107
|
+
example: `20`,
|
|
108
|
+
require: "o",
|
|
109
|
+
type: "number"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: "cursor",
|
|
113
|
+
detail: "Cursor string for paginating the result set.",
|
|
114
|
+
example: `"eyJvZmZzZXQiOjIwLCJsYXN0SWQiOjEyMzQ1Nn0="`,
|
|
115
|
+
require: "o",
|
|
116
|
+
type: "string"
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
API_KEY: SERVICE_API_KEY.Basescan,
|
|
122
|
+
LOGO: "https://raw.githubusercontent.com/mritunjayz/github-storage/refs/heads/main/1689874988430.jpeg",
|
|
123
|
+
// public Base logo
|
|
124
|
+
BRAND_COLOR: "#f1f5ff",
|
|
125
|
+
BRAND_SECONDARY_COLOR: "#2752ff",
|
|
126
|
+
n: "BASESCAN",
|
|
127
|
+
t: 20,
|
|
128
|
+
d: "Fetches Base network data via Basescan: native txns, ERC-20 transfers, ERC-721 transfers, and gas metrics.",
|
|
129
|
+
a: "Pulls on-chain activity for Base (chainid 8453) using Basescan\u2019s API \u2014 supports full tx history, token/NFT transfers, and live gas info.",
|
|
130
|
+
p: [
|
|
131
|
+
{ name: "type", detail: "Data category: 'all-txns' | 'token-txns' | 'nft-txns' | 'gas'.", example: `"token-txns"`, require: "m", type: "string" },
|
|
132
|
+
{ name: "chain", detail: "Must be 'base'.", example: `"base"`, require: "m", type: "string" },
|
|
133
|
+
{ name: "address", detail: "Target wallet (omit for 'gas').", example: `"0x1234\u2026abcd"`, require: "o", type: "string" },
|
|
134
|
+
{ name: "startDate", detail: "Start UNIX timestamp (sec).", example: `"1704067200"`, require: "o", type: "rangenumber" },
|
|
135
|
+
{ name: "endDate", detail: "End UNIX timestamp (sec).", example: `"1706659200"`, require: "o", type: "rangenumber" }
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
API_KEY: SERVICE_API_KEY.Gnosisscan,
|
|
140
|
+
LOGO: "https://raw.githubusercontent.com/mritunjayz/github-storage/refs/heads/main/1689874988430.jpeg",
|
|
141
|
+
BRAND_COLOR: "#f6f7f6",
|
|
142
|
+
BRAND_SECONDARY_COLOR: "#133629",
|
|
143
|
+
n: "GNOSISSCAN",
|
|
144
|
+
t: 20,
|
|
145
|
+
d: "Fetches Gnosis Chain data via Gnosisscan: txns, token transfers, NFT transfers, and gas metrics.",
|
|
146
|
+
a: "Queries Gnosis Chain (chainid 100) through Gnosisscan\u2019s API to return txns, token/NFT transfers, or gas info for a wallet.",
|
|
147
|
+
p: [
|
|
148
|
+
{ name: "type", detail: "Data category: 'all-txns' | 'token-txns' | 'nft-txns' | 'gas'.", example: `"nft-txns"`, require: "m", type: "string" },
|
|
149
|
+
{ name: "chain", detail: "Must be 'gnosis'.", example: `"gnosis"`, require: "m", type: "string" },
|
|
150
|
+
{ name: "address", detail: "Target wallet (omit for 'gas').", example: `"0x6789\u2026efab"`, require: "o", type: "string" },
|
|
151
|
+
{ name: "startDate", detail: "Start UNIX timestamp (sec).", example: `"1704067200"`, require: "o", type: "rangenumber" },
|
|
152
|
+
{ name: "endDate", detail: "End UNIX timestamp (sec).", example: `"1706659200"`, require: "o", type: "rangenumber" }
|
|
153
|
+
]
|
|
154
|
+
},
|
|
36
155
|
{
|
|
37
156
|
LOGO: "https://cdn.prod.website-files.com/65f94dfd53db8b337c808067/68485baa72714ae58f350ce2_bs-logo.png",
|
|
38
157
|
BRAND_COLOR: "#f8f8fd",
|
|
@@ -583,7 +702,7 @@ var FUNCTION_LOCALE = [
|
|
|
583
702
|
},
|
|
584
703
|
{
|
|
585
704
|
API_KEY: SERVICE_API_KEY.Etherscan,
|
|
586
|
-
LOGO: "https://
|
|
705
|
+
LOGO: "https://gnosisscan.io/assets/generic/html/favicon-light.ico",
|
|
587
706
|
BRAND_COLOR: "#f6f7f6",
|
|
588
707
|
BRAND_SECONDARY_COLOR: "#133629",
|
|
589
708
|
n: "GNOSIS",
|