@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.cjs CHANGED
@@ -95,6 +95,122 @@ var Blockchain;
95
95
  Blockchain["ZKSync_Era"] = "ZKSync_Era";
96
96
  Blockchain["ZKSync_Sepolia"] = "ZKSync_Sepolia";
97
97
  })(Blockchain || (Blockchain = {}));
98
+ /**
99
+ * Enum representing the subset of {@link Blockchain} that supports swap operations.
100
+ *
101
+ * This enum provides compile-time type safety for swap chain selection,
102
+ * ensuring only supported chains are available in IDE autocomplete
103
+ * when building swap parameters.
104
+ *
105
+ * @remarks
106
+ * Unlike the full {@link Blockchain} enum, SwapChain only includes networks
107
+ * where the swap functionality is actively supported by the library.
108
+ * Using this enum prevents runtime errors from attempting unsupported
109
+ * cross-chain swaps.
110
+ *
111
+ * Currently supports:
112
+ * - Ethereum mainnet
113
+ * - Base mainnet
114
+ * - Polygon mainnet
115
+ * - Solana mainnet
116
+ *
117
+ * @example
118
+ * ```typescript
119
+ * import { SwapChain, swap, createSwapKitContext } from '@circle-fin/swap-kit'
120
+ * import { createViemAdapterFromPrivateKey } from '@circle-fin/adapter-viem-v2'
121
+ *
122
+ * const context = createSwapKitContext()
123
+ * const adapter = createViemAdapterFromPrivateKey({
124
+ * privateKey: process.env.PRIVATE_KEY
125
+ * })
126
+ *
127
+ * // ✅ Autocomplete shows only swap-supported chains
128
+ * const result = await swap(context, {
129
+ * from: {
130
+ * adapter,
131
+ * chain: SwapChain.Ethereum // Autocomplete: Ethereum, Base, Polygon, Solana
132
+ * },
133
+ * tokenIn: 'USDC',
134
+ * tokenOut: 'USDT',
135
+ * amount: '100.0'
136
+ * })
137
+ * ```
138
+ *
139
+ * @example
140
+ * ```typescript
141
+ * // String literals also work (constrained to SwapChain values)
142
+ * const result = await swap(context, {
143
+ * from: {
144
+ * adapter,
145
+ * chain: 'Ethereum' // ✅ Only SwapChain strings allowed
146
+ * },
147
+ * tokenIn: 'USDC',
148
+ * tokenOut: 'NATIVE',
149
+ * amount: '50.0'
150
+ * })
151
+ *
152
+ * // ❌ TypeScript error - Sui not in SwapChain enum
153
+ * const invalidResult = await swap(context, {
154
+ * from: {
155
+ * adapter,
156
+ * chain: 'Sui' // Compile-time error!
157
+ * },
158
+ * tokenIn: 'USDC',
159
+ * tokenOut: 'USDT',
160
+ * amount: '100.0'
161
+ * })
162
+ * ```
163
+ */
164
+ /**
165
+ * Enum representing chains that support same-chain swaps through the Swap Kit.
166
+ *
167
+ * Unlike the full {@link Blockchain} enum, SwapChain includes only mainnet
168
+ * networks where adapter contracts are deployed (CCTPv2 support).
169
+ *
170
+ * Dynamic validation via {@link isSwapSupportedChain} ensures chains
171
+ * automatically work when adapter contracts and supported tokens are deployed.
172
+ *
173
+ * @example
174
+ * ```typescript
175
+ * import { SwapChain } from '@core/chains'
176
+ * import { swap } from '@circle-fin/swap-kit'
177
+ *
178
+ * const result = await swap(context, {
179
+ * from: {
180
+ * adapter,
181
+ * chain: SwapChain.Arbitrum // Now supported!
182
+ * },
183
+ * tokenIn: 'USDC',
184
+ * tokenOut: 'WETH',
185
+ * amount: '100.0'
186
+ * })
187
+ * ```
188
+ *
189
+ * @see {@link isSwapSupportedChain} for runtime validation
190
+ * @see {@link getSwapSupportedChains} for all supported chains
191
+ */
192
+ var SwapChain;
193
+ (function (SwapChain) {
194
+ // Original 4 chains
195
+ SwapChain["Ethereum"] = "Ethereum";
196
+ SwapChain["Base"] = "Base";
197
+ SwapChain["Polygon"] = "Polygon";
198
+ SwapChain["Solana"] = "Solana";
199
+ // Additional supported chains
200
+ SwapChain["Arbitrum"] = "Arbitrum";
201
+ SwapChain["Optimism"] = "Optimism";
202
+ SwapChain["Avalanche"] = "Avalanche";
203
+ SwapChain["Linea"] = "Linea";
204
+ SwapChain["Ink"] = "Ink";
205
+ SwapChain["World_Chain"] = "World_Chain";
206
+ SwapChain["Unichain"] = "Unichain";
207
+ SwapChain["Plume"] = "Plume";
208
+ SwapChain["Sei"] = "Sei";
209
+ SwapChain["Sonic"] = "Sonic";
210
+ SwapChain["XDC"] = "XDC";
211
+ SwapChain["HyperEVM"] = "HyperEVM";
212
+ SwapChain["Monad"] = "Monad";
213
+ })(SwapChain || (SwapChain = {}));
98
214
  // -----------------------------------------------------------------------------
99
215
  // Bridge Chain Enum (CCTPv2 Supported Chains)
100
216
  // -----------------------------------------------------------------------------
@@ -246,6 +362,7 @@ defineChain({
246
362
  rpcEndpoints: ['https://mainnet-api.algonode.cloud'],
247
363
  eurcAddress: null,
248
364
  usdcAddress: '31566704',
365
+ usdtAddress: null,
249
366
  cctp: null,
250
367
  });
251
368
 
@@ -269,6 +386,7 @@ defineChain({
269
386
  rpcEndpoints: ['https://testnet-api.algonode.cloud'],
270
387
  eurcAddress: null,
271
388
  usdcAddress: '10458941',
389
+ usdtAddress: null,
272
390
  cctp: null,
273
391
  });
274
392
 
@@ -292,6 +410,7 @@ defineChain({
292
410
  rpcEndpoints: ['https://fullnode.mainnet.aptoslabs.com/v1'],
293
411
  eurcAddress: null,
294
412
  usdcAddress: '0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b',
413
+ usdtAddress: '0x357b0b74bc833e95a115ad22604854d6b0fca151cecd94111770e5d6ffc9dc2b',
295
414
  cctp: {
296
415
  domain: 9,
297
416
  contracts: {
@@ -329,6 +448,7 @@ defineChain({
329
448
  rpcEndpoints: ['https://fullnode.testnet.aptoslabs.com/v1'],
330
449
  eurcAddress: null,
331
450
  usdcAddress: '0x69091fbab5f7d635ee7ac5098cf0c1efbe31d68fec0f2cd565e8d168daf52832',
451
+ usdtAddress: null,
332
452
  cctp: {
333
453
  domain: 9,
334
454
  contracts: {
@@ -346,6 +466,121 @@ defineChain({
346
466
  },
347
467
  });
348
468
 
469
+ /**
470
+ * Complete swap token registry - single source of truth for all swap-supported tokens.
471
+ *
472
+ * @remarks
473
+ * All packages should import from this registry for swap operations.
474
+ * Adding a new swap token requires updating only this registry.
475
+ *
476
+ * The NATIVE token is handled separately as it resolves dynamically based on chain.
477
+ *
478
+ * @example
479
+ * ```typescript
480
+ * import { SWAP_TOKEN_REGISTRY } from '@core/chains'
481
+ *
482
+ * // Get token decimals
483
+ * const decimals = SWAP_TOKEN_REGISTRY.USDC.decimals // 6
484
+ *
485
+ * // Check if token is stablecoin
486
+ * const isStable = SWAP_TOKEN_REGISTRY.DAI.category === 'stablecoin' // true
487
+ * ```
488
+ */
489
+ const SWAP_TOKEN_REGISTRY = {
490
+ // ============================================================================
491
+ // Stablecoins (6 decimals)
492
+ // ============================================================================
493
+ USDC: {
494
+ symbol: 'USDC',
495
+ decimals: 6,
496
+ category: 'stablecoin',
497
+ description: 'USD Coin',
498
+ },
499
+ EURC: {
500
+ symbol: 'EURC',
501
+ decimals: 6,
502
+ category: 'stablecoin',
503
+ description: 'Euro Coin',
504
+ },
505
+ USDT: {
506
+ symbol: 'USDT',
507
+ decimals: 6,
508
+ category: 'stablecoin',
509
+ description: 'Tether USD',
510
+ },
511
+ PYUSD: {
512
+ symbol: 'PYUSD',
513
+ decimals: 6,
514
+ category: 'stablecoin',
515
+ description: 'PayPal USD',
516
+ },
517
+ // ============================================================================
518
+ // Stablecoins (18 decimals)
519
+ // ============================================================================
520
+ DAI: {
521
+ symbol: 'DAI',
522
+ decimals: 18,
523
+ category: 'stablecoin',
524
+ description: 'MakerDAO stablecoin',
525
+ },
526
+ USDE: {
527
+ symbol: 'USDE',
528
+ decimals: 18,
529
+ category: 'stablecoin',
530
+ description: 'Ethena USD (synthetic dollar)',
531
+ },
532
+ // ============================================================================
533
+ // Wrapped Tokens
534
+ // ============================================================================
535
+ WBTC: {
536
+ symbol: 'WBTC',
537
+ decimals: 8,
538
+ category: 'wrapped',
539
+ description: 'Wrapped Bitcoin',
540
+ },
541
+ WETH: {
542
+ symbol: 'WETH',
543
+ decimals: 18,
544
+ category: 'wrapped',
545
+ description: 'Wrapped Ethereum',
546
+ },
547
+ WSOL: {
548
+ symbol: 'WSOL',
549
+ decimals: 9,
550
+ category: 'wrapped',
551
+ description: 'Wrapped Solana',
552
+ },
553
+ WAVAX: {
554
+ symbol: 'WAVAX',
555
+ decimals: 18,
556
+ category: 'wrapped',
557
+ description: 'Wrapped Avalanche',
558
+ },
559
+ WPOL: {
560
+ symbol: 'WPOL',
561
+ decimals: 18,
562
+ category: 'wrapped',
563
+ description: 'Wrapped Polygon',
564
+ },
565
+ };
566
+ /**
567
+ * Special NATIVE token constant for swap operations.
568
+ *
569
+ * @remarks
570
+ * NATIVE is handled separately from SWAP_TOKEN_REGISTRY because it resolves
571
+ * dynamically based on the chain (ETH on Ethereum, SOL on Solana, etc.).
572
+ * Its decimals are chain-specific.
573
+ */
574
+ const NATIVE_TOKEN = 'NATIVE';
575
+ /**
576
+ * Array of all supported swap token symbols including NATIVE.
577
+ * Useful for iteration, validation, and filtering.
578
+ */
579
+ [
580
+ ...Object.keys(SWAP_TOKEN_REGISTRY),
581
+ NATIVE_TOKEN,
582
+ ];
583
+
349
584
  /**
350
585
  * The bridge contract address for EVM testnet networks.
351
586
  *
@@ -362,6 +597,13 @@ const BRIDGE_CONTRACT_EVM_TESTNET = '0xC5567a5E3370d4DBfB0540025078e283e36A363d'
362
597
  * USDC transfers on live networks.
363
598
  */
364
599
  const BRIDGE_CONTRACT_EVM_MAINNET = '0xB3FA262d0fB521cc93bE83d87b322b8A23DAf3F0';
600
+ /**
601
+ * The adapter contract address for EVM mainnet networks.
602
+ *
603
+ * This contract serves as an adapter for integrating with various protocols
604
+ * on EVM-compatible chains. Use this address for mainnet adapter integrations.
605
+ */
606
+ const ADAPTER_CONTRACT_EVM_MAINNET = '0x7FB8c7260b63934d8da38aF902f87ae6e284a845';
365
607
 
366
608
  /**
367
609
  * Arc Testnet chain definition
@@ -391,6 +633,7 @@ const ArcTestnet = defineChain({
391
633
  rpcEndpoints: ['https://rpc.testnet.arc.network/'],
392
634
  eurcAddress: '0x89B50855Aa3bE2F677cD6303Cec089B5F319D72a',
393
635
  usdcAddress: '0x3600000000000000000000000000000000000000',
636
+ usdtAddress: null,
394
637
  cctp: {
395
638
  domain: 26,
396
639
  contracts: {
@@ -433,6 +676,7 @@ const Arbitrum = defineChain({
433
676
  rpcEndpoints: ['https://arb1.arbitrum.io/rpc'],
434
677
  eurcAddress: null,
435
678
  usdcAddress: '0xaf88d065e77c8cc2239327c5edb3a432268e5831',
679
+ usdtAddress: null,
436
680
  cctp: {
437
681
  domain: 3,
438
682
  contracts: {
@@ -457,6 +701,7 @@ const Arbitrum = defineChain({
457
701
  },
458
702
  kitContracts: {
459
703
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
704
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
460
705
  },
461
706
  });
462
707
 
@@ -481,6 +726,7 @@ const ArbitrumSepolia = defineChain({
481
726
  rpcEndpoints: ['https://sepolia-rollup.arbitrum.io/rpc'],
482
727
  eurcAddress: null,
483
728
  usdcAddress: '0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d',
729
+ usdtAddress: null,
484
730
  cctp: {
485
731
  domain: 3,
486
732
  contracts: {
@@ -529,6 +775,7 @@ const Avalanche = defineChain({
529
775
  rpcEndpoints: ['https://api.avax.network/ext/bc/C/rpc'],
530
776
  eurcAddress: '0xc891eb4cbdeff6e073e859e987815ed1505c2acd',
531
777
  usdcAddress: '0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E',
778
+ usdtAddress: '0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7',
532
779
  cctp: {
533
780
  domain: 1,
534
781
  contracts: {
@@ -553,6 +800,7 @@ const Avalanche = defineChain({
553
800
  },
554
801
  kitContracts: {
555
802
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
803
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
556
804
  },
557
805
  });
558
806
 
@@ -576,6 +824,7 @@ const AvalancheFuji = defineChain({
576
824
  explorerUrl: 'https://subnets-test.avax.network/c-chain/tx/{hash}',
577
825
  eurcAddress: '0x5e44db7996c682e92a960b65ac713a54ad815c6b',
578
826
  usdcAddress: '0x5425890298aed601595a70ab815c96711a31bc65',
827
+ usdtAddress: null,
579
828
  cctp: {
580
829
  domain: 1,
581
830
  contracts: {
@@ -625,6 +874,7 @@ const Base = defineChain({
625
874
  rpcEndpoints: ['https://mainnet.base.org', 'https://base.publicnode.com'],
626
875
  eurcAddress: '0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42',
627
876
  usdcAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
877
+ usdtAddress: null,
628
878
  cctp: {
629
879
  domain: 6,
630
880
  contracts: {
@@ -649,6 +899,7 @@ const Base = defineChain({
649
899
  },
650
900
  kitContracts: {
651
901
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
902
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
652
903
  },
653
904
  });
654
905
 
@@ -673,6 +924,7 @@ const BaseSepolia = defineChain({
673
924
  rpcEndpoints: ['https://sepolia.base.org'],
674
925
  eurcAddress: '0x808456652fdb597867f38412077A9182bf77359F',
675
926
  usdcAddress: '0x036CbD53842c5426634e7929541eC2318f3dCF7e',
927
+ usdtAddress: null,
676
928
  cctp: {
677
929
  domain: 6,
678
930
  contracts: {
@@ -721,6 +973,7 @@ defineChain({
721
973
  rpcEndpoints: ['https://forno.celo.org'],
722
974
  eurcAddress: null,
723
975
  usdcAddress: '0xcebA9300f2b948710d2653dD7B07f33A8B32118C',
976
+ usdtAddress: '0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e',
724
977
  cctp: null,
725
978
  });
726
979
 
@@ -745,6 +998,7 @@ defineChain({
745
998
  rpcEndpoints: ['https://alfajores-forno.celo-testnet.org'],
746
999
  eurcAddress: null,
747
1000
  usdcAddress: '0x2F25deB3848C207fc8E0c34035B3Ba7fC157602B',
1001
+ usdtAddress: null,
748
1002
  cctp: null,
749
1003
  });
750
1004
 
@@ -769,6 +1023,7 @@ const Codex = defineChain({
769
1023
  rpcEndpoints: ['https://rpc.codex.xyz'],
770
1024
  eurcAddress: null,
771
1025
  usdcAddress: '0xd996633a415985DBd7D6D12f4A4343E31f5037cf',
1026
+ usdtAddress: null,
772
1027
  cctp: {
773
1028
  domain: 12,
774
1029
  contracts: {
@@ -811,6 +1066,7 @@ const CodexTestnet = defineChain({
811
1066
  rpcEndpoints: ['https://rpc.codex-stg.xyz'],
812
1067
  eurcAddress: null,
813
1068
  usdcAddress: '0x6d7f141b6819C2c9CC2f818e6ad549E7Ca090F8f',
1069
+ usdtAddress: null,
814
1070
  cctp: {
815
1071
  domain: 12,
816
1072
  contracts: {
@@ -853,6 +1109,7 @@ const Ethereum = defineChain({
853
1109
  rpcEndpoints: ['https://eth.merkle.io', 'https://ethereum.publicnode.com'],
854
1110
  eurcAddress: '0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c',
855
1111
  usdcAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
1112
+ usdtAddress: '0xdac17f958d2ee523a2206206994597c13d831ec7',
856
1113
  cctp: {
857
1114
  domain: 0,
858
1115
  contracts: {
@@ -877,6 +1134,7 @@ const Ethereum = defineChain({
877
1134
  },
878
1135
  kitContracts: {
879
1136
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1137
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
880
1138
  },
881
1139
  });
882
1140
 
@@ -901,6 +1159,7 @@ const EthereumSepolia = defineChain({
901
1159
  rpcEndpoints: ['https://sepolia.drpc.org'],
902
1160
  eurcAddress: '0x08210F9170F89Ab7658F0B5E3fF39b0E03C594D4',
903
1161
  usdcAddress: '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238',
1162
+ usdtAddress: null,
904
1163
  cctp: {
905
1164
  domain: 0,
906
1165
  contracts: {
@@ -948,6 +1207,7 @@ defineChain({
948
1207
  rpcEndpoints: ['https://mainnet.hashio.io/api'],
949
1208
  eurcAddress: null,
950
1209
  usdcAddress: '0.0.456858',
1210
+ usdtAddress: null,
951
1211
  cctp: null,
952
1212
  });
953
1213
 
@@ -971,6 +1231,7 @@ defineChain({
971
1231
  rpcEndpoints: ['https://testnet.hashio.io/api'],
972
1232
  eurcAddress: null,
973
1233
  usdcAddress: '0.0.429274',
1234
+ usdtAddress: null,
974
1235
  cctp: null,
975
1236
  });
976
1237
 
@@ -997,6 +1258,7 @@ const HyperEVM = defineChain({
997
1258
  rpcEndpoints: ['https://rpc.hyperliquid.xyz/evm'],
998
1259
  eurcAddress: null,
999
1260
  usdcAddress: '0xb88339CB7199b77E23DB6E890353E22632Ba630f',
1261
+ usdtAddress: null,
1000
1262
  cctp: {
1001
1263
  domain: 19,
1002
1264
  contracts: {
@@ -1015,6 +1277,7 @@ const HyperEVM = defineChain({
1015
1277
  },
1016
1278
  kitContracts: {
1017
1279
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1280
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1018
1281
  },
1019
1282
  });
1020
1283
 
@@ -1040,6 +1303,7 @@ const HyperEVMTestnet = defineChain({
1040
1303
  rpcEndpoints: ['https://rpc.hyperliquid-testnet.xyz/evm'],
1041
1304
  eurcAddress: null,
1042
1305
  usdcAddress: '0x2B3370eE501B4a559b57D449569354196457D8Ab',
1306
+ usdtAddress: null,
1043
1307
  cctp: {
1044
1308
  domain: 19,
1045
1309
  contracts: {
@@ -1087,6 +1351,7 @@ const Ink = defineChain({
1087
1351
  ],
1088
1352
  eurcAddress: null,
1089
1353
  usdcAddress: '0x2D270e6886d130D724215A266106e6832161EAEd',
1354
+ usdtAddress: null,
1090
1355
  cctp: {
1091
1356
  domain: 21,
1092
1357
  contracts: {
@@ -1105,6 +1370,7 @@ const Ink = defineChain({
1105
1370
  },
1106
1371
  kitContracts: {
1107
1372
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1373
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1108
1374
  },
1109
1375
  });
1110
1376
 
@@ -1133,6 +1399,7 @@ const InkTestnet = defineChain({
1133
1399
  ],
1134
1400
  eurcAddress: null,
1135
1401
  usdcAddress: '0xFabab97dCE620294D2B0b0e46C68964e326300Ac',
1402
+ usdtAddress: null,
1136
1403
  cctp: {
1137
1404
  domain: 21,
1138
1405
  contracts: {
@@ -1175,6 +1442,7 @@ const Linea = defineChain({
1175
1442
  rpcEndpoints: ['https://rpc.linea.build'],
1176
1443
  eurcAddress: null,
1177
1444
  usdcAddress: '0x176211869ca2b568f2a7d4ee941e073a821ee1ff',
1445
+ usdtAddress: null,
1178
1446
  cctp: {
1179
1447
  domain: 11,
1180
1448
  contracts: {
@@ -1193,6 +1461,7 @@ const Linea = defineChain({
1193
1461
  },
1194
1462
  kitContracts: {
1195
1463
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1464
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1196
1465
  },
1197
1466
  });
1198
1467
 
@@ -1217,6 +1486,7 @@ const LineaSepolia = defineChain({
1217
1486
  rpcEndpoints: ['https://rpc.sepolia.linea.build'],
1218
1487
  eurcAddress: null,
1219
1488
  usdcAddress: '0xfece4462d57bd51a6a552365a011b95f0e16d9b7',
1489
+ usdtAddress: null,
1220
1490
  cctp: {
1221
1491
  domain: 11,
1222
1492
  contracts: {
@@ -1261,6 +1531,7 @@ const Monad = defineChain({
1261
1531
  rpcEndpoints: ['https://rpc.monad.xyz'],
1262
1532
  eurcAddress: null,
1263
1533
  usdcAddress: '0x754704Bc059F8C67012fEd69BC8A327a5aafb603',
1534
+ usdtAddress: null,
1264
1535
  cctp: {
1265
1536
  domain: 15,
1266
1537
  contracts: {
@@ -1279,6 +1550,7 @@ const Monad = defineChain({
1279
1550
  },
1280
1551
  kitContracts: {
1281
1552
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1553
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1282
1554
  },
1283
1555
  });
1284
1556
 
@@ -1305,6 +1577,7 @@ const MonadTestnet = defineChain({
1305
1577
  rpcEndpoints: ['https://testnet-rpc.monad.xyz'],
1306
1578
  eurcAddress: null,
1307
1579
  usdcAddress: '0x534b2f3A21130d7a60830c2Df862319e593943A3',
1580
+ usdtAddress: null,
1308
1581
  cctp: {
1309
1582
  domain: 15,
1310
1583
  contracts: {
@@ -1346,6 +1619,7 @@ defineChain({
1346
1619
  rpcEndpoints: ['https://eth-rpc.mainnet.near.org'],
1347
1620
  eurcAddress: null,
1348
1621
  usdcAddress: '17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1',
1622
+ usdtAddress: 'usdt.tether-token.near',
1349
1623
  cctp: null,
1350
1624
  });
1351
1625
 
@@ -1369,6 +1643,7 @@ defineChain({
1369
1643
  rpcEndpoints: ['https://eth-rpc.testnet.near.org'],
1370
1644
  eurcAddress: null,
1371
1645
  usdcAddress: '3e2210e1184b45b64c8a434c0a7e7b23cc04ea7eb7a6c3c32520d03d4afcb8af',
1646
+ usdtAddress: null,
1372
1647
  cctp: null,
1373
1648
  });
1374
1649
 
@@ -1392,6 +1667,7 @@ defineChain({
1392
1667
  rpcEndpoints: ['https://noble-rpc.polkachu.com'],
1393
1668
  eurcAddress: null,
1394
1669
  usdcAddress: 'uusdc',
1670
+ usdtAddress: null,
1395
1671
  cctp: {
1396
1672
  domain: 4,
1397
1673
  contracts: {
@@ -1428,6 +1704,7 @@ defineChain({
1428
1704
  rpcEndpoints: ['https://noble-testnet-rpc.polkachu.com'],
1429
1705
  eurcAddress: null,
1430
1706
  usdcAddress: 'uusdc',
1707
+ usdtAddress: null,
1431
1708
  cctp: {
1432
1709
  domain: 4,
1433
1710
  contracts: {
@@ -1465,6 +1742,7 @@ const Optimism = defineChain({
1465
1742
  rpcEndpoints: ['https://mainnet.optimism.io'],
1466
1743
  eurcAddress: null,
1467
1744
  usdcAddress: '0x0b2c639c533813f4aa9d7837caf62653d097ff85',
1745
+ usdtAddress: null,
1468
1746
  cctp: {
1469
1747
  domain: 2,
1470
1748
  contracts: {
@@ -1489,6 +1767,7 @@ const Optimism = defineChain({
1489
1767
  },
1490
1768
  kitContracts: {
1491
1769
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1770
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1492
1771
  },
1493
1772
  });
1494
1773
 
@@ -1513,6 +1792,7 @@ const OptimismSepolia = defineChain({
1513
1792
  rpcEndpoints: ['https://sepolia.optimism.io'],
1514
1793
  eurcAddress: null,
1515
1794
  usdcAddress: '0x5fd84259d66Cd46123540766Be93DFE6D43130D7',
1795
+ usdtAddress: null,
1516
1796
  cctp: {
1517
1797
  domain: 2,
1518
1798
  contracts: {
@@ -1563,6 +1843,7 @@ const Plume = defineChain({
1563
1843
  rpcEndpoints: ['https://rpc.plume.org'],
1564
1844
  eurcAddress: null,
1565
1845
  usdcAddress: '0x222365EF19F7947e5484218551B56bb3965Aa7aF',
1846
+ usdtAddress: null,
1566
1847
  cctp: {
1567
1848
  domain: 22,
1568
1849
  contracts: {
@@ -1581,6 +1862,7 @@ const Plume = defineChain({
1581
1862
  },
1582
1863
  kitContracts: {
1583
1864
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1865
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1584
1866
  },
1585
1867
  });
1586
1868
 
@@ -1606,6 +1888,7 @@ const PlumeTestnet = defineChain({
1606
1888
  rpcEndpoints: ['https://testnet-rpc.plume.org'],
1607
1889
  eurcAddress: null,
1608
1890
  usdcAddress: '0xcB5f30e335672893c7eb944B374c196392C19D18',
1891
+ usdtAddress: null,
1609
1892
  cctp: {
1610
1893
  domain: 22,
1611
1894
  contracts: {
@@ -1647,6 +1930,7 @@ defineChain({
1647
1930
  rpcEndpoints: ['https://asset-hub-polkadot-rpc.n.dwellir.com'],
1648
1931
  eurcAddress: null,
1649
1932
  usdcAddress: '1337',
1933
+ usdtAddress: '1984',
1650
1934
  cctp: null,
1651
1935
  });
1652
1936
 
@@ -1670,6 +1954,7 @@ defineChain({
1670
1954
  rpcEndpoints: ['https://westmint-rpc.polkadot.io'],
1671
1955
  eurcAddress: null,
1672
1956
  usdcAddress: 'Asset ID 31337',
1957
+ usdtAddress: null,
1673
1958
  cctp: null,
1674
1959
  });
1675
1960
 
@@ -1691,9 +1976,10 @@ const Polygon = defineChain({
1691
1976
  chainId: 137,
1692
1977
  isTestnet: false,
1693
1978
  explorerUrl: 'https://polygonscan.com/tx/{hash}',
1694
- rpcEndpoints: ['https://polygon-rpc.com', 'https://polygon.publicnode.com'],
1979
+ rpcEndpoints: ['https://polygon.publicnode.com', 'https://polygon.drpc.org'],
1695
1980
  eurcAddress: null,
1696
1981
  usdcAddress: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359',
1982
+ usdtAddress: null,
1697
1983
  cctp: {
1698
1984
  domain: 7,
1699
1985
  contracts: {
@@ -1718,6 +2004,7 @@ const Polygon = defineChain({
1718
2004
  },
1719
2005
  kitContracts: {
1720
2006
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2007
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1721
2008
  },
1722
2009
  });
1723
2010
 
@@ -1742,6 +2029,7 @@ const PolygonAmoy = defineChain({
1742
2029
  rpcEndpoints: ['https://rpc-amoy.polygon.technology'],
1743
2030
  eurcAddress: null,
1744
2031
  usdcAddress: '0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582',
2032
+ usdtAddress: null,
1745
2033
  cctp: {
1746
2034
  domain: 7,
1747
2035
  contracts: {
@@ -1792,6 +2080,7 @@ const Sei = defineChain({
1792
2080
  rpcEndpoints: ['https://evm-rpc.sei-apis.com'],
1793
2081
  eurcAddress: null,
1794
2082
  usdcAddress: '0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392',
2083
+ usdtAddress: null,
1795
2084
  cctp: {
1796
2085
  domain: 16,
1797
2086
  contracts: {
@@ -1810,6 +2099,7 @@ const Sei = defineChain({
1810
2099
  },
1811
2100
  kitContracts: {
1812
2101
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2102
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1813
2103
  },
1814
2104
  });
1815
2105
 
@@ -1835,6 +2125,7 @@ const SeiTestnet = defineChain({
1835
2125
  rpcEndpoints: ['https://evm-rpc-testnet.sei-apis.com'],
1836
2126
  eurcAddress: null,
1837
2127
  usdcAddress: '0x4fCF1784B31630811181f670Aea7A7bEF803eaED',
2128
+ usdtAddress: null,
1838
2129
  cctp: {
1839
2130
  domain: 16,
1840
2131
  contracts: {
@@ -1877,6 +2168,7 @@ const Sonic = defineChain({
1877
2168
  rpcEndpoints: ['https://rpc.soniclabs.com'],
1878
2169
  eurcAddress: null,
1879
2170
  usdcAddress: '0x29219dd400f2Bf60E5a23d13Be72B486D4038894',
2171
+ usdtAddress: null,
1880
2172
  cctp: {
1881
2173
  domain: 13,
1882
2174
  contracts: {
@@ -1895,6 +2187,7 @@ const Sonic = defineChain({
1895
2187
  },
1896
2188
  kitContracts: {
1897
2189
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2190
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1898
2191
  },
1899
2192
  });
1900
2193
 
@@ -1919,6 +2212,7 @@ const SonicTestnet = defineChain({
1919
2212
  rpcEndpoints: ['https://rpc.testnet.soniclabs.com'],
1920
2213
  eurcAddress: null,
1921
2214
  usdcAddress: '0x0BA304580ee7c9a980CF72e55f5Ed2E9fd30Bc51',
2215
+ usdtAddress: null,
1922
2216
  cctp: {
1923
2217
  domain: 13,
1924
2218
  contracts: {
@@ -1960,6 +2254,7 @@ const Solana = defineChain({
1960
2254
  rpcEndpoints: ['https://api.mainnet-beta.solana.com'],
1961
2255
  eurcAddress: 'HzwqbKZw8HxMN6bF2yFZNrht3c2iXXzpKcFu7uBEDKtr',
1962
2256
  usdcAddress: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
2257
+ usdtAddress: 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB',
1963
2258
  cctp: {
1964
2259
  domain: 5,
1965
2260
  contracts: {
@@ -2006,6 +2301,7 @@ const SolanaDevnet = defineChain({
2006
2301
  explorerUrl: 'https://solscan.io/tx/{hash}?cluster=devnet',
2007
2302
  eurcAddress: 'HzwqbKZw8HxMN6bF2yFZNrht3c2iXXzpKcFu7uBEDKtr',
2008
2303
  usdcAddress: '4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU',
2304
+ usdtAddress: null,
2009
2305
  cctp: {
2010
2306
  domain: 5,
2011
2307
  contracts: {
@@ -2054,6 +2350,7 @@ defineChain({
2054
2350
  rpcEndpoints: ['https://horizon.stellar.org'],
2055
2351
  eurcAddress: 'EURC-GDHU6WRG4IEQXM5NZ4BMPKOXHW76MZM4Y2IEMFDVXBSDP6SJY4ITNPP2',
2056
2352
  usdcAddress: 'USDC-GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN',
2353
+ usdtAddress: null,
2057
2354
  cctp: null,
2058
2355
  });
2059
2356
 
@@ -2077,6 +2374,7 @@ defineChain({
2077
2374
  rpcEndpoints: ['https://horizon-testnet.stellar.org'],
2078
2375
  eurcAddress: 'EURC-GB3Q6QDZYTHWT7E5PVS3W7FUT5GVAFC5KSZFFLPU25GO7VTC3NM2ZTVO',
2079
2376
  usdcAddress: 'USDC-GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5',
2377
+ usdtAddress: null,
2080
2378
  cctp: null,
2081
2379
  });
2082
2380
 
@@ -2100,6 +2398,7 @@ defineChain({
2100
2398
  rpcEndpoints: ['https://fullnode.mainnet.sui.io'],
2101
2399
  eurcAddress: null,
2102
2400
  usdcAddress: '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC',
2401
+ usdtAddress: null,
2103
2402
  cctp: {
2104
2403
  domain: 8,
2105
2404
  contracts: {
@@ -2137,6 +2436,7 @@ defineChain({
2137
2436
  rpcEndpoints: ['https://fullnode.testnet.sui.io'],
2138
2437
  eurcAddress: null,
2139
2438
  usdcAddress: '0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29::usdc::USDC',
2439
+ usdtAddress: null,
2140
2440
  cctp: {
2141
2441
  domain: 8,
2142
2442
  contracts: {
@@ -2175,6 +2475,7 @@ const Unichain = defineChain({
2175
2475
  rpcEndpoints: ['https://mainnet.unichain.org'],
2176
2476
  eurcAddress: null,
2177
2477
  usdcAddress: '0x078D782b760474a361dDA0AF3839290b0EF57AD6',
2478
+ usdtAddress: null,
2178
2479
  cctp: {
2179
2480
  domain: 10,
2180
2481
  contracts: {
@@ -2199,6 +2500,7 @@ const Unichain = defineChain({
2199
2500
  },
2200
2501
  kitContracts: {
2201
2502
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2503
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
2202
2504
  },
2203
2505
  });
2204
2506
 
@@ -2223,6 +2525,7 @@ const UnichainSepolia = defineChain({
2223
2525
  rpcEndpoints: ['https://sepolia.unichain.org'],
2224
2526
  eurcAddress: null,
2225
2527
  usdcAddress: '0x31d0220469e10c4E71834a79b1f276d740d3768F',
2528
+ usdtAddress: null,
2226
2529
  cctp: {
2227
2530
  domain: 10,
2228
2531
  contracts: {
@@ -2271,6 +2574,7 @@ const WorldChain = defineChain({
2271
2574
  rpcEndpoints: ['https://worldchain-mainnet.g.alchemy.com/public'],
2272
2575
  eurcAddress: null,
2273
2576
  usdcAddress: '0x79A02482A880bCE3F13e09Da970dC34db4CD24d1',
2577
+ usdtAddress: null,
2274
2578
  cctp: {
2275
2579
  domain: 14,
2276
2580
  contracts: {
@@ -2289,6 +2593,7 @@ const WorldChain = defineChain({
2289
2593
  },
2290
2594
  kitContracts: {
2291
2595
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2596
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
2292
2597
  },
2293
2598
  });
2294
2599
 
@@ -2316,6 +2621,7 @@ const WorldChainSepolia = defineChain({
2316
2621
  ],
2317
2622
  eurcAddress: null,
2318
2623
  usdcAddress: '0x66145f38cBAC35Ca6F1Dfb4914dF98F1614aeA88',
2624
+ usdtAddress: null,
2319
2625
  cctp: {
2320
2626
  domain: 14,
2321
2627
  contracts: {
@@ -2360,6 +2666,7 @@ const XDC = defineChain({
2360
2666
  rpcEndpoints: ['https://erpc.xdcrpc.com', 'https://erpc.xinfin.network'],
2361
2667
  eurcAddress: null,
2362
2668
  usdcAddress: '0xfA2958CB79b0491CC627c1557F441eF849Ca8eb1',
2669
+ usdtAddress: null,
2363
2670
  cctp: {
2364
2671
  domain: 18,
2365
2672
  contracts: {
@@ -2378,6 +2685,7 @@ const XDC = defineChain({
2378
2685
  },
2379
2686
  kitContracts: {
2380
2687
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2688
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
2381
2689
  },
2382
2690
  });
2383
2691
 
@@ -2402,6 +2710,7 @@ const XDCApothem = defineChain({
2402
2710
  rpcEndpoints: ['https://erpc.apothem.network'],
2403
2711
  eurcAddress: null,
2404
2712
  usdcAddress: '0xb5AB69F7bBada22B28e79C8FFAECe55eF1c771D4',
2713
+ usdtAddress: null,
2405
2714
  cctp: {
2406
2715
  domain: 18,
2407
2716
  contracts: {
@@ -2444,6 +2753,7 @@ defineChain({
2444
2753
  rpcEndpoints: ['https://mainnet.era.zksync.io'],
2445
2754
  eurcAddress: null,
2446
2755
  usdcAddress: '0x1d17CBcF0D6D143135aE902365D2E5e2A16538D4',
2756
+ usdtAddress: null,
2447
2757
  cctp: null,
2448
2758
  });
2449
2759
 
@@ -2468,6 +2778,7 @@ defineChain({
2468
2778
  rpcEndpoints: ['https://sepolia.era.zksync.dev'],
2469
2779
  eurcAddress: null,
2470
2780
  usdcAddress: '0xAe045DE5638162fa134807Cb558E15A3F5A7F853',
2781
+ usdtAddress: null,
2471
2782
  cctp: null,
2472
2783
  });
2473
2784
 
@@ -2501,10 +2812,12 @@ const baseChainDefinitionSchema = zod.z.object({
2501
2812
  rpcEndpoints: zod.z.array(zod.z.string()),
2502
2813
  eurcAddress: zod.z.string().nullable(),
2503
2814
  usdcAddress: zod.z.string().nullable(),
2815
+ usdtAddress: zod.z.string().nullable(),
2504
2816
  cctp: zod.z.any().nullable(), // We'll accept any CCTP config structure
2505
2817
  kitContracts: zod.z
2506
2818
  .object({
2507
2819
  bridge: zod.z.string().optional(),
2820
+ adapter: zod.z.string().optional(),
2508
2821
  })
2509
2822
  .optional(),
2510
2823
  });
@@ -2619,6 +2932,29 @@ zod.z.union([
2619
2932
  zod.z.nativeEnum(Blockchain),
2620
2933
  chainDefinitionSchema,
2621
2934
  ]);
2935
+ /**
2936
+ * Zod schema for validating swap-specific chain identifiers.
2937
+ *
2938
+ * Validates chains based on:
2939
+ * - CCTPv2 support (adapter contract deployed)
2940
+ * - Mainnet only (no testnets)
2941
+ * - At least one supported token available
2942
+ *
2943
+ */
2944
+ zod.z.union([
2945
+ // String blockchain identifier (accepts SwapChain enum values)
2946
+ zod.z.string().refine((val) => val in SwapChain, (val) => ({
2947
+ message: `"${val}" is not a supported swap chain. ` +
2948
+ `Supported chains: ${Object.values(SwapChain).join(', ')}`,
2949
+ })),
2950
+ // SwapChain enum
2951
+ zod.z.nativeEnum(SwapChain),
2952
+ // ChainDefinition object (checks if chain.chain is in SwapChain)
2953
+ chainDefinitionSchema.refine((chain) => chain.chain in SwapChain, (chain) => ({
2954
+ message: `"${chain.chain}" is not a supported swap chain. ` +
2955
+ `Supported chains: ${Object.values(SwapChain).join(', ')}`,
2956
+ })),
2957
+ ]);
2622
2958
  /**
2623
2959
  * Zod schema for validating bridge chain identifiers.
2624
2960
  *
@@ -2658,6 +2994,38 @@ zod.z.union([
2658
2994
  })),
2659
2995
  ]);
2660
2996
 
2997
+ /**
2998
+ * @packageDocumentation
2999
+ * @module SwapTokenSchemas
3000
+ *
3001
+ * Zod validation schemas for supported swap tokens.
3002
+ */
3003
+ // Internal enum used after input normalization.
3004
+ const swapTokenEnumSchema = zod.z.enum([
3005
+ ...Object.keys(SWAP_TOKEN_REGISTRY),
3006
+ NATIVE_TOKEN,
3007
+ ]);
3008
+ /**
3009
+ * Zod schema for validating supported swap token symbols.
3010
+ *
3011
+ * Accepts any token symbol from the SWAP_TOKEN_REGISTRY plus NATIVE.
3012
+ * Input matching is case-insensitive and normalized to uppercase.
3013
+ *
3014
+ * @example
3015
+ * ```typescript
3016
+ * import { supportedSwapTokenSchema } from '@core/chains'
3017
+ *
3018
+ * const result = supportedSwapTokenSchema.safeParse('USDC')
3019
+ * if (result.success) {
3020
+ * console.log('Valid swap token:', result.data)
3021
+ * }
3022
+ * ```
3023
+ */
3024
+ zod.z
3025
+ .string()
3026
+ .transform((value) => value.toUpperCase())
3027
+ .pipe(swapTokenEnumSchema);
3028
+
2661
3029
  exports.Arbitrum = Arbitrum;
2662
3030
  exports.ArbitrumSepolia = ArbitrumSepolia;
2663
3031
  exports.ArcTestnet = ArcTestnet;