@covalenthq/client-sdk 2.2.3 → 2.2.5

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/dist/cjs/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "2.2.3";
3
+ var version = "2.2.5";
4
4
 
5
5
  const bigIntParser = (val) => {
6
6
  if (val === null || val === undefined) {
@@ -1275,10 +1275,8 @@ exports.ChainName = void 0;
1275
1275
  (function (ChainName) {
1276
1276
  ChainName["ETH_MAINNET"] = "eth-mainnet";
1277
1277
  ChainName["ETH_SEPOLIA"] = "eth-sepolia";
1278
- ChainName["ETH_GOERLI"] = "eth-goerli";
1279
1278
  ChainName["ETH_HOLESKY"] = "eth-holesky";
1280
1279
  ChainName["MATIC_MAINNET"] = "matic-mainnet";
1281
- ChainName["MATIC_MUMBAI"] = "matic-mumbai";
1282
1280
  ChainName["AVALANCHE_MAINNET"] = "avalanche-mainnet";
1283
1281
  ChainName["AVALANCHE_TESTNET"] = "avalanche-testnet";
1284
1282
  ChainName["BSC_MAINNET"] = "bsc-mainnet";
@@ -1295,15 +1293,11 @@ exports.ChainName = void 0;
1295
1293
  ChainName["FANTOM_TESTNET"] = "fantom-testnet";
1296
1294
  ChainName["PALM_MAINNET"] = "palm-mainnet";
1297
1295
  ChainName["PALM_TESTNET"] = "palm-testnet";
1298
- ChainName["BTC_MAINNET"] = "btc-mainnet";
1299
1296
  ChainName["SOLANA_MAINNET"] = "solana-mainnet";
1297
+ ChainName["BTC_MAINNET"] = "btc-mainnet";
1300
1298
  ChainName["AXIE_MAINNET"] = "axie-mainnet";
1301
1299
  ChainName["OPTIMISM_MAINNET"] = "optimism-mainnet";
1302
1300
  ChainName["OPTIMISM_SEPOLIA"] = "optimism-sepolia";
1303
- ChainName["EVMOS_MAINNET"] = "evmos-mainnet";
1304
- ChainName["EVMOS_TESTNET"] = "evmos-testnet";
1305
- ChainName["HARMONY_MAINNET"] = "harmony-mainnet";
1306
- ChainName["HARMONY_TESTNET"] = "harmony-testnet";
1307
1301
  ChainName["CRONOS_MAINNET"] = "cronos-mainnet";
1308
1302
  ChainName["CRONOS_TESTNET"] = "cronos-testnet";
1309
1303
  ChainName["CRONOS_ZKEVM_TESTNET"] = "cronos-zkevm-testnet";
@@ -1318,53 +1312,23 @@ exports.ChainName = void 0;
1318
1312
  ChainName["BOBA_BNB_TESTNET"] = "boba-bnb-testnet";
1319
1313
  ChainName["SCROLL_SEPOLIA_TESTNET"] = "scroll-sepolia-testnet";
1320
1314
  ChainName["METIS_MAINNET"] = "metis-mainnet";
1321
- ChainName["METIS_STARDUST"] = "metis-stardust";
1322
1315
  ChainName["AVALANCHE_DEXALOT_MAINNET"] = "avalanche-dexalot-mainnet";
1323
1316
  ChainName["AVALANCHE_DEXALOT_TESTNET"] = "avalanche-dexalot-testnet";
1324
1317
  ChainName["AVALANCHE_SHRAPNEL_MAINNET"] = "avalanche-shrapnel-mainnet";
1325
1318
  ChainName["AVALANCHE_NUMBERS"] = "avalanche-numbers";
1326
- ChainName["AVALANCHE_DOS"] = "avalanche-dos";
1327
- ChainName["AVALANCHE_XPLUS"] = "avalanche-xplus";
1328
1319
  ChainName["AVALANCHE_XANACHAIN"] = "avalanche-xanachain";
1329
1320
  ChainName["AVALANCHE_STEP_NETWORK"] = "avalanche-step-network";
1330
1321
  ChainName["AVALANCHE_SHRAPNEL_TESTNET"] = "avalanche-shrapnel-testnet";
1331
1322
  ChainName["AVALANCHE_BEAM_TESTNET"] = "avalanche-beam-testnet";
1332
1323
  ChainName["AVALANCHE_BLITZ_TESTNET"] = "avalanche-blitz-testnet";
1333
- ChainName["AVALANCHE_MINTARA_TESTNET"] = "avalanche-mintara-testnet";
1334
- ChainName["AVALANCHE_GREEN_DOT_TESTNET"] = "avalanche-green-dot-testnet";
1335
- ChainName["AVALANCHE_PULSAR_TESTNET"] = "avalanche-pulsar-testnet";
1336
1324
  ChainName["AVALANCHE_UPTN"] = "avalanche-uptn";
1337
- ChainName["AVALANCHE_AVACLOUD_TESTNET"] = "avalanche-avacloud-testnet";
1338
1325
  ChainName["AVALANCHE_BEAM_MAINNET"] = "avalanche-beam-mainnet";
1339
- ChainName["AVALANCHE_BULLETIN_TESTNET"] = "avalanche-bulletin-testnet";
1340
- ChainName["AVALANCHE_CONDUIT_TESTNET"] = "avalanche-conduit-testnet";
1341
- ChainName["AVALANCHE_HERO_TESTNET"] = "avalanche-hero-testnet";
1342
- ChainName["AVALANCHE_HUBBLE_EXCHANGE_TESTNET"] = "avalanche-hubble-exchange-testnet";
1343
- ChainName["AVALANCHE_KIWI_TESTNET"] = "avalanche-kiwi-testnet";
1344
- ChainName["AVALANCHE_MIHO_TESTNET"] = "avalanche-miho-testnet";
1345
- ChainName["AVALANCHE_MONDRIAN_TESTNET"] = "avalanche-mondrian-testnet";
1346
- ChainName["AVALANCHE_NMAC_TESTNET"] = "avalanche-nmac-testnet";
1347
- ChainName["AVALANCHE_ORDERLY_TESTNET"] = "avalanche-orderly-testnet";
1348
- ChainName["AVALANCHE_THIRDWEB_TESTNET"] = "avalanche-thirdweb-testnet";
1349
- ChainName["AVALANCHE_WAGMI_TESTNET"] = "avalanche-wagmi-testnet";
1350
- ChainName["AVALANCHE_PLAYA3ULL_TESTNET"] = "avalanche-playa3ull-testnet";
1351
1326
  ChainName["AVALANCHE_MIRAI_TESTNET"] = "avalanche-mirai-testnet";
1352
- ChainName["AVALANCHE_AMPLIFY_TESTNET"] = "avalanche-amplify-testnet";
1353
- ChainName["AVALANCHE_LT0_TESTNET"] = "avalanche-lt0-testnet";
1354
- ChainName["AVALANCHE_LT5_TESTNET"] = "avalanche-lt5-testnet";
1355
- ChainName["AVALANCHE_HUBBLE_EXCHANGE_MAINNET"] = "avalanche-hubble-exchange-mainnet";
1356
- ChainName["METER_MAINNET"] = "meter-mainnet";
1357
- ChainName["METER_TESTNET"] = "meter-testnet";
1358
- ChainName["MILKOMEDA_A1_MAINNET"] = "milkomeda-a1-mainnet";
1359
- ChainName["MILKOMEDA_C1_MAINNET"] = "milkomeda-c1-mainnet";
1360
- ChainName["MILKOMEDA_C1_DEVNET"] = "milkomeda-c1-devnet";
1327
+ ChainName["BERACHAIN_MAINNET"] = "berachain-mainnet";
1328
+ ChainName["UNICHAIN_MAINNET"] = "unichain-mainnet";
1361
1329
  ChainName["CANTO_MAINNET"] = "canto-mainnet";
1362
1330
  ChainName["FLARENETWORKS_FLARE_MAINNET"] = "flarenetworks-flare-mainnet";
1363
1331
  ChainName["FLARENETWORKS_FLARE_TESTNET"] = "flarenetworks-flare-testnet";
1364
- ChainName["FLARENETWORKS_CANARY_MAINNET"] = "flarenetworks-canary-mainnet";
1365
- ChainName["FLARENETWORKS_CANARY_TESTNET"] = "flarenetworks-canary-testnet";
1366
- ChainName["KCC_MAINNET"] = "kcc-mainnet";
1367
- ChainName["KCC_TESTNET"] = "kcc-testnet";
1368
1332
  ChainName["POLYGON_ZKEVM_MAINNET"] = "polygon-zkevm-mainnet";
1369
1333
  ChainName["LINEA_MAINNET"] = "linea-mainnet";
1370
1334
  ChainName["LINEA_GOERLI_TESTNET"] = "linea-goerli-testnet";
@@ -1372,82 +1336,62 @@ exports.ChainName = void 0;
1372
1336
  ChainName["POLYGON_ZKEVM_TESTNET"] = "polygon-zkevm-testnet";
1373
1337
  ChainName["POLYGON_AMOY_TESTNET"] = "polygon-amoy-testnet";
1374
1338
  ChainName["MANTLE_MAINNET"] = "mantle-mainnet";
1375
- ChainName["POLYGON_ZKEVM_CARDONA_TESTNET"] = "polygon-zkevm-cardona-testnet";
1376
1339
  ChainName["MANTLE_SEPOLIA_TESTNET"] = "mantle-sepolia-testnet";
1340
+ ChainName["POLYGON_ZKEVM_CARDONA_TESTNET"] = "polygon-zkevm-cardona-testnet";
1377
1341
  ChainName["BASE_MAINNET"] = "base-mainnet";
1378
- ChainName["BASE_TESTNET"] = "base-testnet";
1379
1342
  ChainName["BASE_SEPOLIA_TESTNET"] = "base-sepolia-testnet";
1380
- ChainName["OASYS_MAINNET"] = "oasys-mainnet";
1381
- ChainName["OASYS_TESTNET"] = "oasys-testnet";
1382
1343
  ChainName["SX_MAINNET"] = "sx-mainnet";
1383
- ChainName["LUMOZ_PUBLIC_ZKSYNC_V2"] = "lumoz-public-zksync-v2";
1384
- ChainName["LUMOZ_STARK_SPORT"] = "lumoz-stark-sport";
1385
1344
  ChainName["OASIS_SAPPHIRE_MAINNET"] = "oasis-sapphire-mainnet";
1386
- ChainName["OASIS_SAPPHIRE_TESTNET"] = "oasis-sapphire-testnet";
1387
- ChainName["XAI_MAINNET"] = "xai-mainnet";
1388
1345
  ChainName["SYNDR_TESTNET"] = "syndr-testnet";
1346
+ ChainName["OASIS_SAPPHIRE_TESTNET"] = "oasis-sapphire-testnet";
1389
1347
  ChainName["CELO_MAINNET"] = "celo-mainnet";
1390
1348
  ChainName["X1_MAINNET"] = "x1-mainnet";
1391
- ChainName["CROSSFI_EVM_TESTNET"] = "crossfi-evm-testnet";
1392
1349
  ChainName["HORIZEN_EON_MAINNET"] = "horizen-eon-mainnet";
1393
1350
  ChainName["HORIZEN_GOBI_TESTNET"] = "horizen-gobi-testnet";
1394
1351
  ChainName["FRAXTAL_MAINNET"] = "fraxtal-mainnet";
1395
1352
  ChainName["APECHAIN_TESTNET"] = "apechain-testnet";
1396
- ChainName["LISK_MAINNET"] = "lisk-mainnet";
1397
1353
  ChainName["BERACHAIN_TESTNET"] = "berachain-testnet";
1398
1354
  ChainName["REDSTONE_MAINNET"] = "redstone-mainnet";
1399
1355
  ChainName["SEI_MAINNET"] = "sei-mainnet";
1356
+ ChainName["APECHAIN_MAINNET"] = "apechain-mainnet";
1357
+ ChainName["UNICHAIN_SEPOLIA_TESTNET"] = "unichain-sepolia-testnet";
1358
+ ChainName["WORLD_MAINNET"] = "world-mainnet";
1359
+ ChainName["WORLD_SEPOLIA_TESTNET"] = "world-sepolia-testnet";
1360
+ ChainName["LENS_SEPOLIA_TESTNET"] = "lens-sepolia-testnet";
1361
+ ChainName["INK_SEPOLIA_TESTNET"] = "ink-sepolia-testnet";
1362
+ ChainName["INK_MAINNET"] = "ink-mainnet";
1400
1363
  ChainName["AVALANCHE_MELD_TESTNET"] = "avalanche-meld-testnet";
1401
1364
  ChainName["AVALANCHE_MELD_MAINNET"] = "avalanche-meld-mainnet";
1402
1365
  ChainName["GUNZILLA_TESTNET"] = "gunzilla-testnet";
1403
- ChainName["ULTRON_MAINNET"] = "ultron-mainnet";
1404
- ChainName["ULTRON_TESTNET"] = "ultron-testnet";
1405
1366
  ChainName["ZORA_MAINNET"] = "zora-mainnet";
1406
1367
  ChainName["ZORA_SEPOLIA_TESTNET"] = "zora-sepolia-testnet";
1407
- ChainName["LISK_SEPOLIA_TESTNET"] = "lisk-sepolia-testnet";
1408
- ChainName["OPSIDE_READON_CONTENT_TESTNET"] = "opside-readon-content-testnet";
1409
1368
  ChainName["ZKSYNC_MAINNET"] = "zksync-mainnet";
1410
1369
  ChainName["ZKSYNC_SEPOLIA_TESTNET"] = "zksync-sepolia-testnet";
1411
- ChainName["BNB_ANTIMATTER_TESTNET"] = "bnb-antimatter-testnet";
1412
- ChainName["BNB_META_APES_MAINNET"] = "bnb-meta-apes-mainnet";
1413
- ChainName["BNB_FNCY_MAINNET"] = "bnb-fncy-mainnet";
1414
1370
  ChainName["BNB_OPBNB_TESTNET"] = "bnb-opbnb-testnet";
1415
- ChainName["BNB_FNCY_TESTNET"] = "bnb-fncy-testnet";
1416
1371
  ChainName["BNB_OPBNB_MAINNET"] = "bnb-opbnb-mainnet";
1417
1372
  ChainName["ZETACHAIN_TESTNET"] = "zetachain-testnet";
1418
1373
  ChainName["ZETACHAIN_MAINNET"] = "zetachain-mainnet";
1419
- ChainName["MODE_TESTNET"] = "mode-testnet";
1420
- ChainName["MODE_MAINNET"] = "mode-mainnet";
1421
1374
  ChainName["KINTO_TESTNET"] = "kinto-testnet";
1422
- ChainName["LOOT_MAINNET"] = "loot-mainnet";
1423
- ChainName["PGN_MAINNET"] = "pgn-mainnet";
1424
- ChainName["PGN_TESTNET"] = "pgn-testnet";
1425
1375
  ChainName["MANTA_SEPOLIA_TESTNET"] = "manta-sepolia-testnet";
1426
1376
  ChainName["ROLLUX_MAINNET"] = "rollux-mainnet";
1427
- ChainName["ROLLUX_TESTNET"] = "rollux-testnet";
1428
1377
  ChainName["GNOSIS_MAINNET"] = "gnosis-mainnet";
1429
1378
  ChainName["GNOSIS_TESTNET"] = "gnosis-testnet";
1430
- ChainName["TELOS_MAINNET"] = "telos-mainnet";
1431
- ChainName["TELOS_TESTNET"] = "telos-testnet";
1432
1379
  ChainName["VICTION_MAINNET"] = "viction-mainnet";
1433
1380
  ChainName["VICTION_TESTNET"] = "viction-testnet";
1434
1381
  ChainName["TAIKO_HEKLA_TESTNET"] = "taiko-hekla-testnet";
1435
1382
  ChainName["TAIKO_MAINNET"] = "taiko-mainnet";
1436
1383
  ChainName["MERLIN_MAINNET"] = "merlin-mainnet";
1437
1384
  ChainName["MERLIN_TESTNET"] = "merlin-testnet";
1438
- ChainName["BLAST_MAINNET"] = "blast-mainnet";
1439
1385
  ChainName["MOVEMENT_MEVM_TESTNET"] = "movement-mevm-testnet";
1386
+ ChainName["BLAST_MAINNET"] = "blast-mainnet";
1440
1387
  ChainName["SCROLL_MAINNET"] = "scroll-mainnet";
1441
- ChainName["COVALENT_INTERNAL_NETWORK_V1"] = "covalent-internal-network-v1";
1442
1388
  })(exports.ChainName || (exports.ChainName = {}));
1443
1389
  exports.ChainID = void 0;
1444
1390
  (function (ChainID) {
1445
1391
  ChainID[ChainID["ETH_MAINNET"] = 1] = "ETH_MAINNET";
1446
1392
  ChainID[ChainID["ETH_SEPOLIA"] = 11155111] = "ETH_SEPOLIA";
1447
- ChainID[ChainID["ETH_GOERLI"] = 5] = "ETH_GOERLI";
1448
1393
  ChainID[ChainID["ETH_HOLESKY"] = 17000] = "ETH_HOLESKY";
1449
1394
  ChainID[ChainID["MATIC_MAINNET"] = 137] = "MATIC_MAINNET";
1450
- ChainID[ChainID["MATIC_MUMBAI"] = 80001] = "MATIC_MUMBAI";
1451
1395
  ChainID[ChainID["AVALANCHE_MAINNET"] = 43114] = "AVALANCHE_MAINNET";
1452
1396
  ChainID[ChainID["AVALANCHE_TESTNET"] = 43113] = "AVALANCHE_TESTNET";
1453
1397
  ChainID[ChainID["BSC_MAINNET"] = 56] = "BSC_MAINNET";
@@ -1469,10 +1413,6 @@ exports.ChainID = void 0;
1469
1413
  ChainID[ChainID["AXIE_MAINNET"] = 2020] = "AXIE_MAINNET";
1470
1414
  ChainID[ChainID["OPTIMISM_MAINNET"] = 10] = "OPTIMISM_MAINNET";
1471
1415
  ChainID[ChainID["OPTIMISM_SEPOLIA"] = 11155420] = "OPTIMISM_SEPOLIA";
1472
- ChainID[ChainID["EVMOS_MAINNET"] = 9001] = "EVMOS_MAINNET";
1473
- ChainID[ChainID["EVMOS_TESTNET"] = 9000] = "EVMOS_TESTNET";
1474
- ChainID[ChainID["HARMONY_MAINNET"] = 1666600000] = "HARMONY_MAINNET";
1475
- ChainID[ChainID["HARMONY_TESTNET"] = 1666700000] = "HARMONY_TESTNET";
1476
1416
  ChainID[ChainID["CRONOS_MAINNET"] = 25] = "CRONOS_MAINNET";
1477
1417
  ChainID[ChainID["CRONOS_TESTNET"] = 338] = "CRONOS_TESTNET";
1478
1418
  ChainID[ChainID["CRONOS_ZKEVM_TESTNET"] = 282] = "CRONOS_ZKEVM_TESTNET";
@@ -1487,53 +1427,23 @@ exports.ChainID = void 0;
1487
1427
  ChainID[ChainID["BOBA_BNB_TESTNET"] = 9728] = "BOBA_BNB_TESTNET";
1488
1428
  ChainID[ChainID["SCROLL_SEPOLIA_TESTNET"] = 534351] = "SCROLL_SEPOLIA_TESTNET";
1489
1429
  ChainID[ChainID["METIS_MAINNET"] = 1088] = "METIS_MAINNET";
1490
- ChainID[ChainID["METIS_STARDUST"] = 588] = "METIS_STARDUST";
1491
1430
  ChainID[ChainID["AVALANCHE_DEXALOT_MAINNET"] = 432204] = "AVALANCHE_DEXALOT_MAINNET";
1492
1431
  ChainID[ChainID["AVALANCHE_DEXALOT_TESTNET"] = 432201] = "AVALANCHE_DEXALOT_TESTNET";
1493
1432
  ChainID[ChainID["AVALANCHE_SHRAPNEL_MAINNET"] = 2044] = "AVALANCHE_SHRAPNEL_MAINNET";
1494
1433
  ChainID[ChainID["AVALANCHE_NUMBERS"] = 10507] = "AVALANCHE_NUMBERS";
1495
- ChainID[ChainID["AVALANCHE_DOS"] = 7979] = "AVALANCHE_DOS";
1496
- ChainID[ChainID["AVALANCHE_XPLUS"] = 1228] = "AVALANCHE_XPLUS";
1497
1434
  ChainID[ChainID["AVALANCHE_XANACHAIN"] = 8888] = "AVALANCHE_XANACHAIN";
1498
1435
  ChainID[ChainID["AVALANCHE_STEP_NETWORK"] = 1234] = "AVALANCHE_STEP_NETWORK";
1499
1436
  ChainID[ChainID["AVALANCHE_SHRAPNEL_TESTNET"] = 2038] = "AVALANCHE_SHRAPNEL_TESTNET";
1500
1437
  ChainID[ChainID["AVALANCHE_BEAM_TESTNET"] = 13337] = "AVALANCHE_BEAM_TESTNET";
1501
1438
  ChainID[ChainID["AVALANCHE_BLITZ_TESTNET"] = 1343] = "AVALANCHE_BLITZ_TESTNET";
1502
- ChainID[ChainID["AVALANCHE_MINTARA_TESTNET"] = 1079] = "AVALANCHE_MINTARA_TESTNET";
1503
- ChainID[ChainID["AVALANCHE_GREEN_DOT_TESTNET"] = 6765897100] = "AVALANCHE_GREEN_DOT_TESTNET";
1504
- ChainID[ChainID["AVALANCHE_PULSAR_TESTNET"] = 431234] = "AVALANCHE_PULSAR_TESTNET";
1505
1439
  ChainID[ChainID["AVALANCHE_UPTN"] = 6119] = "AVALANCHE_UPTN";
1506
- ChainID[ChainID["AVALANCHE_AVACLOUD_TESTNET"] = 152703] = "AVALANCHE_AVACLOUD_TESTNET";
1507
1440
  ChainID[ChainID["AVALANCHE_BEAM_MAINNET"] = 4337] = "AVALANCHE_BEAM_MAINNET";
1508
- ChainID[ChainID["AVALANCHE_BULLETIN_TESTNET"] = 78431] = "AVALANCHE_BULLETIN_TESTNET";
1509
- ChainID[ChainID["AVALANCHE_CONDUIT_TESTNET"] = 78432] = "AVALANCHE_CONDUIT_TESTNET";
1510
- ChainID[ChainID["AVALANCHE_HERO_TESTNET"] = 17772] = "AVALANCHE_HERO_TESTNET";
1511
- ChainID[ChainID["AVALANCHE_HUBBLE_EXCHANGE_TESTNET"] = 321123] = "AVALANCHE_HUBBLE_EXCHANGE_TESTNET";
1512
- ChainID[ChainID["AVALANCHE_KIWI_TESTNET"] = 2037] = "AVALANCHE_KIWI_TESTNET";
1513
- ChainID[ChainID["AVALANCHE_MIHO_TESTNET"] = 360163] = "AVALANCHE_MIHO_TESTNET";
1514
- ChainID[ChainID["AVALANCHE_MONDRIAN_TESTNET"] = 179188] = "AVALANCHE_MONDRIAN_TESTNET";
1515
- ChainID[ChainID["AVALANCHE_NMAC_TESTNET"] = 7777] = "AVALANCHE_NMAC_TESTNET";
1516
- ChainID[ChainID["AVALANCHE_ORDERLY_TESTNET"] = 986532] = "AVALANCHE_ORDERLY_TESTNET";
1517
- ChainID[ChainID["AVALANCHE_THIRDWEB_TESTNET"] = 894538] = "AVALANCHE_THIRDWEB_TESTNET";
1518
- ChainID[ChainID["AVALANCHE_WAGMI_TESTNET"] = 11111] = "AVALANCHE_WAGMI_TESTNET";
1519
- ChainID[ChainID["AVALANCHE_PLAYA3ULL_TESTNET"] = 3012] = "AVALANCHE_PLAYA3ULL_TESTNET";
1520
1441
  ChainID[ChainID["AVALANCHE_MIRAI_TESTNET"] = 2195] = "AVALANCHE_MIRAI_TESTNET";
1521
- ChainID[ChainID["AVALANCHE_AMPLIFY_TESTNET"] = 78430] = "AVALANCHE_AMPLIFY_TESTNET";
1522
- ChainID[ChainID["AVALANCHE_LT0_TESTNET"] = 31330] = "AVALANCHE_LT0_TESTNET";
1523
- ChainID[ChainID["AVALANCHE_LT5_TESTNET"] = 31335] = "AVALANCHE_LT5_TESTNET";
1524
- ChainID[ChainID["AVALANCHE_HUBBLE_EXCHANGE_MAINNET"] = 1992] = "AVALANCHE_HUBBLE_EXCHANGE_MAINNET";
1525
- ChainID[ChainID["METER_MAINNET"] = 82] = "METER_MAINNET";
1526
- ChainID[ChainID["METER_TESTNET"] = 83] = "METER_TESTNET";
1527
- ChainID[ChainID["MILKOMEDA_A1_MAINNET"] = 2002] = "MILKOMEDA_A1_MAINNET";
1528
- ChainID[ChainID["MILKOMEDA_C1_MAINNET"] = 2001] = "MILKOMEDA_C1_MAINNET";
1529
- ChainID[ChainID["MILKOMEDA_C1_DEVNET"] = 200101] = "MILKOMEDA_C1_DEVNET";
1442
+ ChainID[ChainID["BERACHAIN_MAINNET"] = 80094] = "BERACHAIN_MAINNET";
1443
+ ChainID[ChainID["UNICHAIN_MAINNET"] = 130] = "UNICHAIN_MAINNET";
1530
1444
  ChainID[ChainID["CANTO_MAINNET"] = 7700] = "CANTO_MAINNET";
1531
1445
  ChainID[ChainID["FLARENETWORKS_FLARE_MAINNET"] = 14] = "FLARENETWORKS_FLARE_MAINNET";
1532
1446
  ChainID[ChainID["FLARENETWORKS_FLARE_TESTNET"] = 114] = "FLARENETWORKS_FLARE_TESTNET";
1533
- ChainID[ChainID["FLARENETWORKS_CANARY_MAINNET"] = 19] = "FLARENETWORKS_CANARY_MAINNET";
1534
- ChainID[ChainID["FLARENETWORKS_CANARY_TESTNET"] = 16] = "FLARENETWORKS_CANARY_TESTNET";
1535
- ChainID[ChainID["KCC_MAINNET"] = 321] = "KCC_MAINNET";
1536
- ChainID[ChainID["KCC_TESTNET"] = 322] = "KCC_TESTNET";
1537
1447
  ChainID[ChainID["POLYGON_ZKEVM_MAINNET"] = 1101] = "POLYGON_ZKEVM_MAINNET";
1538
1448
  ChainID[ChainID["LINEA_MAINNET"] = 59144] = "LINEA_MAINNET";
1539
1449
  ChainID[ChainID["LINEA_GOERLI_TESTNET"] = 59140] = "LINEA_GOERLI_TESTNET";
@@ -1541,73 +1451,55 @@ exports.ChainID = void 0;
1541
1451
  ChainID[ChainID["POLYGON_ZKEVM_TESTNET"] = 1422] = "POLYGON_ZKEVM_TESTNET";
1542
1452
  ChainID[ChainID["POLYGON_AMOY_TESTNET"] = 80002] = "POLYGON_AMOY_TESTNET";
1543
1453
  ChainID[ChainID["MANTLE_MAINNET"] = 5000] = "MANTLE_MAINNET";
1544
- ChainID[ChainID["POLYGON_ZKEVM_CARDONA_TESTNET"] = 2442] = "POLYGON_ZKEVM_CARDONA_TESTNET";
1545
1454
  ChainID[ChainID["MANTLE_SEPOLIA_TESTNET"] = 5003] = "MANTLE_SEPOLIA_TESTNET";
1455
+ ChainID[ChainID["POLYGON_ZKEVM_CARDONA_TESTNET"] = 2442] = "POLYGON_ZKEVM_CARDONA_TESTNET";
1546
1456
  ChainID[ChainID["BASE_MAINNET"] = 8453] = "BASE_MAINNET";
1547
- ChainID[ChainID["BASE_TESTNET"] = 84531] = "BASE_TESTNET";
1548
1457
  ChainID[ChainID["BASE_SEPOLIA_TESTNET"] = 84532] = "BASE_SEPOLIA_TESTNET";
1549
- ChainID[ChainID["OASYS_MAINNET"] = 248] = "OASYS_MAINNET";
1550
- ChainID[ChainID["OASYS_TESTNET"] = 9372] = "OASYS_TESTNET";
1551
1458
  ChainID[ChainID["SX_MAINNET"] = 416] = "SX_MAINNET";
1552
- ChainID[ChainID["LUMOZ_PUBLIC_ZKSYNC_V2"] = 12027] = "LUMOZ_PUBLIC_ZKSYNC_V2";
1553
- ChainID[ChainID["LUMOZ_STARK_SPORT"] = 12029] = "LUMOZ_STARK_SPORT";
1554
1459
  ChainID[ChainID["OASIS_SAPPHIRE_MAINNET"] = 23294] = "OASIS_SAPPHIRE_MAINNET";
1555
- ChainID[ChainID["OASIS_SAPPHIRE_TESTNET"] = 23295] = "OASIS_SAPPHIRE_TESTNET";
1556
- ChainID[ChainID["XAI_MAINNET"] = 660279] = "XAI_MAINNET";
1557
1460
  ChainID[ChainID["SYNDR_TESTNET"] = 412346] = "SYNDR_TESTNET";
1461
+ ChainID[ChainID["OASIS_SAPPHIRE_TESTNET"] = 23295] = "OASIS_SAPPHIRE_TESTNET";
1558
1462
  ChainID[ChainID["CELO_MAINNET"] = 42220] = "CELO_MAINNET";
1559
1463
  ChainID[ChainID["X1_MAINNET"] = 196] = "X1_MAINNET";
1560
- ChainID[ChainID["CROSSFI_EVM_TESTNET"] = 8545] = "CROSSFI_EVM_TESTNET";
1561
1464
  ChainID[ChainID["HORIZEN_EON_MAINNET"] = 7332] = "HORIZEN_EON_MAINNET";
1562
1465
  ChainID[ChainID["HORIZEN_GOBI_TESTNET"] = 1663] = "HORIZEN_GOBI_TESTNET";
1563
1466
  ChainID[ChainID["FRAXTAL_MAINNET"] = 252] = "FRAXTAL_MAINNET";
1564
1467
  ChainID[ChainID["APECHAIN_TESTNET"] = 1798] = "APECHAIN_TESTNET";
1565
1468
  ChainID[ChainID["BERACHAIN_TESTNET"] = 80084] = "BERACHAIN_TESTNET";
1566
- ChainID[ChainID["LISK_MAINNET"] = 1135] = "LISK_MAINNET";
1567
1469
  ChainID[ChainID["REDSTONE_MAINNET"] = 690] = "REDSTONE_MAINNET";
1568
1470
  ChainID[ChainID["SEI_MAINNET"] = 1329] = "SEI_MAINNET";
1471
+ ChainID[ChainID["APECHAIN_MAINNET"] = 33139] = "APECHAIN_MAINNET";
1472
+ ChainID[ChainID["UNICHAIN_SEPOLIA_TESTNET"] = 1301] = "UNICHAIN_SEPOLIA_TESTNET";
1473
+ ChainID[ChainID["WORLD_MAINNET"] = 480] = "WORLD_MAINNET";
1474
+ ChainID[ChainID["WORLD_SEPOLIA_TESTNET"] = 4801] = "WORLD_SEPOLIA_TESTNET";
1475
+ ChainID[ChainID["LENS_SEPOLIA_TESTNET"] = 37111] = "LENS_SEPOLIA_TESTNET";
1476
+ ChainID[ChainID["INK_SEPOLIA_TESTNET"] = 763373] = "INK_SEPOLIA_TESTNET";
1477
+ ChainID[ChainID["INK_MAINNET"] = 57073] = "INK_MAINNET";
1569
1478
  ChainID[ChainID["AVALANCHE_MELD_TESTNET"] = 222000222] = "AVALANCHE_MELD_TESTNET";
1570
1479
  ChainID[ChainID["AVALANCHE_MELD_MAINNET"] = 333000333] = "AVALANCHE_MELD_MAINNET";
1571
1480
  ChainID[ChainID["GUNZILLA_TESTNET"] = 49321] = "GUNZILLA_TESTNET";
1572
- ChainID[ChainID["ULTRON_MAINNET"] = 1231] = "ULTRON_MAINNET";
1573
- ChainID[ChainID["ULTRON_TESTNET"] = 1230] = "ULTRON_TESTNET";
1574
1481
  ChainID[ChainID["ZORA_MAINNET"] = 7777777] = "ZORA_MAINNET";
1575
1482
  ChainID[ChainID["ZORA_SEPOLIA_TESTNET"] = 999999999] = "ZORA_SEPOLIA_TESTNET";
1576
- ChainID[ChainID["LISK_SEPOLIA_TESTNET"] = 4202] = "LISK_SEPOLIA_TESTNET";
1577
- ChainID[ChainID["OPSIDE_READON_CONTENT_TESTNET"] = 12015] = "OPSIDE_READON_CONTENT_TESTNET";
1578
1483
  ChainID[ChainID["ZKSYNC_MAINNET"] = 324] = "ZKSYNC_MAINNET";
1579
1484
  ChainID[ChainID["ZKSYNC_SEPOLIA_TESTNET"] = 300] = "ZKSYNC_SEPOLIA_TESTNET";
1580
- ChainID[ChainID["BNB_ANTIMATTER_TESTNET"] = 20221] = "BNB_ANTIMATTER_TESTNET";
1581
- ChainID[ChainID["BNB_META_APES_MAINNET"] = 16350] = "BNB_META_APES_MAINNET";
1582
- ChainID[ChainID["BNB_FNCY_MAINNET"] = 73] = "BNB_FNCY_MAINNET";
1583
1485
  ChainID[ChainID["BNB_OPBNB_TESTNET"] = 5611] = "BNB_OPBNB_TESTNET";
1584
- ChainID[ChainID["BNB_FNCY_TESTNET"] = 923018] = "BNB_FNCY_TESTNET";
1585
1486
  ChainID[ChainID["BNB_OPBNB_MAINNET"] = 204] = "BNB_OPBNB_MAINNET";
1586
1487
  ChainID[ChainID["ZETACHAIN_TESTNET"] = 7001] = "ZETACHAIN_TESTNET";
1587
1488
  ChainID[ChainID["ZETACHAIN_MAINNET"] = 7000] = "ZETACHAIN_MAINNET";
1588
- ChainID[ChainID["MODE_TESTNET"] = 919] = "MODE_TESTNET";
1589
- ChainID[ChainID["MODE_MAINNET"] = 34443] = "MODE_MAINNET";
1590
1489
  ChainID[ChainID["KINTO_TESTNET"] = 42888] = "KINTO_TESTNET";
1591
- ChainID[ChainID["LOOT_MAINNET"] = 5151706] = "LOOT_MAINNET";
1592
- ChainID[ChainID["PGN_MAINNET"] = 424] = "PGN_MAINNET";
1593
- ChainID[ChainID["PGN_TESTNET"] = 58008] = "PGN_TESTNET";
1594
1490
  ChainID[ChainID["MANTA_SEPOLIA_TESTNET"] = 3441006] = "MANTA_SEPOLIA_TESTNET";
1595
1491
  ChainID[ChainID["ROLLUX_MAINNET"] = 570] = "ROLLUX_MAINNET";
1596
- ChainID[ChainID["ROLLUX_TESTNET"] = 57000] = "ROLLUX_TESTNET";
1597
1492
  ChainID[ChainID["GNOSIS_MAINNET"] = 100] = "GNOSIS_MAINNET";
1598
1493
  ChainID[ChainID["GNOSIS_TESTNET"] = 10200] = "GNOSIS_TESTNET";
1599
1494
  ChainID[ChainID["VICTION_MAINNET"] = 88] = "VICTION_MAINNET";
1600
1495
  ChainID[ChainID["VICTION_TESTNET"] = 89] = "VICTION_TESTNET";
1601
- ChainID[ChainID["TELOS_MAINNET"] = 40] = "TELOS_MAINNET";
1602
- ChainID[ChainID["TELOS_TESTNET"] = 41] = "TELOS_TESTNET";
1603
1496
  ChainID[ChainID["TAIKO_HEKLA_TESTNET"] = 167009] = "TAIKO_HEKLA_TESTNET";
1604
1497
  ChainID[ChainID["TAIKO_MAINNET"] = 167000] = "TAIKO_MAINNET";
1605
1498
  ChainID[ChainID["MERLIN_MAINNET"] = 4200] = "MERLIN_MAINNET";
1606
1499
  ChainID[ChainID["MERLIN_TESTNET"] = 686868] = "MERLIN_TESTNET";
1607
- ChainID[ChainID["BLAST_MAINNET"] = 81457] = "BLAST_MAINNET";
1608
1500
  ChainID[ChainID["MOVEMENT_MEVM_TESTNET"] = 336] = "MOVEMENT_MEVM_TESTNET";
1501
+ ChainID[ChainID["BLAST_MAINNET"] = 81457] = "BLAST_MAINNET";
1609
1502
  ChainID[ChainID["SCROLL_MAINNET"] = 534352] = "SCROLL_MAINNET";
1610
- ChainID[ChainID["COVALENT_INTERNAL_NETWORK_V1"] = 1131378225] = "COVALENT_INTERNAL_NETWORK_V1";
1611
1503
  })(exports.ChainID || (exports.ChainID = {}));
1612
1504
 
1613
1505
  /**
@@ -2499,14 +2391,16 @@ class TransactionService {
2499
2391
  }
2500
2392
  /**
2501
2393
  *
2502
- * Commonly used to fetch and render a single transaction including its decoded log events. Additionally return semantically decoded information for DEX trades, lending and NFT sales.
2394
+ * Commonly used to fetch and render a single transaction including its decoded log events.
2503
2395
  *
2504
2396
  * @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
2505
2397
  * @param {string} txHash - The transaction hash.
2506
2398
  * @param {GetTransactionQueryParamOpts} queryParamOpts
2507
2399
  * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
2508
2400
  * - `noLogs`: Omit log events.
2509
- * - `withSafe`: Include safe details.
2401
+ * - `withInternal`: Include internal transfers/transactions.
2402
+ * - `withState`: Include all transaction state changes with before and after values.
2403
+ * - `withInputData`: Include the transaction's input data such as the Method ID.
2510
2404
  *
2511
2405
  */
2512
2406
  async getTransaction(chainName, txHash, queryParamOpts) {
@@ -2519,6 +2413,18 @@ class TransactionService {
2519
2413
  key: "no-logs",
2520
2414
  value: queryParamOpts?.noLogs,
2521
2415
  },
2416
+ {
2417
+ key: "with-internal",
2418
+ value: queryParamOpts?.withInternal,
2419
+ },
2420
+ {
2421
+ key: "with-state",
2422
+ value: queryParamOpts?.withState,
2423
+ },
2424
+ {
2425
+ key: "with-input-data",
2426
+ value: queryParamOpts?.withInputData,
2427
+ },
2522
2428
  ]);
2523
2429
  const parseData = (data) => {
2524
2430
  if (data.data) {
@@ -2550,34 +2456,24 @@ class TransactionService {
2550
2456
  }
2551
2457
  /**
2552
2458
  *
2553
- * Commonly used to fetch and render the most recent transactions involving an address. Frequently seen in wallet applications.
2459
+ * Commonly used to fetch the earliest and latest transactions, and the transaction count for a wallet. Calculate the age of the wallet and the time it has been idle and quickly gain insights into their engagement with web3.
2554
2460
  *
2555
2461
  * @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
2556
2462
  * @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
2557
- * @param {GetAllTransactionsForAddressQueryParamOpts} queryParamOpts
2463
+ * @param {GetTransactionSummaryQueryParamOpts} queryParamOpts
2558
2464
  * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
2559
- * - `noLogs`: Omit log events.
2560
- * - `blockSignedAtAsc`: Sort the transactions in ascending chronological order. By default, it's set to `false` and returns transactions in descending chronological order.
2561
- * - `withSafe`: Include safe details.
2465
+ * - `withGas`: Include gas summary details. Additional charge of 1 credit when true. Response times may be impacted for wallets with millions of transactions.
2562
2466
  *
2563
2467
  */
2564
- async *getAllTransactionsForAddress(chainName, walletAddress, queryParamOpts) {
2565
- const endpoint = endpointGenerator(`${chainName}/address/${walletAddress}/transactions_v3`, [
2468
+ async getTransactionSummary(chainName, walletAddress, queryParamOpts) {
2469
+ const endpoint = endpointGenerator(`${chainName}/address/${walletAddress}/transactions_summary`, [
2566
2470
  {
2567
2471
  key: "quote-currency",
2568
2472
  value: queryParamOpts?.quoteCurrency,
2569
2473
  },
2570
2474
  {
2571
- key: "no-logs",
2572
- value: queryParamOpts?.noLogs,
2573
- },
2574
- {
2575
- key: "block-signed-at-asc",
2576
- value: queryParamOpts?.blockSignedAtAsc,
2577
- },
2578
- {
2579
- key: "with-safe",
2580
- value: queryParamOpts?.withSafe,
2475
+ key: "with-gas",
2476
+ value: queryParamOpts?.withGas,
2581
2477
  },
2582
2478
  ]);
2583
2479
  const parseData = (data) => {
@@ -2586,44 +2482,46 @@ class TransactionService {
2586
2482
  ? new Date(data.data.updated_at)
2587
2483
  : null;
2588
2484
  data.data.items = data.data.items
2589
- ? data.data.items.map((txItem) => ({
2590
- ...txItem,
2591
- value: bigIntParser(txItem.value),
2592
- fees_paid: bigIntParser(txItem.fees_paid),
2593
- block_signed_at: txItem.block_signed_at
2594
- ? new Date(txItem.block_signed_at)
2595
- : null,
2596
- log_events: txItem.log_events
2597
- ? txItem.log_events.map((logItem) => ({
2598
- ...logItem,
2599
- block_signed_at: logItem.block_signed_at
2600
- ? new Date(logItem.block_signed_at)
2601
- : null,
2602
- }))
2603
- : null,
2485
+ ? data.data.items.map((txsItem) => ({
2486
+ ...txsItem,
2487
+ earliest_transaction: {
2488
+ ...txsItem.earliest_transaction,
2489
+ block_signed_at: txsItem?.earliest_transaction?.block_signed_at
2490
+ ? new Date(txsItem.earliest_transaction.block_signed_at)
2491
+ : null,
2492
+ },
2493
+ latest_transaction: {
2494
+ ...txsItem.latest_transaction,
2495
+ block_signed_at: txsItem?.latest_transaction?.block_signed_at
2496
+ ? new Date(txsItem?.latest_transaction?.block_signed_at)
2497
+ : null,
2498
+ },
2499
+ // ? API vs docs non-consistent
2500
+ // gas_summary: {
2501
+ // ...txsItem.gas_summary,
2502
+ // total_fees_paid: bigIntParser(
2503
+ // txsItem.gas_summary.total_fees_paid
2504
+ // ),
2505
+ // },
2604
2506
  }))
2605
2507
  : null;
2606
2508
  }
2607
2509
  return data;
2608
2510
  };
2609
- for await (const data of paginateEndpoint(endpoint, this.execution, parseData, "links")) {
2610
- yield data;
2611
- }
2511
+ return await this.execution.execute(endpoint, parseData);
2612
2512
  }
2613
2513
  /**
2614
2514
  *
2615
- * Commonly used to fetch and render the most recent transactions involving an address. Frequently seen in wallet applications.
2515
+ * Commonly used to fetch and render the earliest transactions involving an address. Frequently seen in wallet applications.
2616
2516
  *
2617
2517
  * @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
2618
2518
  * @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
2619
- * @param {GetAllTransactionsForAddressQueryParamOpts} queryParamOpts
2519
+ * @param {GetEarliestTransactionsForAddressQueryParamOpts} queryParamOpts
2620
2520
  * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
2621
2521
  * - `noLogs`: Omit log events.
2622
- * - `blockSignedAtAsc`: Sort the transactions in ascending chronological order. By default, it's set to `false` and returns transactions in descending chronological order.
2623
- * - `withSafe`: Include safe details.
2624
2522
  *
2625
2523
  */
2626
- async getAllTransactionsForAddressByPage(chainName, walletAddress, queryParamOpts) {
2524
+ async getEarliestTransactionsForAddress(chainName, walletAddress, queryParamOpts) {
2627
2525
  const searchParams = [
2628
2526
  {
2629
2527
  key: "quote-currency",
@@ -2633,16 +2531,8 @@ class TransactionService {
2633
2531
  key: "no-logs",
2634
2532
  value: queryParamOpts?.noLogs,
2635
2533
  },
2636
- {
2637
- key: "block-signed-at-asc",
2638
- value: queryParamOpts?.blockSignedAtAsc,
2639
- },
2640
- {
2641
- key: "with-safe",
2642
- value: queryParamOpts?.withSafe,
2643
- },
2644
2534
  ];
2645
- const endpoint = endpointGenerator(`${chainName}/address/${walletAddress}/transactions_v3`, searchParams);
2535
+ const endpoint = endpointGenerator(`${chainName}/bulk/transactions/${walletAddress}`, searchParams);
2646
2536
  const parseData = (data) => {
2647
2537
  if (data.data) {
2648
2538
  data.data.prev = data.data?.links?.prev
@@ -2679,18 +2569,21 @@ class TransactionService {
2679
2569
  }
2680
2570
  /**
2681
2571
  *
2682
- * Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
2572
+ * Commonly used to fetch and render the most recent transactions involving an address. Frequently seen in wallet applications.
2683
2573
  *
2684
2574
  * @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
2685
- * @param {number} blockHeight - The requested block height.
2686
- * @param {GetTransactionsForBlockQueryParamOpts} queryParamOpts
2575
+ * @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
2576
+ * @param {GetAllTransactionsForAddressQueryParamOpts} queryParamOpts
2687
2577
  * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
2688
2578
  * - `noLogs`: Omit log events.
2689
- * - `withSafe`: Include safe details.
2579
+ * - `blockSignedAtAsc`: Sort the transactions in ascending chronological order. By default, it's set to `false` and returns transactions in descending chronological order.
2580
+ * - `withInternal`: Include internal transfers/transactions.
2581
+ * - `withState`: Include all transaction state changes with before and after values.
2582
+ * - `withInputData`: Include the transaction's input data such as the Method ID.
2690
2583
  *
2691
2584
  */
2692
- async getTransactionsForBlock(chainName, blockHeight, queryParamOpts) {
2693
- const endpoint = endpointGenerator(`${chainName}/block/${blockHeight}/transactions_v3`, [
2585
+ async *getAllTransactionsForAddress(chainName, walletAddress, queryParamOpts) {
2586
+ const endpoint = endpointGenerator(`${chainName}/address/${walletAddress}/transactions_v3`, [
2694
2587
  {
2695
2588
  key: "quote-currency",
2696
2589
  value: queryParamOpts?.quoteCurrency,
@@ -2700,8 +2593,20 @@ class TransactionService {
2700
2593
  value: queryParamOpts?.noLogs,
2701
2594
  },
2702
2595
  {
2703
- key: "with-safe",
2704
- value: queryParamOpts?.withSafe,
2596
+ key: "block-signed-at-asc",
2597
+ value: queryParamOpts?.blockSignedAtAsc,
2598
+ },
2599
+ {
2600
+ key: "with-internal",
2601
+ value: queryParamOpts?.withInternal,
2602
+ },
2603
+ {
2604
+ key: "with-state",
2605
+ value: queryParamOpts?.withState,
2606
+ },
2607
+ {
2608
+ key: "with-input-data",
2609
+ value: queryParamOpts?.withInputData,
2705
2610
  },
2706
2611
  ]);
2707
2612
  const parseData = (data) => {
@@ -2730,57 +2635,80 @@ class TransactionService {
2730
2635
  }
2731
2636
  return data;
2732
2637
  };
2733
- return await this.execution.execute(endpoint, parseData);
2638
+ for await (const data of paginateEndpoint(endpoint, this.execution, parseData, "links")) {
2639
+ yield data;
2640
+ }
2734
2641
  }
2735
2642
  /**
2736
2643
  *
2737
- * Commonly used to fetch the earliest and latest transactions, and the transaction count for a wallet. Calculate the age of the wallet and the time it has been idle and quickly gain insights into their engagement with web3.
2644
+ * Commonly used to fetch and render the most recent transactions involving an address. Frequently seen in wallet applications.
2738
2645
  *
2739
2646
  * @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
2740
2647
  * @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
2741
- * @param {GetTransactionSummaryQueryParamOpts} queryParamOpts
2648
+ * @param {GetAllTransactionsForAddressQueryParamOpts} queryParamOpts
2742
2649
  * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
2743
- * - `withGas`: Include gas summary details. Additional charge of 1 credit when true. Response times may be impacted for wallets with millions of transactions.
2650
+ * - `noLogs`: Omit log events.
2651
+ * - `blockSignedAtAsc`: Sort the transactions in ascending chronological order. By default, it's set to `false` and returns transactions in descending chronological order.
2652
+ * - `withInternal`: Include internal transfers/transactions.
2653
+ * - `withState`: Include all transaction state changes with before and after values.
2654
+ * - `withInputData`: Include the transaction's input data such as the Method ID.
2744
2655
  *
2745
2656
  */
2746
- async getTransactionSummary(chainName, walletAddress, queryParamOpts) {
2747
- const endpoint = endpointGenerator(`${chainName}/address/${walletAddress}/transactions_summary`, [
2657
+ async getAllTransactionsForAddressByPage(chainName, walletAddress, queryParamOpts) {
2658
+ const searchParams = [
2748
2659
  {
2749
2660
  key: "quote-currency",
2750
2661
  value: queryParamOpts?.quoteCurrency,
2751
2662
  },
2752
2663
  {
2753
- key: "with-gas",
2754
- value: queryParamOpts?.withGas,
2664
+ key: "no-logs",
2665
+ value: queryParamOpts?.noLogs,
2755
2666
  },
2756
- ]);
2667
+ {
2668
+ key: "block-signed-at-asc",
2669
+ value: queryParamOpts?.blockSignedAtAsc,
2670
+ },
2671
+ {
2672
+ key: "with-internal",
2673
+ value: queryParamOpts?.withInternal,
2674
+ },
2675
+ {
2676
+ key: "with-state",
2677
+ value: queryParamOpts?.withState,
2678
+ },
2679
+ {
2680
+ key: "with-input-data",
2681
+ value: queryParamOpts?.withInputData,
2682
+ },
2683
+ ];
2684
+ const endpoint = endpointGenerator(`${chainName}/address/${walletAddress}/transactions_v3`, searchParams);
2757
2685
  const parseData = (data) => {
2758
2686
  if (data.data) {
2687
+ data.data.prev = data.data?.links?.prev
2688
+ ? async () => this.execution.execute(endpointGenerator(data.data?.links?.prev, searchParams), parseData)
2689
+ : null;
2690
+ data.data.next = data.data?.links?.next
2691
+ ? async () => this.execution.execute(endpointGenerator(data.data?.links?.next, searchParams), parseData)
2692
+ : null;
2759
2693
  data.data.updated_at = data.data.updated_at
2760
2694
  ? new Date(data.data.updated_at)
2761
2695
  : null;
2762
2696
  data.data.items = data.data.items
2763
- ? data.data.items.map((txsItem) => ({
2764
- ...txsItem,
2765
- earliest_transaction: {
2766
- ...txsItem.earliest_transaction,
2767
- block_signed_at: txsItem?.earliest_transaction?.block_signed_at
2768
- ? new Date(txsItem.earliest_transaction.block_signed_at)
2769
- : null,
2770
- },
2771
- latest_transaction: {
2772
- ...txsItem.latest_transaction,
2773
- block_signed_at: txsItem?.latest_transaction?.block_signed_at
2774
- ? new Date(txsItem?.latest_transaction?.block_signed_at)
2775
- : null,
2776
- },
2777
- // ? API vs docs non-consistent
2778
- // gas_summary: {
2779
- // ...txsItem.gas_summary,
2780
- // total_fees_paid: bigIntParser(
2781
- // txsItem.gas_summary.total_fees_paid
2782
- // ),
2783
- // },
2697
+ ? data.data.items.map((txItem) => ({
2698
+ ...txItem,
2699
+ value: bigIntParser(txItem.value),
2700
+ fees_paid: bigIntParser(txItem.fees_paid),
2701
+ block_signed_at: txItem.block_signed_at
2702
+ ? new Date(txItem.block_signed_at)
2703
+ : null,
2704
+ log_events: txItem.log_events
2705
+ ? txItem.log_events.map((logItem) => ({
2706
+ ...logItem,
2707
+ block_signed_at: logItem.block_signed_at
2708
+ ? new Date(logItem.block_signed_at)
2709
+ : null,
2710
+ }))
2711
+ : null,
2784
2712
  }))
2785
2713
  : null;
2786
2714
  }
@@ -2793,14 +2721,13 @@ class TransactionService {
2793
2721
  * @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
2794
2722
  * @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
2795
2723
  * @param {number} page - The requested page, 0-indexed.
2796
- * @param {GetTransactionsForAddressV3QueryParamOpts} queryParamOpts
2724
+ * @param {getPaginatedTransactionsForAddressQueryParamOpts} queryParamOpts
2797
2725
  * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
2798
2726
  * - `noLogs`: Omit log events.
2799
2727
  * - `blockSignedAtAsc`: Sort the transactions in ascending chronological order. By default, it's set to `false` and returns transactions in descending chronological order.
2800
- * - `withSafe`: Include safe details.
2801
2728
  *
2802
2729
  */
2803
- async getTransactionsForAddressV3(chainName, walletAddress, page, queryParamOpts) {
2730
+ async getPaginatedTransactionsForAddress(chainName, walletAddress, page, queryParamOpts) {
2804
2731
  const searchParams = [
2805
2732
  {
2806
2733
  key: "quote-currency",
@@ -2814,10 +2741,6 @@ class TransactionService {
2814
2741
  key: "block-signed-at-asc",
2815
2742
  value: queryParamOpts?.blockSignedAtAsc,
2816
2743
  },
2817
- {
2818
- key: "with-safe",
2819
- value: queryParamOpts?.withSafe,
2820
- },
2821
2744
  ];
2822
2745
  const endpoint = endpointGenerator(`${chainName}/address/${walletAddress}/transactions_v3/page/${page}`, searchParams);
2823
2746
  const parseData = (data) => {
@@ -2862,7 +2785,6 @@ class TransactionService {
2862
2785
  * @param {GetTimeBucketTransactionsForAddressQueryParamOpts} queryParamOpts
2863
2786
  * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
2864
2787
  * - `noLogs`: Omit log events.
2865
- * - `withSafe`: Include safe details.
2866
2788
  *
2867
2789
  */
2868
2790
  async getTimeBucketTransactionsForAddress(chainName, walletAddress, timeBucket, queryParamOpts) {
@@ -2875,10 +2797,6 @@ class TransactionService {
2875
2797
  key: "no-logs",
2876
2798
  value: queryParamOpts?.noLogs,
2877
2799
  },
2878
- {
2879
- key: "with-safe",
2880
- value: queryParamOpts?.withSafe,
2881
- },
2882
2800
  ];
2883
2801
  const endpoint = endpointGenerator(`${chainName}/bulk/transactions/${walletAddress}/${timeBucket}`, searchParams);
2884
2802
  const parseData = (data) => {
@@ -2920,15 +2838,14 @@ class TransactionService {
2920
2838
  * Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
2921
2839
  *
2922
2840
  * @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
2923
- * @param {string} blockHash - The requested block hash.
2924
- * @param {number} page - The requested 0-indexed page number.
2925
- * @param {GetTransactionsForBlockHashByPageQueryParamOpts} queryParamOpts
2841
+ * @param {number} blockHeight - The requested block height.
2842
+ * @param {number} page - The requested page, 0-indexed.
2843
+ * @param {getTransactionsForBlockByPageQueryParamOpts} queryParamOpts
2926
2844
  * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
2927
2845
  * - `noLogs`: Omit log events.
2928
- * - `withSafe`: Include safe details.
2929
2846
  *
2930
2847
  */
2931
- async getTransactionsForBlockHashByPage(chainName, blockHash, page, queryParamOpts) {
2848
+ async getTransactionsForBlockByPage(chainName, blockHeight, page, queryParamOpts) {
2932
2849
  const searchParams = [
2933
2850
  {
2934
2851
  key: "quote-currency",
@@ -2938,23 +2855,19 @@ class TransactionService {
2938
2855
  key: "no-logs",
2939
2856
  value: queryParamOpts?.noLogs,
2940
2857
  },
2941
- {
2942
- key: "with-safe",
2943
- value: queryParamOpts?.withSafe,
2944
- },
2945
2858
  ];
2946
- const endpoint = endpointGenerator(`${chainName}/block_hash/${blockHash}/transactions_v3/page/${page}`, searchParams);
2859
+ const endpoint = endpointGenerator(`${chainName}/block/${blockHeight}/transactions_v3/page/${page}`, searchParams);
2947
2860
  const parseData = (data) => {
2948
2861
  if (data.data) {
2862
+ data.data.updated_at = data.data.updated_at
2863
+ ? new Date(data.data.updated_at)
2864
+ : null;
2949
2865
  data.data.prev = data.data?.links?.prev
2950
2866
  ? async () => this.execution.execute(endpointGenerator(data.data?.links?.prev, searchParams), parseData)
2951
2867
  : null;
2952
2868
  data.data.next = data.data?.links?.next
2953
2869
  ? async () => this.execution.execute(endpointGenerator(data.data?.links?.next, searchParams), parseData)
2954
2870
  : null;
2955
- data.data.updated_at = data.data.updated_at
2956
- ? new Date(data.data.updated_at)
2957
- : null;
2958
2871
  data.data.items = data.data.items
2959
2872
  ? data.data.items.map((txItem) => ({
2960
2873
  ...txItem,
@@ -2984,14 +2897,13 @@ class TransactionService {
2984
2897
  *
2985
2898
  * @param {Chain} chainName - The chain name eg: `eth-mainnet` or 1.
2986
2899
  * @param {string} blockHash - The requested block hash.
2987
- * @param {GetTransactionsForBlockHashQueryParamOpts} queryParamOpts
2900
+ * @param {getTransactionsForBlockByPageQueryParamOpts} queryParamOpts
2988
2901
  * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
2989
2902
  * - `noLogs`: Omit log events.
2990
- * - `withSafe`: Include safe details.
2991
2903
  *
2992
2904
  */
2993
- async getTransactionsForBlockHash(chainName, blockHash, queryParamOpts) {
2994
- const endpoint = endpointGenerator(`${chainName}/block_hash/${blockHash}/transactions_v3`, [
2905
+ async getTransactionsForBlock(chainName, blockHash, queryParamOpts) {
2906
+ const searchParams = [
2995
2907
  {
2996
2908
  key: "quote-currency",
2997
2909
  value: queryParamOpts?.quoteCurrency,
@@ -3000,11 +2912,8 @@ class TransactionService {
3000
2912
  key: "no-logs",
3001
2913
  value: queryParamOpts?.noLogs,
3002
2914
  },
3003
- {
3004
- key: "with-safe",
3005
- value: queryParamOpts?.withSafe,
3006
- },
3007
- ]);
2915
+ ];
2916
+ const endpoint = endpointGenerator(`${chainName}/block_hash/${blockHash}/transactions_v3`, searchParams);
3008
2917
  const parseData = (data) => {
3009
2918
  if (data.data) {
3010
2919
  data.data.updated_at = data.data.updated_at
@@ -3033,6 +2942,12 @@ class TransactionService {
3033
2942
  };
3034
2943
  return await this.execution.execute(endpoint, parseData);
3035
2944
  }
2945
+ /**
2946
+ * @deprecated This method has been deprecated and will be removed in future releases. Use `getPaginatedTransactionsForAddress` instead.
2947
+ */
2948
+ async getTransactionsForAddressV3(chainName, walletAddress, page, queryParamOpts) {
2949
+ return this.getPaginatedTransactionsForAddress(chainName, walletAddress, page, queryParamOpts);
2950
+ }
3036
2951
  }
3037
2952
 
3038
2953
  async function debugOutput(settings, ...content) {