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