@1llet.xyz/erc4337-gasless-sdk 0.4.51 → 0.4.53

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/index.js CHANGED
@@ -434,6 +434,7 @@ var BundlerClient = class {
434
434
  },
435
435
  this.entryPointAddress
436
436
  ]);
437
+ console.log("DEBUG: estimateGas result:", result);
437
438
  return {
438
439
  callGasLimit: result.callGasLimit,
439
440
  verificationGasLimit: result.verificationGasLimit,
@@ -1295,285 +1296,133 @@ var BASE_SEPOLIA = {
1295
1296
  factoryAddress: "0x9406Cc6185a346906296840746125a0E44976454"
1296
1297
  // Paymaster optional
1297
1298
  }};
1298
-
1299
- // src/chains.ts
1300
- init_Stellar();
1301
- function mapToSDKConfig(data) {
1302
- if (data.nonEvm) {
1303
- return {
1304
- chain: { id: 9e3, name: "Stellar" },
1305
- // Custom ID for Stellar
1306
- tokens: data.assets.map((a) => ({
1307
- symbol: a.name,
1308
- decimals: a.decimals,
1309
- address: a.address
1310
- }))
1311
- };
1312
- }
1313
- if (!data.evm) throw new Error("Non-EVM config used in EVM SDK");
1314
- return {
1315
- chain: data.evm.chain,
1316
- rpcUrl: data.evm.rpcUrl || void 0,
1317
- bundlerUrl: data.evm.bundlerUrl,
1318
- entryPointAddress: data.evm.entryPointAddress,
1319
- factoryAddress: data.evm.factoryAddress,
1320
- paymasterAddress: data.evm.paymasterAddress,
1321
- tokens: data.assets.map((a) => ({
1322
- symbol: a.name,
1323
- decimals: a.decimals,
1324
- address: a.address
1325
- }))
1326
- };
1327
- }
1328
- var BASE_MAINNET = mapToSDKConfig(BASE);
1329
- var OPTIMISM_MAINNET = mapToSDKConfig(OPTIMISM);
1330
- var GNOSIS_MAINNET = mapToSDKConfig(GNOSIS);
1331
- var BASE_SEPOLIA2 = mapToSDKConfig(BASE_SEPOLIA);
1332
- var STELLAR_MAINNET = mapToSDKConfig(exports.STELLAR);
1333
- var CHAIN_CONFIGS = {
1334
- [chains.base.id]: BASE_MAINNET,
1335
- [chains.baseSepolia.id]: BASE_SEPOLIA2,
1336
- [chains.gnosis.id]: GNOSIS_MAINNET,
1337
- [chains.optimism.id]: OPTIMISM_MAINNET,
1338
- 9e3: STELLAR_MAINNET
1339
- };
1340
-
1341
- // src/constants/chains.ts
1342
- var CHAIN_ID_TO_KEY = {
1343
- "8453": "Base",
1344
- "84532": "Base",
1345
- "100": "Gnosis",
1346
- "10": "Optimism",
1347
- "11155420": "Optimism",
1348
- "42161": "Arbitrum",
1349
- "9000": "Stellar"
1350
- };
1351
-
1352
- // src/index.ts
1353
- init_StellarService();
1354
- init_Stellar();
1355
-
1356
- // src/services/cctp.ts
1357
- init_facilitator();
1358
- init_facilitator();
1359
-
1360
- // src/constants/abis.ts
1361
- var usdcErc3009Abi = [
1362
- {
1363
- inputs: [
1364
- { name: "from", type: "address" },
1365
- { name: "to", type: "address" },
1366
- { name: "value", type: "uint256" },
1367
- { name: "validAfter", type: "uint256" },
1368
- { name: "validBefore", type: "uint256" },
1369
- { name: "nonce", type: "bytes32" },
1370
- { name: "v", type: "uint8" },
1371
- { name: "r", type: "bytes32" },
1372
- { name: "s", type: "bytes32" }
1373
- ],
1374
- name: "transferWithAuthorization",
1375
- outputs: [],
1376
- stateMutability: "nonpayable",
1377
- type: "function"
1378
- },
1379
- {
1380
- inputs: [{ name: "account", type: "address" }],
1381
- name: "balanceOf",
1382
- outputs: [{ name: "", type: "uint256" }],
1383
- stateMutability: "view",
1384
- type: "function"
1385
- },
1386
- {
1387
- inputs: [
1388
- { name: "spender", type: "address" },
1389
- { name: "amount", type: "uint256" }
1390
- ],
1391
- name: "approve",
1392
- outputs: [{ name: "", type: "bool" }],
1393
- stateMutability: "nonpayable",
1394
- type: "function"
1395
- },
1396
- {
1397
- inputs: [
1398
- { name: "to", type: "address" },
1399
- { name: "amount", type: "uint256" }
1400
- ],
1401
- name: "transfer",
1402
- outputs: [{ name: "", type: "bool" }],
1403
- stateMutability: "nonpayable",
1404
- type: "function"
1405
- }
1406
- ];
1407
- var tokenMessengerAbi = [
1408
- {
1409
- inputs: [
1410
- { name: "amount", type: "uint256" },
1411
- { name: "destinationDomain", type: "uint32" },
1412
- { name: "mintRecipient", type: "bytes32" },
1413
- { name: "burnToken", type: "address" },
1414
- { name: "destinationCaller", type: "bytes32" },
1415
- { name: "maxFee", type: "uint256" },
1416
- // Suspected wrapper arg
1417
- { name: "minFinalityThreshold", type: "uint32" }
1418
- // Suspected wrapper arg
1419
- ],
1420
- name: "depositForBurn",
1421
- outputs: [{ name: "_nonce", type: "uint64" }],
1422
- stateMutability: "nonpayable",
1423
- type: "function"
1424
- },
1425
- // Alternative overload often used:
1426
- {
1427
- inputs: [
1428
- { name: "amount", type: "uint256" },
1429
- { name: "destinationDomain", type: "uint32" },
1430
- { name: "mintRecipient", type: "bytes32" },
1431
- { name: "burnToken", type: "address" }
1432
- ],
1433
- name: "depositForBurn",
1434
- outputs: [{ name: "_nonce", type: "uint64" }],
1435
- stateMutability: "nonpayable",
1436
- type: "function"
1437
- }
1438
- ];
1439
- var messageTransmitterAbi = [
1440
- {
1441
- inputs: [
1442
- { name: "message", type: "bytes" },
1443
- { name: "attestation", type: "bytes" }
1444
- ],
1445
- name: "receiveMessage",
1446
- outputs: [{ name: "success", type: "bool" }],
1447
- stateMutability: "nonpayable",
1448
- type: "function"
1449
- }
1450
- ];
1451
- var createRetrieveAttestation = async (transactionHash, chainId, timeout = 6e4) => {
1452
- const baseUrl = "https://iris-api.circle.com";
1453
- const url = `${baseUrl}/v2/messages/${chainId}?transactionHash=${transactionHash}`;
1454
- const start = Date.now();
1455
- const FIVE_SECONDS = 5e3;
1456
- while (true) {
1457
- const elapsed = Date.now() - start;
1458
- if (elapsed > timeout) {
1459
- throw new Error(
1460
- "Timeout: Attestation not retrieved within the expected time."
1461
- );
1462
- }
1463
- try {
1464
- const response = await axios__default.default.get(url);
1465
- const message = response.data?.messages?.[0];
1466
- if (message?.status === "complete") {
1467
- console.log("Attestation retrieved successfully!");
1468
- return message;
1469
- }
1470
- console.log("Waiting for attestation...");
1471
- } catch (error) {
1472
- const status = error.response?.status;
1473
- if (status === 404) {
1474
- console.log("Waiting for attestation...");
1475
- } else {
1476
- console.error("Error fetching attestation:", error.message);
1477
- }
1478
- }
1479
- await new Promise((resolve) => setTimeout(resolve, FIVE_SECONDS));
1480
- }
1481
- };
1482
- var ARBITRUM = {
1299
+ var AVALANCHE = {
1483
1300
  assets: [
1484
1301
  {
1485
1302
  name: "USDC",
1486
1303
  decimals: 6,
1487
- address: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
1304
+ address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
1488
1305
  coingeckoId: "usd-coin"
1489
1306
  },
1490
1307
  {
1491
- name: "USDT",
1492
- decimals: 6,
1493
- address: "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",
1494
- coingeckoId: "tether"
1495
- },
1496
- {
1497
- name: "ARB",
1308
+ name: "AVAX",
1498
1309
  decimals: 18,
1499
- address: "0x912CE59144191C1204E64559FE8253a0e49E6548",
1500
- coingeckoId: "arbitrum"
1310
+ address: "0x0000000000000000000000000000000000000000",
1311
+ coingeckoId: "avalanche-2"
1501
1312
  },
1502
1313
  {
1503
- name: "ETH",
1504
- decimals: 18,
1505
- address: "0x0000000000000000000000000000000000000000",
1506
- coingeckoId: "ethereum"
1314
+ name: "USDT",
1315
+ decimals: 6,
1316
+ address: "0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7",
1317
+ coingeckoId: "tether"
1507
1318
  }
1508
1319
  ],
1509
1320
  evm: {
1510
- chain: chains.arbitrum,
1511
- rpcUrl: "https://arb-mainnet.g.alchemy.com/v2/49fUGmuW05ynCui0VEvDN",
1512
- supports7702: true,
1513
- erc4337: false
1321
+ chain: chains.avalanche,
1322
+ rpcUrl: chains.avalanche.rpcUrls.default.http[0],
1323
+ supports7702: false,
1324
+ bundlerUrl: `${BUNDLER_URL}/rpc?chain=avalanche`,
1325
+ erc4337: false,
1326
+ entryPointAddress: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
1327
+ factoryAddress: "0x5D1D71FE2De5D1C52c7c11311332eC7f0CBf88aF",
1328
+ paymasterAddress: "0x6c0de464F2203FE089FF719Acf425dFfE6ac1EE5"
1514
1329
  },
1515
1330
  crossChainInformation: {
1516
1331
  circleInformation: {
1517
1332
  supportCirclePaymaster: true,
1518
- aproxFromFee: 0,
1519
1333
  cCTPInformation: {
1520
1334
  supportCCTP: true,
1521
- domain: 3
1522
- }
1335
+ domain: 1
1336
+ },
1337
+ aproxFromFee: 0
1523
1338
  },
1524
1339
  nearIntentInformation: {
1525
1340
  support: true,
1526
1341
  assetsId: [
1527
1342
  {
1528
- assetId: "nep141:arb-0xaf88d065e77c8cc2239327c5edb3a432268e5831.omft.near",
1343
+ assetId: "nep245:v2_1.omni.hot.tg:43114_3atVJH3r5c4GqiSYmg9fECvjc47o",
1529
1344
  name: "USDC",
1530
1345
  decimals: 6
1531
1346
  },
1532
1347
  {
1533
- assetId: "nep141:arb-0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9.omft.near",
1534
- name: "USDT",
1535
- decimals: 6
1536
- },
1537
- {
1538
- assetId: "nep141:arb.omft.near",
1539
- name: "ETH",
1348
+ assetId: "nep245:v2_1.omni.hot.tg:43114_11111111111111111111",
1349
+ name: "AVAX",
1540
1350
  decimals: 18
1541
1351
  },
1542
1352
  {
1543
- assetId: "nep141:arb-0x912ce59144191c1204e64559fe8253a0e49e6548.omft.near",
1544
- name: "ARB",
1545
- decimals: 18
1353
+ assetId: "nep245:v2_1.omni.hot.tg:43114_372BeH7ENZieCaabwkbWkBiTTgXp",
1354
+ name: "USDT",
1355
+ decimals: 6
1546
1356
  }
1547
1357
  ],
1548
1358
  needMemo: false
1549
1359
  }
1550
1360
  }
1551
1361
  };
1552
- var UNICHAIN = {
1362
+ var BNB = {
1553
1363
  assets: [
1554
1364
  {
1555
1365
  name: "USDC",
1556
- decimals: 6,
1557
- address: "0x078D782b760474a361dDA0AF3839290b0EF57AD6",
1366
+ decimals: 18,
1367
+ address: "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",
1368
+ // BSC Mainnet USDC
1558
1369
  coingeckoId: "usd-coin"
1370
+ },
1371
+ {
1372
+ name: "USDT",
1373
+ decimals: 18,
1374
+ address: "0x55d398326f99059fF775485246999027B3197955",
1375
+ // BSC Mainnet USDT
1376
+ coingeckoId: "tether"
1377
+ },
1378
+ {
1379
+ name: "BNB",
1380
+ decimals: 18,
1381
+ address: "0x0000000000000000000000000000000000000000",
1382
+ // Native
1383
+ coingeckoId: "binancecoin"
1559
1384
  }
1560
1385
  ],
1561
1386
  evm: {
1562
- chain: chains.unichain,
1563
- rpcUrl: "https://unichain-mainnet.g.alchemy.com/v2/49fUGmuW05ynCui0VEvDN",
1387
+ chain: chains.bsc,
1388
+ rpcUrl: "https://bsc-dataseed.binance.org",
1564
1389
  supports7702: true,
1565
- erc4337: false
1390
+ bundlerUrl: `${BUNDLER_URL}/rpc?chain=bsc`,
1391
+ erc4337: false,
1392
+ entryPointAddress: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
1393
+ factoryAddress: "0x2d5dBD90d3aB35614cdf686a67A9889E56B20b27",
1394
+ paymasterAddress: "0x460593321DdbE4e1038666Ad07Fc1F817dfA02DB"
1566
1395
  },
1567
1396
  crossChainInformation: {
1568
1397
  circleInformation: {
1569
- supportCirclePaymaster: true,
1398
+ supportCirclePaymaster: false,
1399
+ aproxFromFee: 0,
1570
1400
  cCTPInformation: {
1571
- supportCCTP: true,
1572
- domain: 10
1573
- },
1574
- aproxFromFee: 0
1401
+ supportCCTP: false,
1402
+ domain: 0
1403
+ }
1575
1404
  },
1576
- nearIntentInformation: null
1405
+ nearIntentInformation: {
1406
+ support: true,
1407
+ needMemo: false,
1408
+ assetsId: [
1409
+ {
1410
+ name: "USDC",
1411
+ assetId: "nep245:v2_1.omni.hot.tg:56_2w93GqMcEmQFDru84j3HZZWt557r",
1412
+ decimals: 18
1413
+ },
1414
+ {
1415
+ name: "USDT",
1416
+ assetId: "nep245:v2_1.omni.hot.tg:56_2CMMyVTGZkeyNZTSvS5sarzfir6g",
1417
+ decimals: 18
1418
+ },
1419
+ {
1420
+ name: "BNB",
1421
+ assetId: "nep245:v2_1.omni.hot.tg:56_11111111111111111111",
1422
+ decimals: 18
1423
+ }
1424
+ ]
1425
+ }
1577
1426
  }
1578
1427
  };
1579
1428
  var POLYGON = {
@@ -1601,7 +1450,11 @@ var POLYGON = {
1601
1450
  chain: chains.polygon,
1602
1451
  rpcUrl: "https://polygon-mainnet.g.alchemy.com/v2/49fUGmuW05ynCui0VEvDN",
1603
1452
  supports7702: true,
1604
- erc4337: false
1453
+ erc4337: false,
1454
+ bundlerUrl: `${BUNDLER_URL}/rpc?chain=polygon`,
1455
+ entryPointAddress: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
1456
+ factoryAddress: "0x31D1C59fcf5B78FE2a86187a53c84DcDa5B80EF6",
1457
+ paymasterAddress: "0x24C82C9381F4615f1a73a5CdBB0Ffd5a432fA54C"
1605
1458
  },
1606
1459
  crossChainInformation: {
1607
1460
  circleInformation: {
@@ -1635,95 +1488,111 @@ var POLYGON = {
1635
1488
  }
1636
1489
  }
1637
1490
  };
1638
- var AVALANCHE = {
1491
+ var ARBITRUM = {
1639
1492
  assets: [
1640
1493
  {
1641
1494
  name: "USDC",
1642
1495
  decimals: 6,
1643
- address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
1496
+ address: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
1644
1497
  coingeckoId: "usd-coin"
1645
1498
  },
1646
- {
1647
- name: "AVAX",
1648
- decimals: 18,
1649
- address: "0x0000000000000000000000000000000000000000",
1650
- coingeckoId: "avalanche-2"
1651
- },
1652
1499
  {
1653
1500
  name: "USDT",
1654
1501
  decimals: 6,
1655
- address: "0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7",
1502
+ address: "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",
1656
1503
  coingeckoId: "tether"
1504
+ },
1505
+ {
1506
+ name: "ARB",
1507
+ decimals: 18,
1508
+ address: "0x912CE59144191C1204E64559FE8253a0e49E6548",
1509
+ coingeckoId: "arbitrum"
1510
+ },
1511
+ {
1512
+ name: "ETH",
1513
+ decimals: 18,
1514
+ address: "0x0000000000000000000000000000000000000000",
1515
+ coingeckoId: "ethereum"
1657
1516
  }
1658
1517
  ],
1659
1518
  evm: {
1660
- chain: chains.avalanche,
1661
- rpcUrl: chains.avalanche.rpcUrls.default.http[0],
1662
- supports7702: false,
1663
- erc4337: false
1519
+ chain: chains.arbitrum,
1520
+ rpcUrl: "https://arb-mainnet.g.alchemy.com/v2/49fUGmuW05ynCui0VEvDN",
1521
+ bundlerUrl: `${BUNDLER_URL}/rpc?chain=arbitrum`,
1522
+ supports7702: true,
1523
+ erc4337: false,
1524
+ entryPointAddress: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
1525
+ factoryAddress: "0xEEba846e0177CD7b2F023feaa44F9B2a9183327A",
1526
+ paymasterAddress: "0x41d236E76eCEC3b90554d0b504ac2EEce93A2AE1"
1664
1527
  },
1665
1528
  crossChainInformation: {
1666
1529
  circleInformation: {
1667
1530
  supportCirclePaymaster: true,
1531
+ aproxFromFee: 0,
1668
1532
  cCTPInformation: {
1669
1533
  supportCCTP: true,
1670
- domain: 1
1671
- },
1672
- aproxFromFee: 0
1534
+ domain: 3
1535
+ }
1673
1536
  },
1674
1537
  nearIntentInformation: {
1675
1538
  support: true,
1676
1539
  assetsId: [
1677
1540
  {
1678
- assetId: "nep245:v2_1.omni.hot.tg:43114_3atVJH3r5c4GqiSYmg9fECvjc47o",
1541
+ assetId: "nep141:arb-0xaf88d065e77c8cc2239327c5edb3a432268e5831.omft.near",
1679
1542
  name: "USDC",
1680
1543
  decimals: 6
1681
1544
  },
1682
1545
  {
1683
- assetId: "nep245:v2_1.omni.hot.tg:43114_11111111111111111111",
1684
- name: "AVAX",
1546
+ assetId: "nep141:arb-0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9.omft.near",
1547
+ name: "USDT",
1548
+ decimals: 6
1549
+ },
1550
+ {
1551
+ assetId: "nep141:arb.omft.near",
1552
+ name: "ETH",
1685
1553
  decimals: 18
1686
1554
  },
1687
1555
  {
1688
- assetId: "nep245:v2_1.omni.hot.tg:43114_372BeH7ENZieCaabwkbWkBiTTgXp",
1689
- name: "USDT",
1690
- decimals: 6
1556
+ assetId: "nep141:arb-0x912ce59144191c1204e64559fe8253a0e49e6548.omft.near",
1557
+ name: "ARB",
1558
+ decimals: 18
1691
1559
  }
1692
1560
  ],
1693
1561
  needMemo: false
1694
1562
  }
1695
1563
  }
1696
1564
  };
1697
- var WORLD_CHAIN = {
1565
+ var UNICHAIN = {
1698
1566
  assets: [
1699
1567
  {
1700
1568
  name: "USDC",
1701
1569
  decimals: 6,
1702
- address: "0x79A02482A880bCe3F13E09da970dC34dB4cD24D1",
1570
+ address: "0x078D782b760474a361dDA0AF3839290b0EF57AD6",
1703
1571
  coingeckoId: "usd-coin"
1704
1572
  }
1705
1573
  ],
1706
1574
  evm: {
1707
- chain: chains.worldchain,
1708
- rpcUrl: chains.worldchain.rpcUrls.default.http[0],
1575
+ chain: chains.unichain,
1576
+ rpcUrl: "https://unichain-mainnet.g.alchemy.com/v2/49fUGmuW05ynCui0VEvDN",
1577
+ bundlerUrl: `${BUNDLER_URL}/rpc?chain=unichain`,
1709
1578
  supports7702: true,
1710
- erc4337: false
1579
+ erc4337: false,
1580
+ entryPointAddress: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
1581
+ factoryAddress: "0xB2E45aCbB68f3e98C87B6df16625f22e11728556",
1582
+ paymasterAddress: "0x7A92b3Fee017E3E181a51D9045AACE30eC2B387D"
1711
1583
  },
1712
1584
  crossChainInformation: {
1713
1585
  circleInformation: {
1714
- supportCirclePaymaster: false,
1586
+ supportCirclePaymaster: true,
1715
1587
  cCTPInformation: {
1716
1588
  supportCCTP: true,
1717
- domain: 14
1589
+ domain: 10
1718
1590
  },
1719
1591
  aproxFromFee: 0
1720
1592
  },
1721
1593
  nearIntentInformation: null
1722
1594
  }
1723
1595
  };
1724
-
1725
- // src/chains/index.ts
1726
- init_Stellar();
1727
1596
  var Monad = {
1728
1597
  assets: [
1729
1598
  {
@@ -1749,7 +1618,11 @@ var Monad = {
1749
1618
  chain: chains.monad,
1750
1619
  rpcUrl: chains.monad.rpcUrls.default.http[0],
1751
1620
  supports7702: true,
1752
- erc4337: false
1621
+ erc4337: false,
1622
+ bundlerUrl: `${BUNDLER_URL}/rpc?chain=monad`,
1623
+ entryPointAddress: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
1624
+ factoryAddress: "0xaaeA6D8f377e62599Aad75376F0C5e4F7EBF8f84",
1625
+ paymasterAddress: "0xeA82B63e8dE3BFBd321A681D4511BC596E323162"
1753
1626
  },
1754
1627
  crossChainInformation: {
1755
1628
  circleInformation: {
@@ -1783,69 +1656,236 @@ var Monad = {
1783
1656
  }
1784
1657
  }
1785
1658
  };
1786
- var BNB = {
1659
+
1660
+ // src/chains.ts
1661
+ init_Stellar();
1662
+ function mapToSDKConfig(data) {
1663
+ if (data.nonEvm) {
1664
+ return {
1665
+ chain: { id: 9e3, name: "Stellar" },
1666
+ // Custom ID for Stellar
1667
+ tokens: data.assets.map((a) => ({
1668
+ symbol: a.name,
1669
+ decimals: a.decimals,
1670
+ address: a.address
1671
+ }))
1672
+ };
1673
+ }
1674
+ if (!data.evm) throw new Error("Non-EVM config used in EVM SDK");
1675
+ return {
1676
+ chain: data.evm.chain,
1677
+ rpcUrl: data.evm.rpcUrl || void 0,
1678
+ bundlerUrl: data.evm.bundlerUrl,
1679
+ entryPointAddress: data.evm.entryPointAddress,
1680
+ factoryAddress: data.evm.factoryAddress,
1681
+ paymasterAddress: data.evm.paymasterAddress,
1682
+ tokens: data.assets.map((a) => ({
1683
+ symbol: a.name,
1684
+ decimals: a.decimals,
1685
+ address: a.address
1686
+ }))
1687
+ };
1688
+ }
1689
+ var BASE_MAINNET = mapToSDKConfig(BASE);
1690
+ var OPTIMISM_MAINNET = mapToSDKConfig(OPTIMISM);
1691
+ var GNOSIS_MAINNET = mapToSDKConfig(GNOSIS);
1692
+ var BASE_SEPOLIA2 = mapToSDKConfig(BASE_SEPOLIA);
1693
+ var AVALANCHE_MAINNET = mapToSDKConfig(AVALANCHE);
1694
+ var BSC_MAINNET = mapToSDKConfig(BNB);
1695
+ var POLYGON_MAINNET = mapToSDKConfig(POLYGON);
1696
+ var ARBITRUM_MAINNET = mapToSDKConfig(ARBITRUM);
1697
+ var UNICHAIN_MAINNET = mapToSDKConfig(UNICHAIN);
1698
+ var MONAD_MAINNET = mapToSDKConfig(Monad);
1699
+ var STELLAR_MAINNET = mapToSDKConfig(exports.STELLAR);
1700
+ var CHAIN_CONFIGS = {
1701
+ [chains.base.id]: BASE_MAINNET,
1702
+ [chains.baseSepolia.id]: BASE_SEPOLIA2,
1703
+ [chains.gnosis.id]: GNOSIS_MAINNET,
1704
+ [chains.optimism.id]: OPTIMISM_MAINNET,
1705
+ [chains.avalanche.id]: AVALANCHE_MAINNET,
1706
+ [chains.bsc.id]: BSC_MAINNET,
1707
+ [chains.polygon.id]: POLYGON_MAINNET,
1708
+ [chains.arbitrum.id]: ARBITRUM_MAINNET,
1709
+ [chains.unichain.id]: UNICHAIN_MAINNET,
1710
+ [chains.monad.id]: MONAD_MAINNET,
1711
+ 9e3: STELLAR_MAINNET
1712
+ };
1713
+ var CHAIN_ID_TO_KEY = {
1714
+ [chains.base.id]: "Base",
1715
+ [chains.baseSepolia.id]: "Base",
1716
+ [chains.gnosis.id]: "Gnosis",
1717
+ [chains.optimism.id]: "Optimism",
1718
+ [chains.optimismSepolia.id]: "Optimism",
1719
+ [chains.arbitrum.id]: "Arbitrum",
1720
+ [chains.polygon.id]: "Polygon",
1721
+ [chains.bsc.id]: "Binance",
1722
+ [chains.avalanche.id]: "Avalanche",
1723
+ [chains.unichain.id]: "Unichain",
1724
+ [chains.monad.id]: "Monad",
1725
+ "9000": "Stellar"
1726
+ };
1727
+
1728
+ // src/index.ts
1729
+ init_StellarService();
1730
+ init_Stellar();
1731
+
1732
+ // src/services/cctp.ts
1733
+ init_facilitator();
1734
+ init_facilitator();
1735
+
1736
+ // src/constants/abis.ts
1737
+ var usdcErc3009Abi = [
1738
+ {
1739
+ inputs: [
1740
+ { name: "from", type: "address" },
1741
+ { name: "to", type: "address" },
1742
+ { name: "value", type: "uint256" },
1743
+ { name: "validAfter", type: "uint256" },
1744
+ { name: "validBefore", type: "uint256" },
1745
+ { name: "nonce", type: "bytes32" },
1746
+ { name: "v", type: "uint8" },
1747
+ { name: "r", type: "bytes32" },
1748
+ { name: "s", type: "bytes32" }
1749
+ ],
1750
+ name: "transferWithAuthorization",
1751
+ outputs: [],
1752
+ stateMutability: "nonpayable",
1753
+ type: "function"
1754
+ },
1755
+ {
1756
+ inputs: [{ name: "account", type: "address" }],
1757
+ name: "balanceOf",
1758
+ outputs: [{ name: "", type: "uint256" }],
1759
+ stateMutability: "view",
1760
+ type: "function"
1761
+ },
1762
+ {
1763
+ inputs: [
1764
+ { name: "spender", type: "address" },
1765
+ { name: "amount", type: "uint256" }
1766
+ ],
1767
+ name: "approve",
1768
+ outputs: [{ name: "", type: "bool" }],
1769
+ stateMutability: "nonpayable",
1770
+ type: "function"
1771
+ },
1772
+ {
1773
+ inputs: [
1774
+ { name: "to", type: "address" },
1775
+ { name: "amount", type: "uint256" }
1776
+ ],
1777
+ name: "transfer",
1778
+ outputs: [{ name: "", type: "bool" }],
1779
+ stateMutability: "nonpayable",
1780
+ type: "function"
1781
+ }
1782
+ ];
1783
+ var tokenMessengerAbi = [
1784
+ {
1785
+ inputs: [
1786
+ { name: "amount", type: "uint256" },
1787
+ { name: "destinationDomain", type: "uint32" },
1788
+ { name: "mintRecipient", type: "bytes32" },
1789
+ { name: "burnToken", type: "address" },
1790
+ { name: "destinationCaller", type: "bytes32" },
1791
+ { name: "maxFee", type: "uint256" },
1792
+ // Suspected wrapper arg
1793
+ { name: "minFinalityThreshold", type: "uint32" }
1794
+ // Suspected wrapper arg
1795
+ ],
1796
+ name: "depositForBurn",
1797
+ outputs: [{ name: "_nonce", type: "uint64" }],
1798
+ stateMutability: "nonpayable",
1799
+ type: "function"
1800
+ },
1801
+ // Alternative overload often used:
1802
+ {
1803
+ inputs: [
1804
+ { name: "amount", type: "uint256" },
1805
+ { name: "destinationDomain", type: "uint32" },
1806
+ { name: "mintRecipient", type: "bytes32" },
1807
+ { name: "burnToken", type: "address" }
1808
+ ],
1809
+ name: "depositForBurn",
1810
+ outputs: [{ name: "_nonce", type: "uint64" }],
1811
+ stateMutability: "nonpayable",
1812
+ type: "function"
1813
+ }
1814
+ ];
1815
+ var messageTransmitterAbi = [
1816
+ {
1817
+ inputs: [
1818
+ { name: "message", type: "bytes" },
1819
+ { name: "attestation", type: "bytes" }
1820
+ ],
1821
+ name: "receiveMessage",
1822
+ outputs: [{ name: "success", type: "bool" }],
1823
+ stateMutability: "nonpayable",
1824
+ type: "function"
1825
+ }
1826
+ ];
1827
+ var createRetrieveAttestation = async (transactionHash, chainId, timeout = 6e4) => {
1828
+ const baseUrl = "https://iris-api.circle.com";
1829
+ const url = `${baseUrl}/v2/messages/${chainId}?transactionHash=${transactionHash}`;
1830
+ const start = Date.now();
1831
+ const FIVE_SECONDS = 5e3;
1832
+ while (true) {
1833
+ const elapsed = Date.now() - start;
1834
+ if (elapsed > timeout) {
1835
+ throw new Error(
1836
+ "Timeout: Attestation not retrieved within the expected time."
1837
+ );
1838
+ }
1839
+ try {
1840
+ const response = await axios__default.default.get(url);
1841
+ const message = response.data?.messages?.[0];
1842
+ if (message?.status === "complete") {
1843
+ console.log("Attestation retrieved successfully!");
1844
+ return message;
1845
+ }
1846
+ console.log("Waiting for attestation...");
1847
+ } catch (error) {
1848
+ const status = error.response?.status;
1849
+ if (status === 404) {
1850
+ console.log("Waiting for attestation...");
1851
+ } else {
1852
+ console.error("Error fetching attestation:", error.message);
1853
+ }
1854
+ }
1855
+ await new Promise((resolve) => setTimeout(resolve, FIVE_SECONDS));
1856
+ }
1857
+ };
1858
+ var WORLD_CHAIN = {
1787
1859
  assets: [
1788
1860
  {
1789
1861
  name: "USDC",
1790
- decimals: 18,
1791
- address: "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",
1792
- // BSC Mainnet USDC
1862
+ decimals: 6,
1863
+ address: "0x79A02482A880bCe3F13E09da970dC34dB4cD24D1",
1793
1864
  coingeckoId: "usd-coin"
1794
- },
1795
- {
1796
- name: "USDT",
1797
- decimals: 18,
1798
- address: "0x55d398326f99059fF775485246999027B3197955",
1799
- // BSC Mainnet USDT
1800
- coingeckoId: "tether"
1801
- },
1802
- {
1803
- name: "BNB",
1804
- decimals: 18,
1805
- address: "0x0000000000000000000000000000000000000000",
1806
- // Native
1807
- coingeckoId: "binancecoin"
1808
1865
  }
1809
1866
  ],
1810
1867
  evm: {
1811
- chain: chains.bsc,
1812
- rpcUrl: "https://bsc-dataseed.binance.org",
1868
+ chain: chains.worldchain,
1869
+ rpcUrl: chains.worldchain.rpcUrls.default.http[0],
1813
1870
  supports7702: true,
1814
1871
  erc4337: false
1815
1872
  },
1816
1873
  crossChainInformation: {
1817
1874
  circleInformation: {
1818
1875
  supportCirclePaymaster: false,
1819
- aproxFromFee: 0,
1820
1876
  cCTPInformation: {
1821
- supportCCTP: false,
1822
- domain: 0
1823
- }
1877
+ supportCCTP: true,
1878
+ domain: 14
1879
+ },
1880
+ aproxFromFee: 0
1824
1881
  },
1825
- nearIntentInformation: {
1826
- support: true,
1827
- needMemo: false,
1828
- assetsId: [
1829
- {
1830
- name: "USDC",
1831
- assetId: "nep245:v2_1.omni.hot.tg:56_2w93GqMcEmQFDru84j3HZZWt557r",
1832
- decimals: 18
1833
- },
1834
- {
1835
- name: "USDT",
1836
- assetId: "nep245:v2_1.omni.hot.tg:56_2CMMyVTGZkeyNZTSvS5sarzfir6g",
1837
- decimals: 18
1838
- },
1839
- {
1840
- name: "BNB",
1841
- assetId: "nep245:v2_1.omni.hot.tg:56_11111111111111111111",
1842
- decimals: 18
1843
- }
1844
- ]
1845
- }
1882
+ nearIntentInformation: null
1846
1883
  }
1847
1884
  };
1848
1885
 
1886
+ // src/chains/index.ts
1887
+ init_Stellar();
1888
+
1849
1889
  // src/constants/chainsInformation.ts
1850
1890
  var NETWORKS = {
1851
1891
  Optimism: OPTIMISM,