@circle-fin/bridge-kit 1.6.0 → 1.6.1

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/chains.mjs CHANGED
@@ -93,6 +93,122 @@ var Blockchain;
93
93
  Blockchain["ZKSync_Era"] = "ZKSync_Era";
94
94
  Blockchain["ZKSync_Sepolia"] = "ZKSync_Sepolia";
95
95
  })(Blockchain || (Blockchain = {}));
96
+ /**
97
+ * Enum representing the subset of {@link Blockchain} that supports swap operations.
98
+ *
99
+ * This enum provides compile-time type safety for swap chain selection,
100
+ * ensuring only supported chains are available in IDE autocomplete
101
+ * when building swap parameters.
102
+ *
103
+ * @remarks
104
+ * Unlike the full {@link Blockchain} enum, SwapChain only includes networks
105
+ * where the swap functionality is actively supported by the library.
106
+ * Using this enum prevents runtime errors from attempting unsupported
107
+ * cross-chain swaps.
108
+ *
109
+ * Currently supports:
110
+ * - Ethereum mainnet
111
+ * - Base mainnet
112
+ * - Polygon mainnet
113
+ * - Solana mainnet
114
+ *
115
+ * @example
116
+ * ```typescript
117
+ * import { SwapChain, swap, createSwapKitContext } from '@circle-fin/swap-kit'
118
+ * import { createViemAdapterFromPrivateKey } from '@circle-fin/adapter-viem-v2'
119
+ *
120
+ * const context = createSwapKitContext()
121
+ * const adapter = createViemAdapterFromPrivateKey({
122
+ * privateKey: process.env.PRIVATE_KEY
123
+ * })
124
+ *
125
+ * // ✅ Autocomplete shows only swap-supported chains
126
+ * const result = await swap(context, {
127
+ * from: {
128
+ * adapter,
129
+ * chain: SwapChain.Ethereum // Autocomplete: Ethereum, Base, Polygon, Solana
130
+ * },
131
+ * tokenIn: 'USDC',
132
+ * tokenOut: 'USDT',
133
+ * amount: '100.0'
134
+ * })
135
+ * ```
136
+ *
137
+ * @example
138
+ * ```typescript
139
+ * // String literals also work (constrained to SwapChain values)
140
+ * const result = await swap(context, {
141
+ * from: {
142
+ * adapter,
143
+ * chain: 'Ethereum' // ✅ Only SwapChain strings allowed
144
+ * },
145
+ * tokenIn: 'USDC',
146
+ * tokenOut: 'NATIVE',
147
+ * amount: '50.0'
148
+ * })
149
+ *
150
+ * // ❌ TypeScript error - Sui not in SwapChain enum
151
+ * const invalidResult = await swap(context, {
152
+ * from: {
153
+ * adapter,
154
+ * chain: 'Sui' // Compile-time error!
155
+ * },
156
+ * tokenIn: 'USDC',
157
+ * tokenOut: 'USDT',
158
+ * amount: '100.0'
159
+ * })
160
+ * ```
161
+ */
162
+ /**
163
+ * Enum representing chains that support same-chain swaps through the Swap Kit.
164
+ *
165
+ * Unlike the full {@link Blockchain} enum, SwapChain includes only mainnet
166
+ * networks where adapter contracts are deployed (CCTPv2 support).
167
+ *
168
+ * Dynamic validation via {@link isSwapSupportedChain} ensures chains
169
+ * automatically work when adapter contracts and supported tokens are deployed.
170
+ *
171
+ * @example
172
+ * ```typescript
173
+ * import { SwapChain } from '@core/chains'
174
+ * import { swap } from '@circle-fin/swap-kit'
175
+ *
176
+ * const result = await swap(context, {
177
+ * from: {
178
+ * adapter,
179
+ * chain: SwapChain.Arbitrum // Now supported!
180
+ * },
181
+ * tokenIn: 'USDC',
182
+ * tokenOut: 'WETH',
183
+ * amount: '100.0'
184
+ * })
185
+ * ```
186
+ *
187
+ * @see {@link isSwapSupportedChain} for runtime validation
188
+ * @see {@link getSwapSupportedChains} for all supported chains
189
+ */
190
+ var SwapChain;
191
+ (function (SwapChain) {
192
+ // Original 4 chains
193
+ SwapChain["Ethereum"] = "Ethereum";
194
+ SwapChain["Base"] = "Base";
195
+ SwapChain["Polygon"] = "Polygon";
196
+ SwapChain["Solana"] = "Solana";
197
+ // Additional supported chains
198
+ SwapChain["Arbitrum"] = "Arbitrum";
199
+ SwapChain["Optimism"] = "Optimism";
200
+ SwapChain["Avalanche"] = "Avalanche";
201
+ SwapChain["Linea"] = "Linea";
202
+ SwapChain["Ink"] = "Ink";
203
+ SwapChain["World_Chain"] = "World_Chain";
204
+ SwapChain["Unichain"] = "Unichain";
205
+ SwapChain["Plume"] = "Plume";
206
+ SwapChain["Sei"] = "Sei";
207
+ SwapChain["Sonic"] = "Sonic";
208
+ SwapChain["XDC"] = "XDC";
209
+ SwapChain["HyperEVM"] = "HyperEVM";
210
+ SwapChain["Monad"] = "Monad";
211
+ })(SwapChain || (SwapChain = {}));
96
212
  // -----------------------------------------------------------------------------
97
213
  // Bridge Chain Enum (CCTPv2 Supported Chains)
98
214
  // -----------------------------------------------------------------------------
@@ -244,6 +360,7 @@ defineChain({
244
360
  rpcEndpoints: ['https://mainnet-api.algonode.cloud'],
245
361
  eurcAddress: null,
246
362
  usdcAddress: '31566704',
363
+ usdtAddress: null,
247
364
  cctp: null,
248
365
  });
249
366
 
@@ -267,6 +384,7 @@ defineChain({
267
384
  rpcEndpoints: ['https://testnet-api.algonode.cloud'],
268
385
  eurcAddress: null,
269
386
  usdcAddress: '10458941',
387
+ usdtAddress: null,
270
388
  cctp: null,
271
389
  });
272
390
 
@@ -290,6 +408,7 @@ defineChain({
290
408
  rpcEndpoints: ['https://fullnode.mainnet.aptoslabs.com/v1'],
291
409
  eurcAddress: null,
292
410
  usdcAddress: '0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b',
411
+ usdtAddress: '0x357b0b74bc833e95a115ad22604854d6b0fca151cecd94111770e5d6ffc9dc2b',
293
412
  cctp: {
294
413
  domain: 9,
295
414
  contracts: {
@@ -327,6 +446,7 @@ defineChain({
327
446
  rpcEndpoints: ['https://fullnode.testnet.aptoslabs.com/v1'],
328
447
  eurcAddress: null,
329
448
  usdcAddress: '0x69091fbab5f7d635ee7ac5098cf0c1efbe31d68fec0f2cd565e8d168daf52832',
449
+ usdtAddress: null,
330
450
  cctp: {
331
451
  domain: 9,
332
452
  contracts: {
@@ -344,6 +464,121 @@ defineChain({
344
464
  },
345
465
  });
346
466
 
467
+ /**
468
+ * Complete swap token registry - single source of truth for all swap-supported tokens.
469
+ *
470
+ * @remarks
471
+ * All packages should import from this registry for swap operations.
472
+ * Adding a new swap token requires updating only this registry.
473
+ *
474
+ * The NATIVE token is handled separately as it resolves dynamically based on chain.
475
+ *
476
+ * @example
477
+ * ```typescript
478
+ * import { SWAP_TOKEN_REGISTRY } from '@core/chains'
479
+ *
480
+ * // Get token decimals
481
+ * const decimals = SWAP_TOKEN_REGISTRY.USDC.decimals // 6
482
+ *
483
+ * // Check if token is stablecoin
484
+ * const isStable = SWAP_TOKEN_REGISTRY.DAI.category === 'stablecoin' // true
485
+ * ```
486
+ */
487
+ const SWAP_TOKEN_REGISTRY = {
488
+ // ============================================================================
489
+ // Stablecoins (6 decimals)
490
+ // ============================================================================
491
+ USDC: {
492
+ symbol: 'USDC',
493
+ decimals: 6,
494
+ category: 'stablecoin',
495
+ description: 'USD Coin',
496
+ },
497
+ EURC: {
498
+ symbol: 'EURC',
499
+ decimals: 6,
500
+ category: 'stablecoin',
501
+ description: 'Euro Coin',
502
+ },
503
+ USDT: {
504
+ symbol: 'USDT',
505
+ decimals: 6,
506
+ category: 'stablecoin',
507
+ description: 'Tether USD',
508
+ },
509
+ PYUSD: {
510
+ symbol: 'PYUSD',
511
+ decimals: 6,
512
+ category: 'stablecoin',
513
+ description: 'PayPal USD',
514
+ },
515
+ // ============================================================================
516
+ // Stablecoins (18 decimals)
517
+ // ============================================================================
518
+ DAI: {
519
+ symbol: 'DAI',
520
+ decimals: 18,
521
+ category: 'stablecoin',
522
+ description: 'MakerDAO stablecoin',
523
+ },
524
+ USDE: {
525
+ symbol: 'USDE',
526
+ decimals: 18,
527
+ category: 'stablecoin',
528
+ description: 'Ethena USD (synthetic dollar)',
529
+ },
530
+ // ============================================================================
531
+ // Wrapped Tokens
532
+ // ============================================================================
533
+ WBTC: {
534
+ symbol: 'WBTC',
535
+ decimals: 8,
536
+ category: 'wrapped',
537
+ description: 'Wrapped Bitcoin',
538
+ },
539
+ WETH: {
540
+ symbol: 'WETH',
541
+ decimals: 18,
542
+ category: 'wrapped',
543
+ description: 'Wrapped Ethereum',
544
+ },
545
+ WSOL: {
546
+ symbol: 'WSOL',
547
+ decimals: 9,
548
+ category: 'wrapped',
549
+ description: 'Wrapped Solana',
550
+ },
551
+ WAVAX: {
552
+ symbol: 'WAVAX',
553
+ decimals: 18,
554
+ category: 'wrapped',
555
+ description: 'Wrapped Avalanche',
556
+ },
557
+ WPOL: {
558
+ symbol: 'WPOL',
559
+ decimals: 18,
560
+ category: 'wrapped',
561
+ description: 'Wrapped Polygon',
562
+ },
563
+ };
564
+ /**
565
+ * Special NATIVE token constant for swap operations.
566
+ *
567
+ * @remarks
568
+ * NATIVE is handled separately from SWAP_TOKEN_REGISTRY because it resolves
569
+ * dynamically based on the chain (ETH on Ethereum, SOL on Solana, etc.).
570
+ * Its decimals are chain-specific.
571
+ */
572
+ const NATIVE_TOKEN = 'NATIVE';
573
+ /**
574
+ * Array of all supported swap token symbols including NATIVE.
575
+ * Useful for iteration, validation, and filtering.
576
+ */
577
+ [
578
+ ...Object.keys(SWAP_TOKEN_REGISTRY),
579
+ NATIVE_TOKEN,
580
+ ];
581
+
347
582
  /**
348
583
  * The bridge contract address for EVM testnet networks.
349
584
  *
@@ -360,6 +595,13 @@ const BRIDGE_CONTRACT_EVM_TESTNET = '0xC5567a5E3370d4DBfB0540025078e283e36A363d'
360
595
  * USDC transfers on live networks.
361
596
  */
362
597
  const BRIDGE_CONTRACT_EVM_MAINNET = '0xB3FA262d0fB521cc93bE83d87b322b8A23DAf3F0';
598
+ /**
599
+ * The adapter contract address for EVM mainnet networks.
600
+ *
601
+ * This contract serves as an adapter for integrating with various protocols
602
+ * on EVM-compatible chains. Use this address for mainnet adapter integrations.
603
+ */
604
+ const ADAPTER_CONTRACT_EVM_MAINNET = '0x7FB8c7260b63934d8da38aF902f87ae6e284a845';
363
605
 
364
606
  /**
365
607
  * Arc Testnet chain definition
@@ -389,6 +631,7 @@ const ArcTestnet = defineChain({
389
631
  rpcEndpoints: ['https://rpc.testnet.arc.network/'],
390
632
  eurcAddress: '0x89B50855Aa3bE2F677cD6303Cec089B5F319D72a',
391
633
  usdcAddress: '0x3600000000000000000000000000000000000000',
634
+ usdtAddress: null,
392
635
  cctp: {
393
636
  domain: 26,
394
637
  contracts: {
@@ -431,6 +674,7 @@ const Arbitrum = defineChain({
431
674
  rpcEndpoints: ['https://arb1.arbitrum.io/rpc'],
432
675
  eurcAddress: null,
433
676
  usdcAddress: '0xaf88d065e77c8cc2239327c5edb3a432268e5831',
677
+ usdtAddress: null,
434
678
  cctp: {
435
679
  domain: 3,
436
680
  contracts: {
@@ -455,6 +699,7 @@ const Arbitrum = defineChain({
455
699
  },
456
700
  kitContracts: {
457
701
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
702
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
458
703
  },
459
704
  });
460
705
 
@@ -479,6 +724,7 @@ const ArbitrumSepolia = defineChain({
479
724
  rpcEndpoints: ['https://sepolia-rollup.arbitrum.io/rpc'],
480
725
  eurcAddress: null,
481
726
  usdcAddress: '0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d',
727
+ usdtAddress: null,
482
728
  cctp: {
483
729
  domain: 3,
484
730
  contracts: {
@@ -527,6 +773,7 @@ const Avalanche = defineChain({
527
773
  rpcEndpoints: ['https://api.avax.network/ext/bc/C/rpc'],
528
774
  eurcAddress: '0xc891eb4cbdeff6e073e859e987815ed1505c2acd',
529
775
  usdcAddress: '0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E',
776
+ usdtAddress: '0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7',
530
777
  cctp: {
531
778
  domain: 1,
532
779
  contracts: {
@@ -551,6 +798,7 @@ const Avalanche = defineChain({
551
798
  },
552
799
  kitContracts: {
553
800
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
801
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
554
802
  },
555
803
  });
556
804
 
@@ -574,6 +822,7 @@ const AvalancheFuji = defineChain({
574
822
  explorerUrl: 'https://subnets-test.avax.network/c-chain/tx/{hash}',
575
823
  eurcAddress: '0x5e44db7996c682e92a960b65ac713a54ad815c6b',
576
824
  usdcAddress: '0x5425890298aed601595a70ab815c96711a31bc65',
825
+ usdtAddress: null,
577
826
  cctp: {
578
827
  domain: 1,
579
828
  contracts: {
@@ -623,6 +872,7 @@ const Base = defineChain({
623
872
  rpcEndpoints: ['https://mainnet.base.org', 'https://base.publicnode.com'],
624
873
  eurcAddress: '0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42',
625
874
  usdcAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
875
+ usdtAddress: null,
626
876
  cctp: {
627
877
  domain: 6,
628
878
  contracts: {
@@ -647,6 +897,7 @@ const Base = defineChain({
647
897
  },
648
898
  kitContracts: {
649
899
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
900
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
650
901
  },
651
902
  });
652
903
 
@@ -671,6 +922,7 @@ const BaseSepolia = defineChain({
671
922
  rpcEndpoints: ['https://sepolia.base.org'],
672
923
  eurcAddress: '0x808456652fdb597867f38412077A9182bf77359F',
673
924
  usdcAddress: '0x036CbD53842c5426634e7929541eC2318f3dCF7e',
925
+ usdtAddress: null,
674
926
  cctp: {
675
927
  domain: 6,
676
928
  contracts: {
@@ -719,6 +971,7 @@ defineChain({
719
971
  rpcEndpoints: ['https://forno.celo.org'],
720
972
  eurcAddress: null,
721
973
  usdcAddress: '0xcebA9300f2b948710d2653dD7B07f33A8B32118C',
974
+ usdtAddress: '0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e',
722
975
  cctp: null,
723
976
  });
724
977
 
@@ -743,6 +996,7 @@ defineChain({
743
996
  rpcEndpoints: ['https://alfajores-forno.celo-testnet.org'],
744
997
  eurcAddress: null,
745
998
  usdcAddress: '0x2F25deB3848C207fc8E0c34035B3Ba7fC157602B',
999
+ usdtAddress: null,
746
1000
  cctp: null,
747
1001
  });
748
1002
 
@@ -767,6 +1021,7 @@ const Codex = defineChain({
767
1021
  rpcEndpoints: ['https://rpc.codex.xyz'],
768
1022
  eurcAddress: null,
769
1023
  usdcAddress: '0xd996633a415985DBd7D6D12f4A4343E31f5037cf',
1024
+ usdtAddress: null,
770
1025
  cctp: {
771
1026
  domain: 12,
772
1027
  contracts: {
@@ -809,6 +1064,7 @@ const CodexTestnet = defineChain({
809
1064
  rpcEndpoints: ['https://rpc.codex-stg.xyz'],
810
1065
  eurcAddress: null,
811
1066
  usdcAddress: '0x6d7f141b6819C2c9CC2f818e6ad549E7Ca090F8f',
1067
+ usdtAddress: null,
812
1068
  cctp: {
813
1069
  domain: 12,
814
1070
  contracts: {
@@ -851,6 +1107,7 @@ const Ethereum = defineChain({
851
1107
  rpcEndpoints: ['https://eth.merkle.io', 'https://ethereum.publicnode.com'],
852
1108
  eurcAddress: '0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c',
853
1109
  usdcAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
1110
+ usdtAddress: '0xdac17f958d2ee523a2206206994597c13d831ec7',
854
1111
  cctp: {
855
1112
  domain: 0,
856
1113
  contracts: {
@@ -875,6 +1132,7 @@ const Ethereum = defineChain({
875
1132
  },
876
1133
  kitContracts: {
877
1134
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1135
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
878
1136
  },
879
1137
  });
880
1138
 
@@ -899,6 +1157,7 @@ const EthereumSepolia = defineChain({
899
1157
  rpcEndpoints: ['https://sepolia.drpc.org'],
900
1158
  eurcAddress: '0x08210F9170F89Ab7658F0B5E3fF39b0E03C594D4',
901
1159
  usdcAddress: '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238',
1160
+ usdtAddress: null,
902
1161
  cctp: {
903
1162
  domain: 0,
904
1163
  contracts: {
@@ -946,6 +1205,7 @@ defineChain({
946
1205
  rpcEndpoints: ['https://mainnet.hashio.io/api'],
947
1206
  eurcAddress: null,
948
1207
  usdcAddress: '0.0.456858',
1208
+ usdtAddress: null,
949
1209
  cctp: null,
950
1210
  });
951
1211
 
@@ -969,6 +1229,7 @@ defineChain({
969
1229
  rpcEndpoints: ['https://testnet.hashio.io/api'],
970
1230
  eurcAddress: null,
971
1231
  usdcAddress: '0.0.429274',
1232
+ usdtAddress: null,
972
1233
  cctp: null,
973
1234
  });
974
1235
 
@@ -995,6 +1256,7 @@ const HyperEVM = defineChain({
995
1256
  rpcEndpoints: ['https://rpc.hyperliquid.xyz/evm'],
996
1257
  eurcAddress: null,
997
1258
  usdcAddress: '0xb88339CB7199b77E23DB6E890353E22632Ba630f',
1259
+ usdtAddress: null,
998
1260
  cctp: {
999
1261
  domain: 19,
1000
1262
  contracts: {
@@ -1013,6 +1275,7 @@ const HyperEVM = defineChain({
1013
1275
  },
1014
1276
  kitContracts: {
1015
1277
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1278
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1016
1279
  },
1017
1280
  });
1018
1281
 
@@ -1038,6 +1301,7 @@ const HyperEVMTestnet = defineChain({
1038
1301
  rpcEndpoints: ['https://rpc.hyperliquid-testnet.xyz/evm'],
1039
1302
  eurcAddress: null,
1040
1303
  usdcAddress: '0x2B3370eE501B4a559b57D449569354196457D8Ab',
1304
+ usdtAddress: null,
1041
1305
  cctp: {
1042
1306
  domain: 19,
1043
1307
  contracts: {
@@ -1085,6 +1349,7 @@ const Ink = defineChain({
1085
1349
  ],
1086
1350
  eurcAddress: null,
1087
1351
  usdcAddress: '0x2D270e6886d130D724215A266106e6832161EAEd',
1352
+ usdtAddress: null,
1088
1353
  cctp: {
1089
1354
  domain: 21,
1090
1355
  contracts: {
@@ -1103,6 +1368,7 @@ const Ink = defineChain({
1103
1368
  },
1104
1369
  kitContracts: {
1105
1370
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1371
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1106
1372
  },
1107
1373
  });
1108
1374
 
@@ -1131,6 +1397,7 @@ const InkTestnet = defineChain({
1131
1397
  ],
1132
1398
  eurcAddress: null,
1133
1399
  usdcAddress: '0xFabab97dCE620294D2B0b0e46C68964e326300Ac',
1400
+ usdtAddress: null,
1134
1401
  cctp: {
1135
1402
  domain: 21,
1136
1403
  contracts: {
@@ -1173,6 +1440,7 @@ const Linea = defineChain({
1173
1440
  rpcEndpoints: ['https://rpc.linea.build'],
1174
1441
  eurcAddress: null,
1175
1442
  usdcAddress: '0x176211869ca2b568f2a7d4ee941e073a821ee1ff',
1443
+ usdtAddress: null,
1176
1444
  cctp: {
1177
1445
  domain: 11,
1178
1446
  contracts: {
@@ -1191,6 +1459,7 @@ const Linea = defineChain({
1191
1459
  },
1192
1460
  kitContracts: {
1193
1461
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1462
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1194
1463
  },
1195
1464
  });
1196
1465
 
@@ -1215,6 +1484,7 @@ const LineaSepolia = defineChain({
1215
1484
  rpcEndpoints: ['https://rpc.sepolia.linea.build'],
1216
1485
  eurcAddress: null,
1217
1486
  usdcAddress: '0xfece4462d57bd51a6a552365a011b95f0e16d9b7',
1487
+ usdtAddress: null,
1218
1488
  cctp: {
1219
1489
  domain: 11,
1220
1490
  contracts: {
@@ -1259,6 +1529,7 @@ const Monad = defineChain({
1259
1529
  rpcEndpoints: ['https://rpc.monad.xyz'],
1260
1530
  eurcAddress: null,
1261
1531
  usdcAddress: '0x754704Bc059F8C67012fEd69BC8A327a5aafb603',
1532
+ usdtAddress: null,
1262
1533
  cctp: {
1263
1534
  domain: 15,
1264
1535
  contracts: {
@@ -1277,6 +1548,7 @@ const Monad = defineChain({
1277
1548
  },
1278
1549
  kitContracts: {
1279
1550
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1551
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1280
1552
  },
1281
1553
  });
1282
1554
 
@@ -1303,6 +1575,7 @@ const MonadTestnet = defineChain({
1303
1575
  rpcEndpoints: ['https://testnet-rpc.monad.xyz'],
1304
1576
  eurcAddress: null,
1305
1577
  usdcAddress: '0x534b2f3A21130d7a60830c2Df862319e593943A3',
1578
+ usdtAddress: null,
1306
1579
  cctp: {
1307
1580
  domain: 15,
1308
1581
  contracts: {
@@ -1344,6 +1617,7 @@ defineChain({
1344
1617
  rpcEndpoints: ['https://eth-rpc.mainnet.near.org'],
1345
1618
  eurcAddress: null,
1346
1619
  usdcAddress: '17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1',
1620
+ usdtAddress: 'usdt.tether-token.near',
1347
1621
  cctp: null,
1348
1622
  });
1349
1623
 
@@ -1367,6 +1641,7 @@ defineChain({
1367
1641
  rpcEndpoints: ['https://eth-rpc.testnet.near.org'],
1368
1642
  eurcAddress: null,
1369
1643
  usdcAddress: '3e2210e1184b45b64c8a434c0a7e7b23cc04ea7eb7a6c3c32520d03d4afcb8af',
1644
+ usdtAddress: null,
1370
1645
  cctp: null,
1371
1646
  });
1372
1647
 
@@ -1390,6 +1665,7 @@ defineChain({
1390
1665
  rpcEndpoints: ['https://noble-rpc.polkachu.com'],
1391
1666
  eurcAddress: null,
1392
1667
  usdcAddress: 'uusdc',
1668
+ usdtAddress: null,
1393
1669
  cctp: {
1394
1670
  domain: 4,
1395
1671
  contracts: {
@@ -1426,6 +1702,7 @@ defineChain({
1426
1702
  rpcEndpoints: ['https://noble-testnet-rpc.polkachu.com'],
1427
1703
  eurcAddress: null,
1428
1704
  usdcAddress: 'uusdc',
1705
+ usdtAddress: null,
1429
1706
  cctp: {
1430
1707
  domain: 4,
1431
1708
  contracts: {
@@ -1463,6 +1740,7 @@ const Optimism = defineChain({
1463
1740
  rpcEndpoints: ['https://mainnet.optimism.io'],
1464
1741
  eurcAddress: null,
1465
1742
  usdcAddress: '0x0b2c639c533813f4aa9d7837caf62653d097ff85',
1743
+ usdtAddress: null,
1466
1744
  cctp: {
1467
1745
  domain: 2,
1468
1746
  contracts: {
@@ -1487,6 +1765,7 @@ const Optimism = defineChain({
1487
1765
  },
1488
1766
  kitContracts: {
1489
1767
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1768
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1490
1769
  },
1491
1770
  });
1492
1771
 
@@ -1511,6 +1790,7 @@ const OptimismSepolia = defineChain({
1511
1790
  rpcEndpoints: ['https://sepolia.optimism.io'],
1512
1791
  eurcAddress: null,
1513
1792
  usdcAddress: '0x5fd84259d66Cd46123540766Be93DFE6D43130D7',
1793
+ usdtAddress: null,
1514
1794
  cctp: {
1515
1795
  domain: 2,
1516
1796
  contracts: {
@@ -1561,6 +1841,7 @@ const Plume = defineChain({
1561
1841
  rpcEndpoints: ['https://rpc.plume.org'],
1562
1842
  eurcAddress: null,
1563
1843
  usdcAddress: '0x222365EF19F7947e5484218551B56bb3965Aa7aF',
1844
+ usdtAddress: null,
1564
1845
  cctp: {
1565
1846
  domain: 22,
1566
1847
  contracts: {
@@ -1579,6 +1860,7 @@ const Plume = defineChain({
1579
1860
  },
1580
1861
  kitContracts: {
1581
1862
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1863
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1582
1864
  },
1583
1865
  });
1584
1866
 
@@ -1604,6 +1886,7 @@ const PlumeTestnet = defineChain({
1604
1886
  rpcEndpoints: ['https://testnet-rpc.plume.org'],
1605
1887
  eurcAddress: null,
1606
1888
  usdcAddress: '0xcB5f30e335672893c7eb944B374c196392C19D18',
1889
+ usdtAddress: null,
1607
1890
  cctp: {
1608
1891
  domain: 22,
1609
1892
  contracts: {
@@ -1645,6 +1928,7 @@ defineChain({
1645
1928
  rpcEndpoints: ['https://asset-hub-polkadot-rpc.n.dwellir.com'],
1646
1929
  eurcAddress: null,
1647
1930
  usdcAddress: '1337',
1931
+ usdtAddress: '1984',
1648
1932
  cctp: null,
1649
1933
  });
1650
1934
 
@@ -1668,6 +1952,7 @@ defineChain({
1668
1952
  rpcEndpoints: ['https://westmint-rpc.polkadot.io'],
1669
1953
  eurcAddress: null,
1670
1954
  usdcAddress: 'Asset ID 31337',
1955
+ usdtAddress: null,
1671
1956
  cctp: null,
1672
1957
  });
1673
1958
 
@@ -1689,9 +1974,10 @@ const Polygon = defineChain({
1689
1974
  chainId: 137,
1690
1975
  isTestnet: false,
1691
1976
  explorerUrl: 'https://polygonscan.com/tx/{hash}',
1692
- rpcEndpoints: ['https://polygon-rpc.com', 'https://polygon.publicnode.com'],
1977
+ rpcEndpoints: ['https://polygon.publicnode.com', 'https://polygon.drpc.org'],
1693
1978
  eurcAddress: null,
1694
1979
  usdcAddress: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359',
1980
+ usdtAddress: null,
1695
1981
  cctp: {
1696
1982
  domain: 7,
1697
1983
  contracts: {
@@ -1716,6 +2002,7 @@ const Polygon = defineChain({
1716
2002
  },
1717
2003
  kitContracts: {
1718
2004
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2005
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1719
2006
  },
1720
2007
  });
1721
2008
 
@@ -1740,6 +2027,7 @@ const PolygonAmoy = defineChain({
1740
2027
  rpcEndpoints: ['https://rpc-amoy.polygon.technology'],
1741
2028
  eurcAddress: null,
1742
2029
  usdcAddress: '0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582',
2030
+ usdtAddress: null,
1743
2031
  cctp: {
1744
2032
  domain: 7,
1745
2033
  contracts: {
@@ -1790,6 +2078,7 @@ const Sei = defineChain({
1790
2078
  rpcEndpoints: ['https://evm-rpc.sei-apis.com'],
1791
2079
  eurcAddress: null,
1792
2080
  usdcAddress: '0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392',
2081
+ usdtAddress: null,
1793
2082
  cctp: {
1794
2083
  domain: 16,
1795
2084
  contracts: {
@@ -1808,6 +2097,7 @@ const Sei = defineChain({
1808
2097
  },
1809
2098
  kitContracts: {
1810
2099
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2100
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1811
2101
  },
1812
2102
  });
1813
2103
 
@@ -1833,6 +2123,7 @@ const SeiTestnet = defineChain({
1833
2123
  rpcEndpoints: ['https://evm-rpc-testnet.sei-apis.com'],
1834
2124
  eurcAddress: null,
1835
2125
  usdcAddress: '0x4fCF1784B31630811181f670Aea7A7bEF803eaED',
2126
+ usdtAddress: null,
1836
2127
  cctp: {
1837
2128
  domain: 16,
1838
2129
  contracts: {
@@ -1875,6 +2166,7 @@ const Sonic = defineChain({
1875
2166
  rpcEndpoints: ['https://rpc.soniclabs.com'],
1876
2167
  eurcAddress: null,
1877
2168
  usdcAddress: '0x29219dd400f2Bf60E5a23d13Be72B486D4038894',
2169
+ usdtAddress: null,
1878
2170
  cctp: {
1879
2171
  domain: 13,
1880
2172
  contracts: {
@@ -1893,6 +2185,7 @@ const Sonic = defineChain({
1893
2185
  },
1894
2186
  kitContracts: {
1895
2187
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2188
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1896
2189
  },
1897
2190
  });
1898
2191
 
@@ -1917,6 +2210,7 @@ const SonicTestnet = defineChain({
1917
2210
  rpcEndpoints: ['https://rpc.testnet.soniclabs.com'],
1918
2211
  eurcAddress: null,
1919
2212
  usdcAddress: '0x0BA304580ee7c9a980CF72e55f5Ed2E9fd30Bc51',
2213
+ usdtAddress: null,
1920
2214
  cctp: {
1921
2215
  domain: 13,
1922
2216
  contracts: {
@@ -1958,6 +2252,7 @@ const Solana = defineChain({
1958
2252
  rpcEndpoints: ['https://api.mainnet-beta.solana.com'],
1959
2253
  eurcAddress: 'HzwqbKZw8HxMN6bF2yFZNrht3c2iXXzpKcFu7uBEDKtr',
1960
2254
  usdcAddress: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
2255
+ usdtAddress: 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB',
1961
2256
  cctp: {
1962
2257
  domain: 5,
1963
2258
  contracts: {
@@ -2004,6 +2299,7 @@ const SolanaDevnet = defineChain({
2004
2299
  explorerUrl: 'https://solscan.io/tx/{hash}?cluster=devnet',
2005
2300
  eurcAddress: 'HzwqbKZw8HxMN6bF2yFZNrht3c2iXXzpKcFu7uBEDKtr',
2006
2301
  usdcAddress: '4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU',
2302
+ usdtAddress: null,
2007
2303
  cctp: {
2008
2304
  domain: 5,
2009
2305
  contracts: {
@@ -2052,6 +2348,7 @@ defineChain({
2052
2348
  rpcEndpoints: ['https://horizon.stellar.org'],
2053
2349
  eurcAddress: 'EURC-GDHU6WRG4IEQXM5NZ4BMPKOXHW76MZM4Y2IEMFDVXBSDP6SJY4ITNPP2',
2054
2350
  usdcAddress: 'USDC-GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN',
2351
+ usdtAddress: null,
2055
2352
  cctp: null,
2056
2353
  });
2057
2354
 
@@ -2075,6 +2372,7 @@ defineChain({
2075
2372
  rpcEndpoints: ['https://horizon-testnet.stellar.org'],
2076
2373
  eurcAddress: 'EURC-GB3Q6QDZYTHWT7E5PVS3W7FUT5GVAFC5KSZFFLPU25GO7VTC3NM2ZTVO',
2077
2374
  usdcAddress: 'USDC-GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5',
2375
+ usdtAddress: null,
2078
2376
  cctp: null,
2079
2377
  });
2080
2378
 
@@ -2098,6 +2396,7 @@ defineChain({
2098
2396
  rpcEndpoints: ['https://fullnode.mainnet.sui.io'],
2099
2397
  eurcAddress: null,
2100
2398
  usdcAddress: '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC',
2399
+ usdtAddress: null,
2101
2400
  cctp: {
2102
2401
  domain: 8,
2103
2402
  contracts: {
@@ -2135,6 +2434,7 @@ defineChain({
2135
2434
  rpcEndpoints: ['https://fullnode.testnet.sui.io'],
2136
2435
  eurcAddress: null,
2137
2436
  usdcAddress: '0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29::usdc::USDC',
2437
+ usdtAddress: null,
2138
2438
  cctp: {
2139
2439
  domain: 8,
2140
2440
  contracts: {
@@ -2173,6 +2473,7 @@ const Unichain = defineChain({
2173
2473
  rpcEndpoints: ['https://mainnet.unichain.org'],
2174
2474
  eurcAddress: null,
2175
2475
  usdcAddress: '0x078D782b760474a361dDA0AF3839290b0EF57AD6',
2476
+ usdtAddress: null,
2176
2477
  cctp: {
2177
2478
  domain: 10,
2178
2479
  contracts: {
@@ -2197,6 +2498,7 @@ const Unichain = defineChain({
2197
2498
  },
2198
2499
  kitContracts: {
2199
2500
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2501
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
2200
2502
  },
2201
2503
  });
2202
2504
 
@@ -2221,6 +2523,7 @@ const UnichainSepolia = defineChain({
2221
2523
  rpcEndpoints: ['https://sepolia.unichain.org'],
2222
2524
  eurcAddress: null,
2223
2525
  usdcAddress: '0x31d0220469e10c4E71834a79b1f276d740d3768F',
2526
+ usdtAddress: null,
2224
2527
  cctp: {
2225
2528
  domain: 10,
2226
2529
  contracts: {
@@ -2269,6 +2572,7 @@ const WorldChain = defineChain({
2269
2572
  rpcEndpoints: ['https://worldchain-mainnet.g.alchemy.com/public'],
2270
2573
  eurcAddress: null,
2271
2574
  usdcAddress: '0x79A02482A880bCE3F13e09Da970dC34db4CD24d1',
2575
+ usdtAddress: null,
2272
2576
  cctp: {
2273
2577
  domain: 14,
2274
2578
  contracts: {
@@ -2287,6 +2591,7 @@ const WorldChain = defineChain({
2287
2591
  },
2288
2592
  kitContracts: {
2289
2593
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2594
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
2290
2595
  },
2291
2596
  });
2292
2597
 
@@ -2314,6 +2619,7 @@ const WorldChainSepolia = defineChain({
2314
2619
  ],
2315
2620
  eurcAddress: null,
2316
2621
  usdcAddress: '0x66145f38cBAC35Ca6F1Dfb4914dF98F1614aeA88',
2622
+ usdtAddress: null,
2317
2623
  cctp: {
2318
2624
  domain: 14,
2319
2625
  contracts: {
@@ -2358,6 +2664,7 @@ const XDC = defineChain({
2358
2664
  rpcEndpoints: ['https://erpc.xdcrpc.com', 'https://erpc.xinfin.network'],
2359
2665
  eurcAddress: null,
2360
2666
  usdcAddress: '0xfA2958CB79b0491CC627c1557F441eF849Ca8eb1',
2667
+ usdtAddress: null,
2361
2668
  cctp: {
2362
2669
  domain: 18,
2363
2670
  contracts: {
@@ -2376,6 +2683,7 @@ const XDC = defineChain({
2376
2683
  },
2377
2684
  kitContracts: {
2378
2685
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2686
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
2379
2687
  },
2380
2688
  });
2381
2689
 
@@ -2400,6 +2708,7 @@ const XDCApothem = defineChain({
2400
2708
  rpcEndpoints: ['https://erpc.apothem.network'],
2401
2709
  eurcAddress: null,
2402
2710
  usdcAddress: '0xb5AB69F7bBada22B28e79C8FFAECe55eF1c771D4',
2711
+ usdtAddress: null,
2403
2712
  cctp: {
2404
2713
  domain: 18,
2405
2714
  contracts: {
@@ -2442,6 +2751,7 @@ defineChain({
2442
2751
  rpcEndpoints: ['https://mainnet.era.zksync.io'],
2443
2752
  eurcAddress: null,
2444
2753
  usdcAddress: '0x1d17CBcF0D6D143135aE902365D2E5e2A16538D4',
2754
+ usdtAddress: null,
2445
2755
  cctp: null,
2446
2756
  });
2447
2757
 
@@ -2466,6 +2776,7 @@ defineChain({
2466
2776
  rpcEndpoints: ['https://sepolia.era.zksync.dev'],
2467
2777
  eurcAddress: null,
2468
2778
  usdcAddress: '0xAe045DE5638162fa134807Cb558E15A3F5A7F853',
2779
+ usdtAddress: null,
2469
2780
  cctp: null,
2470
2781
  });
2471
2782
 
@@ -2499,10 +2810,12 @@ const baseChainDefinitionSchema = z.object({
2499
2810
  rpcEndpoints: z.array(z.string()),
2500
2811
  eurcAddress: z.string().nullable(),
2501
2812
  usdcAddress: z.string().nullable(),
2813
+ usdtAddress: z.string().nullable(),
2502
2814
  cctp: z.any().nullable(), // We'll accept any CCTP config structure
2503
2815
  kitContracts: z
2504
2816
  .object({
2505
2817
  bridge: z.string().optional(),
2818
+ adapter: z.string().optional(),
2506
2819
  })
2507
2820
  .optional(),
2508
2821
  });
@@ -2617,6 +2930,29 @@ z.union([
2617
2930
  z.nativeEnum(Blockchain),
2618
2931
  chainDefinitionSchema,
2619
2932
  ]);
2933
+ /**
2934
+ * Zod schema for validating swap-specific chain identifiers.
2935
+ *
2936
+ * Validates chains based on:
2937
+ * - CCTPv2 support (adapter contract deployed)
2938
+ * - Mainnet only (no testnets)
2939
+ * - At least one supported token available
2940
+ *
2941
+ */
2942
+ z.union([
2943
+ // String blockchain identifier (accepts SwapChain enum values)
2944
+ z.string().refine((val) => val in SwapChain, (val) => ({
2945
+ message: `"${val}" is not a supported swap chain. ` +
2946
+ `Supported chains: ${Object.values(SwapChain).join(', ')}`,
2947
+ })),
2948
+ // SwapChain enum
2949
+ z.nativeEnum(SwapChain),
2950
+ // ChainDefinition object (checks if chain.chain is in SwapChain)
2951
+ chainDefinitionSchema.refine((chain) => chain.chain in SwapChain, (chain) => ({
2952
+ message: `"${chain.chain}" is not a supported swap chain. ` +
2953
+ `Supported chains: ${Object.values(SwapChain).join(', ')}`,
2954
+ })),
2955
+ ]);
2620
2956
  /**
2621
2957
  * Zod schema for validating bridge chain identifiers.
2622
2958
  *
@@ -2656,5 +2992,37 @@ z.union([
2656
2992
  })),
2657
2993
  ]);
2658
2994
 
2995
+ /**
2996
+ * @packageDocumentation
2997
+ * @module SwapTokenSchemas
2998
+ *
2999
+ * Zod validation schemas for supported swap tokens.
3000
+ */
3001
+ // Internal enum used after input normalization.
3002
+ const swapTokenEnumSchema = z.enum([
3003
+ ...Object.keys(SWAP_TOKEN_REGISTRY),
3004
+ NATIVE_TOKEN,
3005
+ ]);
3006
+ /**
3007
+ * Zod schema for validating supported swap token symbols.
3008
+ *
3009
+ * Accepts any token symbol from the SWAP_TOKEN_REGISTRY plus NATIVE.
3010
+ * Input matching is case-insensitive and normalized to uppercase.
3011
+ *
3012
+ * @example
3013
+ * ```typescript
3014
+ * import { supportedSwapTokenSchema } from '@core/chains'
3015
+ *
3016
+ * const result = supportedSwapTokenSchema.safeParse('USDC')
3017
+ * if (result.success) {
3018
+ * console.log('Valid swap token:', result.data)
3019
+ * }
3020
+ * ```
3021
+ */
3022
+ z
3023
+ .string()
3024
+ .transform((value) => value.toUpperCase())
3025
+ .pipe(swapTokenEnumSchema);
3026
+
2659
3027
  export { Arbitrum, ArbitrumSepolia, ArcTestnet, Avalanche, AvalancheFuji, Base, BaseSepolia, BridgeChain, Codex, CodexTestnet, Ethereum, EthereumSepolia, HyperEVM, HyperEVMTestnet, Ink, InkTestnet, Linea, LineaSepolia, Monad, MonadTestnet, Optimism, OptimismSepolia, Plume, PlumeTestnet, Polygon, PolygonAmoy, Sei, SeiTestnet, Solana, SolanaDevnet, Sonic, SonicTestnet, Unichain, UnichainSepolia, WorldChain, WorldChainSepolia, XDC, XDCApothem };
2660
3028
  //# sourceMappingURL=chains.mjs.map