@circle-fin/app-kit 1.0.0 → 1.0.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 ADDED
@@ -0,0 +1,3028 @@
1
+ /**
2
+ * Copyright (c) 2026, Circle Internet Group, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ import { z } from 'zod';
20
+
21
+ // -----------------------------------------------------------------------------
22
+ // Blockchain Enum
23
+ // -----------------------------------------------------------------------------
24
+ /**
25
+ * Enumeration of all blockchains known to this library.
26
+ *
27
+ * This enum contains every blockchain that has a chain definition, regardless
28
+ * of whether bridging is currently supported. For chains that support bridging
29
+ * via CCTPv2, see {@link BridgeChain}.
30
+ *
31
+ * @enum
32
+ * @category Enums
33
+ * @description Provides string identifiers for each blockchain with a definition.
34
+ * @see {@link BridgeChain} for the subset of chains that support CCTPv2 bridging.
35
+ */
36
+ var Blockchain;
37
+ (function (Blockchain) {
38
+ Blockchain["Algorand"] = "Algorand";
39
+ Blockchain["Algorand_Testnet"] = "Algorand_Testnet";
40
+ Blockchain["Aptos"] = "Aptos";
41
+ Blockchain["Aptos_Testnet"] = "Aptos_Testnet";
42
+ Blockchain["Arc_Testnet"] = "Arc_Testnet";
43
+ Blockchain["Arbitrum"] = "Arbitrum";
44
+ Blockchain["Arbitrum_Sepolia"] = "Arbitrum_Sepolia";
45
+ Blockchain["Avalanche"] = "Avalanche";
46
+ Blockchain["Avalanche_Fuji"] = "Avalanche_Fuji";
47
+ Blockchain["Base"] = "Base";
48
+ Blockchain["Base_Sepolia"] = "Base_Sepolia";
49
+ Blockchain["Celo"] = "Celo";
50
+ Blockchain["Celo_Alfajores_Testnet"] = "Celo_Alfajores_Testnet";
51
+ Blockchain["Codex"] = "Codex";
52
+ Blockchain["Codex_Testnet"] = "Codex_Testnet";
53
+ Blockchain["Ethereum"] = "Ethereum";
54
+ Blockchain["Ethereum_Sepolia"] = "Ethereum_Sepolia";
55
+ Blockchain["Hedera"] = "Hedera";
56
+ Blockchain["Hedera_Testnet"] = "Hedera_Testnet";
57
+ Blockchain["HyperEVM"] = "HyperEVM";
58
+ Blockchain["HyperEVM_Testnet"] = "HyperEVM_Testnet";
59
+ Blockchain["Ink"] = "Ink";
60
+ Blockchain["Ink_Testnet"] = "Ink_Testnet";
61
+ Blockchain["Linea"] = "Linea";
62
+ Blockchain["Linea_Sepolia"] = "Linea_Sepolia";
63
+ Blockchain["Monad"] = "Monad";
64
+ Blockchain["Monad_Testnet"] = "Monad_Testnet";
65
+ Blockchain["NEAR"] = "NEAR";
66
+ Blockchain["NEAR_Testnet"] = "NEAR_Testnet";
67
+ Blockchain["Noble"] = "Noble";
68
+ Blockchain["Noble_Testnet"] = "Noble_Testnet";
69
+ Blockchain["Optimism"] = "Optimism";
70
+ Blockchain["Optimism_Sepolia"] = "Optimism_Sepolia";
71
+ Blockchain["Polkadot_Asset_Hub"] = "Polkadot_Asset_Hub";
72
+ Blockchain["Polkadot_Westmint"] = "Polkadot_Westmint";
73
+ Blockchain["Plume"] = "Plume";
74
+ Blockchain["Plume_Testnet"] = "Plume_Testnet";
75
+ Blockchain["Polygon"] = "Polygon";
76
+ Blockchain["Polygon_Amoy_Testnet"] = "Polygon_Amoy_Testnet";
77
+ Blockchain["Sei"] = "Sei";
78
+ Blockchain["Sei_Testnet"] = "Sei_Testnet";
79
+ Blockchain["Solana"] = "Solana";
80
+ Blockchain["Solana_Devnet"] = "Solana_Devnet";
81
+ Blockchain["Sonic"] = "Sonic";
82
+ Blockchain["Sonic_Testnet"] = "Sonic_Testnet";
83
+ Blockchain["Stellar"] = "Stellar";
84
+ Blockchain["Stellar_Testnet"] = "Stellar_Testnet";
85
+ Blockchain["Sui"] = "Sui";
86
+ Blockchain["Sui_Testnet"] = "Sui_Testnet";
87
+ Blockchain["Unichain"] = "Unichain";
88
+ Blockchain["Unichain_Sepolia"] = "Unichain_Sepolia";
89
+ Blockchain["World_Chain"] = "World_Chain";
90
+ Blockchain["World_Chain_Sepolia"] = "World_Chain_Sepolia";
91
+ Blockchain["XDC"] = "XDC";
92
+ Blockchain["XDC_Apothem"] = "XDC_Apothem";
93
+ Blockchain["ZKSync_Era"] = "ZKSync_Era";
94
+ Blockchain["ZKSync_Sepolia"] = "ZKSync_Sepolia";
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 = {}));
212
+ // -----------------------------------------------------------------------------
213
+ // Bridge Chain Enum (CCTPv2 Supported Chains)
214
+ // -----------------------------------------------------------------------------
215
+ /**
216
+ * Enumeration of blockchains that support cross-chain bridging via CCTPv2.
217
+ *
218
+ * The enum is derived from the full {@link Blockchain} enum but filtered to only
219
+ * include chains with active CCTPv2 support. When new chains gain CCTPv2 support,
220
+ * they are added to this enum.
221
+ *
222
+ * @enum
223
+ * @category Enums
224
+ *
225
+ * @remarks
226
+ * - This enum is the **canonical source** of bridging-supported chains.
227
+ * - Use this enum (or its string literals) in `kit.bridge()` calls for type safety.
228
+ * - Attempting to use a chain not in this enum will produce a TypeScript compile error.
229
+ *
230
+ * @example
231
+ * ```typescript
232
+ * import { BridgeKit, BridgeChain } from '@circle-fin/bridge-kit'
233
+ *
234
+ * const kit = new BridgeKit()
235
+ *
236
+ * // ✅ Valid - autocomplete suggests only supported chains
237
+ * await kit.bridge({
238
+ * from: { adapter, chain: BridgeChain.Ethereum },
239
+ * to: { adapter, chain: BridgeChain.Base },
240
+ * amount: '100'
241
+ * })
242
+ *
243
+ * // ✅ Also valid - string literals work with autocomplete
244
+ * await kit.bridge({
245
+ * from: { adapter, chain: 'Ethereum_Sepolia' },
246
+ * to: { adapter, chain: 'Base_Sepolia' },
247
+ * amount: '100'
248
+ * })
249
+ *
250
+ * // ❌ Compile error - Algorand is not in BridgeChain
251
+ * await kit.bridge({
252
+ * from: { adapter, chain: 'Algorand' }, // TypeScript error!
253
+ * to: { adapter, chain: 'Base' },
254
+ * amount: '100'
255
+ * })
256
+ * ```
257
+ *
258
+ * @see {@link Blockchain} for the complete list of all known blockchains.
259
+ * @see {@link BridgeChainIdentifier} for the type that accepts these values.
260
+ */
261
+ var BridgeChain;
262
+ (function (BridgeChain) {
263
+ // Mainnet chains with CCTPv2 support
264
+ BridgeChain["Arbitrum"] = "Arbitrum";
265
+ BridgeChain["Avalanche"] = "Avalanche";
266
+ BridgeChain["Base"] = "Base";
267
+ BridgeChain["Codex"] = "Codex";
268
+ BridgeChain["Ethereum"] = "Ethereum";
269
+ BridgeChain["HyperEVM"] = "HyperEVM";
270
+ BridgeChain["Ink"] = "Ink";
271
+ BridgeChain["Linea"] = "Linea";
272
+ BridgeChain["Monad"] = "Monad";
273
+ BridgeChain["Optimism"] = "Optimism";
274
+ BridgeChain["Plume"] = "Plume";
275
+ BridgeChain["Polygon"] = "Polygon";
276
+ BridgeChain["Sei"] = "Sei";
277
+ BridgeChain["Solana"] = "Solana";
278
+ BridgeChain["Sonic"] = "Sonic";
279
+ BridgeChain["Unichain"] = "Unichain";
280
+ BridgeChain["World_Chain"] = "World_Chain";
281
+ BridgeChain["XDC"] = "XDC";
282
+ // Testnet chains with CCTPv2 support
283
+ BridgeChain["Arc_Testnet"] = "Arc_Testnet";
284
+ BridgeChain["Arbitrum_Sepolia"] = "Arbitrum_Sepolia";
285
+ BridgeChain["Avalanche_Fuji"] = "Avalanche_Fuji";
286
+ BridgeChain["Base_Sepolia"] = "Base_Sepolia";
287
+ BridgeChain["Codex_Testnet"] = "Codex_Testnet";
288
+ BridgeChain["Ethereum_Sepolia"] = "Ethereum_Sepolia";
289
+ BridgeChain["HyperEVM_Testnet"] = "HyperEVM_Testnet";
290
+ BridgeChain["Ink_Testnet"] = "Ink_Testnet";
291
+ BridgeChain["Linea_Sepolia"] = "Linea_Sepolia";
292
+ BridgeChain["Monad_Testnet"] = "Monad_Testnet";
293
+ BridgeChain["Optimism_Sepolia"] = "Optimism_Sepolia";
294
+ BridgeChain["Plume_Testnet"] = "Plume_Testnet";
295
+ BridgeChain["Polygon_Amoy_Testnet"] = "Polygon_Amoy_Testnet";
296
+ BridgeChain["Sei_Testnet"] = "Sei_Testnet";
297
+ BridgeChain["Solana_Devnet"] = "Solana_Devnet";
298
+ BridgeChain["Sonic_Testnet"] = "Sonic_Testnet";
299
+ BridgeChain["Unichain_Sepolia"] = "Unichain_Sepolia";
300
+ BridgeChain["World_Chain_Sepolia"] = "World_Chain_Sepolia";
301
+ BridgeChain["XDC_Apothem"] = "XDC_Apothem";
302
+ })(BridgeChain || (BridgeChain = {}));
303
+
304
+ /**
305
+ * Helper function to define a chain with proper TypeScript typing.
306
+ *
307
+ * This utility function works with TypeScript's `as const` assertion to create
308
+ * strongly-typed, immutable chain definition objects. It preserves literal types
309
+ * from the input and ensures the resulting object maintains all type information.
310
+ *
311
+ * When used with `as const`, it allows TypeScript to infer the most specific
312
+ * possible types for all properties, including string literals and numeric literals,
313
+ * rather than widening them to general types like string or number.
314
+ * @typeParam T - The specific chain definition type (must extend ChainDefinition)
315
+ * @param chain - The chain definition object, typically with an `as const` assertion
316
+ * @returns The same chain definition with preserved literal types
317
+ * @example
318
+ * ```typescript
319
+ * // Define an EVM chain with literal types preserved
320
+ * const Ethereum = defineChain({
321
+ * type: 'evm',
322
+ * chain: Blockchain.Ethereum,
323
+ * chainId: 1,
324
+ * name: 'Ethereum',
325
+ * nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
326
+ * isTestnet: false,
327
+ * usdcAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
328
+ * eurcAddress: null,
329
+ * cctp: {
330
+ * domain: 0,
331
+ * contracts: {
332
+ * TokenMessengerV1: '0xbd3fa81b58ba92a82136038b25adec7066af3155',
333
+ * MessageTransmitterV1: '0x0a992d191deec32afe36203ad87d7d289a738f81'
334
+ * }
335
+ * }
336
+ * } as const);
337
+ * ```
338
+ */
339
+ function defineChain(chain) {
340
+ return chain;
341
+ }
342
+
343
+ /**
344
+ * Algorand Mainnet chain definition
345
+ * @remarks
346
+ * This represents the official production network for the Algorand blockchain.
347
+ */
348
+ defineChain({
349
+ type: 'algorand',
350
+ chain: Blockchain.Algorand,
351
+ name: 'Algorand',
352
+ title: 'Algorand Mainnet',
353
+ nativeCurrency: {
354
+ name: 'Algo',
355
+ symbol: 'ALGO',
356
+ decimals: 6,
357
+ },
358
+ isTestnet: false,
359
+ explorerUrl: 'https://explorer.perawallet.app/tx/{hash}',
360
+ rpcEndpoints: ['https://mainnet-api.algonode.cloud'],
361
+ eurcAddress: null,
362
+ usdcAddress: '31566704',
363
+ usdtAddress: null,
364
+ cctp: null,
365
+ });
366
+
367
+ /**
368
+ * Algorand Testnet chain definition
369
+ * @remarks
370
+ * This represents the official testnet for the Algorand blockchain.
371
+ */
372
+ defineChain({
373
+ type: 'algorand',
374
+ chain: Blockchain.Algorand_Testnet,
375
+ name: 'Algorand Testnet',
376
+ title: 'Algorand Test Network',
377
+ nativeCurrency: {
378
+ name: 'Algo',
379
+ symbol: 'ALGO',
380
+ decimals: 6,
381
+ },
382
+ isTestnet: true,
383
+ explorerUrl: 'https://testnet.explorer.perawallet.app/tx/{hash}',
384
+ rpcEndpoints: ['https://testnet-api.algonode.cloud'],
385
+ eurcAddress: null,
386
+ usdcAddress: '10458941',
387
+ usdtAddress: null,
388
+ cctp: null,
389
+ });
390
+
391
+ /**
392
+ * Aptos Mainnet chain definition
393
+ * @remarks
394
+ * This represents the official production network for the Aptos blockchain.
395
+ */
396
+ defineChain({
397
+ type: 'aptos',
398
+ chain: Blockchain.Aptos,
399
+ name: 'Aptos',
400
+ title: 'Aptos Mainnet',
401
+ nativeCurrency: {
402
+ name: 'Aptos',
403
+ symbol: 'APT',
404
+ decimals: 8,
405
+ },
406
+ isTestnet: false,
407
+ explorerUrl: 'https://explorer.aptoslabs.com/txn/{hash}?network=mainnet',
408
+ rpcEndpoints: ['https://fullnode.mainnet.aptoslabs.com/v1'],
409
+ eurcAddress: null,
410
+ usdcAddress: '0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b',
411
+ usdtAddress: '0x357b0b74bc833e95a115ad22604854d6b0fca151cecd94111770e5d6ffc9dc2b',
412
+ cctp: {
413
+ domain: 9,
414
+ contracts: {
415
+ v1: {
416
+ type: 'split',
417
+ tokenMessenger: '0x9bce6734f7b63e835108e3bd8c36743d4709fe435f44791918801d0989640a9d',
418
+ messageTransmitter: '0x177e17751820e4b4371873ca8c30279be63bdea63b88ed0f2239c2eea10f1772',
419
+ confirmations: 1,
420
+ },
421
+ },
422
+ forwarderSupported: {
423
+ source: false,
424
+ destination: false,
425
+ },
426
+ },
427
+ });
428
+
429
+ /**
430
+ * Aptos Testnet chain definition
431
+ * @remarks
432
+ * This represents the official test network for the Aptos blockchain.
433
+ */
434
+ defineChain({
435
+ type: 'aptos',
436
+ chain: Blockchain.Aptos_Testnet,
437
+ name: 'Aptos Testnet',
438
+ title: 'Aptos Test Network',
439
+ nativeCurrency: {
440
+ name: 'Aptos',
441
+ symbol: 'APT',
442
+ decimals: 8,
443
+ },
444
+ isTestnet: true,
445
+ explorerUrl: 'https://explorer.aptoslabs.com/txn/{hash}?network=testnet',
446
+ rpcEndpoints: ['https://fullnode.testnet.aptoslabs.com/v1'],
447
+ eurcAddress: null,
448
+ usdcAddress: '0x69091fbab5f7d635ee7ac5098cf0c1efbe31d68fec0f2cd565e8d168daf52832',
449
+ usdtAddress: null,
450
+ cctp: {
451
+ domain: 9,
452
+ contracts: {
453
+ v1: {
454
+ type: 'split',
455
+ tokenMessenger: '0x5f9b937419dda90aa06c1836b7847f65bbbe3f1217567758dc2488be31a477b9',
456
+ messageTransmitter: '0x081e86cebf457a0c6004f35bd648a2794698f52e0dde09a48619dcd3d4cc23d9',
457
+ confirmations: 1,
458
+ },
459
+ },
460
+ forwarderSupported: {
461
+ source: false,
462
+ destination: false,
463
+ },
464
+ },
465
+ });
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
+
582
+ /**
583
+ * The bridge contract address for EVM testnet networks.
584
+ *
585
+ * This contract handles USDC transfers on testnet environments across
586
+ * EVM-compatible chains. Use this address when deploying or testing
587
+ * cross-chain USDC transfers on test networks.
588
+ */
589
+ const BRIDGE_CONTRACT_EVM_TESTNET = '0xC5567a5E3370d4DBfB0540025078e283e36A363d';
590
+ /**
591
+ * The bridge contract address for EVM mainnet networks.
592
+ *
593
+ * This contract handles USDC transfers on mainnet environments across
594
+ * EVM-compatible chains. Use this address for production cross-chain
595
+ * USDC transfers on live networks.
596
+ */
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';
605
+
606
+ /**
607
+ * Arc Testnet chain definition
608
+ * @remarks
609
+ * This represents the test network for the Arc blockchain,
610
+ * Circle's EVM-compatible Layer-1 designed for stablecoin finance
611
+ * and asset tokenization. Arc uses USDC as the native gas token and
612
+ * features the Malachite Byzantine Fault Tolerant (BFT) consensus
613
+ * engine for sub-second finality.
614
+ */
615
+ const ArcTestnet = defineChain({
616
+ type: 'evm',
617
+ chain: Blockchain.Arc_Testnet,
618
+ name: 'Arc Testnet',
619
+ title: 'ArcTestnet',
620
+ nativeCurrency: {
621
+ name: 'USDC',
622
+ symbol: 'USDC',
623
+ // Arc uses native USDC with 18 decimals for gas payments (EVM standard).
624
+ // Note: The ERC-20 USDC contract at usdcAddress uses 6 decimals.
625
+ // See: https://docs.arc.network/arc/references/contract-addresses
626
+ decimals: 18,
627
+ },
628
+ chainId: 5042002,
629
+ isTestnet: true,
630
+ explorerUrl: 'https://testnet.arcscan.app/tx/{hash}',
631
+ rpcEndpoints: ['https://rpc.testnet.arc.network/'],
632
+ eurcAddress: '0x89B50855Aa3bE2F677cD6303Cec089B5F319D72a',
633
+ usdcAddress: '0x3600000000000000000000000000000000000000',
634
+ usdtAddress: null,
635
+ cctp: {
636
+ domain: 26,
637
+ contracts: {
638
+ v2: {
639
+ type: 'split',
640
+ tokenMessenger: '0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA',
641
+ messageTransmitter: '0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275',
642
+ confirmations: 1,
643
+ fastConfirmations: 1,
644
+ },
645
+ },
646
+ forwarderSupported: {
647
+ source: true,
648
+ destination: true,
649
+ },
650
+ },
651
+ kitContracts: {
652
+ bridge: BRIDGE_CONTRACT_EVM_TESTNET,
653
+ },
654
+ });
655
+
656
+ /**
657
+ * Arbitrum Mainnet chain definition
658
+ * @remarks
659
+ * This represents the official production network for the Arbitrum blockchain.
660
+ */
661
+ const Arbitrum = defineChain({
662
+ type: 'evm',
663
+ chain: Blockchain.Arbitrum,
664
+ name: 'Arbitrum',
665
+ title: 'Arbitrum Mainnet',
666
+ nativeCurrency: {
667
+ name: 'Ether',
668
+ symbol: 'ETH',
669
+ decimals: 18,
670
+ },
671
+ chainId: 42161,
672
+ isTestnet: false,
673
+ explorerUrl: 'https://arbiscan.io/tx/{hash}',
674
+ rpcEndpoints: ['https://arb1.arbitrum.io/rpc'],
675
+ eurcAddress: null,
676
+ usdcAddress: '0xaf88d065e77c8cc2239327c5edb3a432268e5831',
677
+ usdtAddress: null,
678
+ cctp: {
679
+ domain: 3,
680
+ contracts: {
681
+ v1: {
682
+ type: 'split',
683
+ tokenMessenger: '0x19330d10D9Cc8751218eaf51E8885D058642E08A',
684
+ messageTransmitter: '0xC30362313FBBA5cf9163F0bb16a0e01f01A896ca',
685
+ confirmations: 65,
686
+ },
687
+ v2: {
688
+ type: 'split',
689
+ tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
690
+ messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
691
+ confirmations: 65,
692
+ fastConfirmations: 1,
693
+ },
694
+ },
695
+ forwarderSupported: {
696
+ source: true,
697
+ destination: true,
698
+ },
699
+ },
700
+ kitContracts: {
701
+ bridge: BRIDGE_CONTRACT_EVM_MAINNET,
702
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
703
+ },
704
+ });
705
+
706
+ /**
707
+ * Arbitrum Sepolia Testnet chain definition
708
+ * @remarks
709
+ * This represents the official test network for the Arbitrum blockchain on Sepolia.
710
+ */
711
+ const ArbitrumSepolia = defineChain({
712
+ type: 'evm',
713
+ chain: Blockchain.Arbitrum_Sepolia,
714
+ name: 'Arbitrum Sepolia',
715
+ title: 'Arbitrum Sepolia Testnet',
716
+ nativeCurrency: {
717
+ name: 'Sepolia Ether',
718
+ symbol: 'ETH',
719
+ decimals: 18,
720
+ },
721
+ chainId: 421614,
722
+ isTestnet: true,
723
+ explorerUrl: 'https://sepolia.arbiscan.io/tx/{hash}',
724
+ rpcEndpoints: ['https://sepolia-rollup.arbitrum.io/rpc'],
725
+ eurcAddress: null,
726
+ usdcAddress: '0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d',
727
+ usdtAddress: null,
728
+ cctp: {
729
+ domain: 3,
730
+ contracts: {
731
+ v1: {
732
+ type: 'split',
733
+ tokenMessenger: '0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5',
734
+ messageTransmitter: '0xaCF1ceeF35caAc005e15888dDb8A3515C41B4872',
735
+ confirmations: 65,
736
+ },
737
+ v2: {
738
+ type: 'split',
739
+ tokenMessenger: '0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA',
740
+ messageTransmitter: '0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275',
741
+ confirmations: 65,
742
+ fastConfirmations: 1,
743
+ },
744
+ },
745
+ forwarderSupported: {
746
+ source: true,
747
+ destination: true,
748
+ },
749
+ },
750
+ kitContracts: {
751
+ bridge: BRIDGE_CONTRACT_EVM_TESTNET,
752
+ },
753
+ });
754
+
755
+ /**
756
+ * Avalanche Mainnet chain definition
757
+ * @remarks
758
+ * This represents the official production network for the Avalanche blockchain.
759
+ */
760
+ const Avalanche = defineChain({
761
+ type: 'evm',
762
+ chain: Blockchain.Avalanche,
763
+ name: 'Avalanche',
764
+ title: 'Avalanche Mainnet',
765
+ nativeCurrency: {
766
+ name: 'Avalanche',
767
+ symbol: 'AVAX',
768
+ decimals: 18,
769
+ },
770
+ chainId: 43114,
771
+ isTestnet: false,
772
+ explorerUrl: 'https://subnets.avax.network/c-chain/tx/{hash}',
773
+ rpcEndpoints: ['https://api.avax.network/ext/bc/C/rpc'],
774
+ eurcAddress: '0xc891eb4cbdeff6e073e859e987815ed1505c2acd',
775
+ usdcAddress: '0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E',
776
+ usdtAddress: '0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7',
777
+ cctp: {
778
+ domain: 1,
779
+ contracts: {
780
+ v1: {
781
+ type: 'split',
782
+ tokenMessenger: '0x6b25532e1060ce10cc3b0a99e5683b91bfde6982',
783
+ messageTransmitter: '0x8186359af5f57fbb40c6b14a588d2a59c0c29880',
784
+ confirmations: 1,
785
+ },
786
+ v2: {
787
+ type: 'split',
788
+ tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
789
+ messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
790
+ confirmations: 1,
791
+ fastConfirmations: 1,
792
+ },
793
+ },
794
+ forwarderSupported: {
795
+ source: true,
796
+ destination: true,
797
+ },
798
+ },
799
+ kitContracts: {
800
+ bridge: BRIDGE_CONTRACT_EVM_MAINNET,
801
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
802
+ },
803
+ });
804
+
805
+ /**
806
+ * Avalanche Fuji Testnet chain definition
807
+ * @remarks
808
+ * This represents the official test network for the Avalanche blockchain.
809
+ */
810
+ const AvalancheFuji = defineChain({
811
+ type: 'evm',
812
+ chain: Blockchain.Avalanche_Fuji,
813
+ name: 'Avalanche Fuji',
814
+ title: 'Avalanche Fuji Testnet',
815
+ nativeCurrency: {
816
+ name: 'Avalanche',
817
+ symbol: 'AVAX',
818
+ decimals: 18,
819
+ },
820
+ chainId: 43113,
821
+ isTestnet: true,
822
+ explorerUrl: 'https://subnets-test.avax.network/c-chain/tx/{hash}',
823
+ eurcAddress: '0x5e44db7996c682e92a960b65ac713a54ad815c6b',
824
+ usdcAddress: '0x5425890298aed601595a70ab815c96711a31bc65',
825
+ usdtAddress: null,
826
+ cctp: {
827
+ domain: 1,
828
+ contracts: {
829
+ v1: {
830
+ type: 'split',
831
+ tokenMessenger: '0xeb08f243e5d3fcff26a9e38ae5520a669f4019d0',
832
+ messageTransmitter: '0xa9fb1b3009dcb79e2fe346c16a604b8fa8ae0a79',
833
+ confirmations: 1,
834
+ },
835
+ v2: {
836
+ type: 'split',
837
+ tokenMessenger: '0x8fe6b999dc680ccfdd5bf7eb0974218be2542daa',
838
+ messageTransmitter: '0xe737e5cebeeba77efe34d4aa090756590b1ce275',
839
+ confirmations: 1,
840
+ fastConfirmations: 1,
841
+ },
842
+ },
843
+ forwarderSupported: {
844
+ source: true,
845
+ destination: true,
846
+ },
847
+ },
848
+ rpcEndpoints: ['https://api.avax-test.network/ext/bc/C/rpc'],
849
+ kitContracts: {
850
+ bridge: BRIDGE_CONTRACT_EVM_TESTNET,
851
+ },
852
+ });
853
+
854
+ /**
855
+ * Base chain definition
856
+ * @remarks
857
+ * This represents the official production network for the Base blockchain.
858
+ */
859
+ const Base = defineChain({
860
+ type: 'evm',
861
+ chain: Blockchain.Base,
862
+ name: 'Base',
863
+ title: 'Base Mainnet',
864
+ nativeCurrency: {
865
+ name: 'Ether',
866
+ symbol: 'ETH',
867
+ decimals: 18,
868
+ },
869
+ chainId: 8453,
870
+ isTestnet: false,
871
+ explorerUrl: 'https://basescan.org/tx/{hash}',
872
+ rpcEndpoints: ['https://mainnet.base.org', 'https://base.publicnode.com'],
873
+ eurcAddress: '0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42',
874
+ usdcAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
875
+ usdtAddress: null,
876
+ cctp: {
877
+ domain: 6,
878
+ contracts: {
879
+ v1: {
880
+ type: 'split',
881
+ tokenMessenger: '0x1682Ae6375C4E4A97e4B583BC394c861A46D8962',
882
+ messageTransmitter: '0xAD09780d193884d503182aD4588450C416D6F9D4',
883
+ confirmations: 65,
884
+ },
885
+ v2: {
886
+ type: 'split',
887
+ tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
888
+ messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
889
+ confirmations: 65,
890
+ fastConfirmations: 1,
891
+ },
892
+ },
893
+ forwarderSupported: {
894
+ source: true,
895
+ destination: true,
896
+ },
897
+ },
898
+ kitContracts: {
899
+ bridge: BRIDGE_CONTRACT_EVM_MAINNET,
900
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
901
+ },
902
+ });
903
+
904
+ /**
905
+ * Base Sepolia Testnet chain definition
906
+ * @remarks
907
+ * This represents the official test network for the Base blockchain on Sepolia.
908
+ */
909
+ const BaseSepolia = defineChain({
910
+ type: 'evm',
911
+ chain: Blockchain.Base_Sepolia,
912
+ name: 'Base Sepolia',
913
+ title: 'Base Sepolia Testnet',
914
+ nativeCurrency: {
915
+ name: 'Sepolia Ether',
916
+ symbol: 'ETH',
917
+ decimals: 18,
918
+ },
919
+ chainId: 84532,
920
+ isTestnet: true,
921
+ explorerUrl: 'https://sepolia.basescan.org/tx/{hash}',
922
+ rpcEndpoints: ['https://sepolia.base.org'],
923
+ eurcAddress: '0x808456652fdb597867f38412077A9182bf77359F',
924
+ usdcAddress: '0x036CbD53842c5426634e7929541eC2318f3dCF7e',
925
+ usdtAddress: null,
926
+ cctp: {
927
+ domain: 6,
928
+ contracts: {
929
+ v1: {
930
+ type: 'split',
931
+ tokenMessenger: '0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5',
932
+ messageTransmitter: '0x7865fAfC2db2093669d92c0F33AeEF291086BEFD',
933
+ confirmations: 65,
934
+ },
935
+ v2: {
936
+ type: 'split',
937
+ tokenMessenger: '0x8fe6b999dc680ccfdd5bf7eb0974218be2542daa',
938
+ messageTransmitter: '0xe737e5cebeeba77efe34d4aa090756590b1ce275',
939
+ confirmations: 65,
940
+ fastConfirmations: 1,
941
+ },
942
+ },
943
+ forwarderSupported: {
944
+ source: true,
945
+ destination: true,
946
+ },
947
+ },
948
+ kitContracts: {
949
+ bridge: BRIDGE_CONTRACT_EVM_TESTNET,
950
+ },
951
+ });
952
+
953
+ /**
954
+ * Celo Mainnet chain definition
955
+ * @remarks
956
+ * This represents the official production network for the Celo blockchain.
957
+ */
958
+ defineChain({
959
+ type: 'evm',
960
+ chain: Blockchain.Celo,
961
+ name: 'Celo',
962
+ title: 'Celo Mainnet',
963
+ nativeCurrency: {
964
+ name: 'Celo',
965
+ symbol: 'CELO',
966
+ decimals: 18,
967
+ },
968
+ chainId: 42220,
969
+ isTestnet: false,
970
+ explorerUrl: 'https://celoscan.io/tx/{hash}',
971
+ rpcEndpoints: ['https://forno.celo.org'],
972
+ eurcAddress: null,
973
+ usdcAddress: '0xcebA9300f2b948710d2653dD7B07f33A8B32118C',
974
+ usdtAddress: '0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e',
975
+ cctp: null,
976
+ });
977
+
978
+ /**
979
+ * Celo Alfajores Testnet chain definition
980
+ * @remarks
981
+ * This represents the official test network for the Celo blockchain.
982
+ */
983
+ defineChain({
984
+ type: 'evm',
985
+ chain: Blockchain.Celo_Alfajores_Testnet,
986
+ name: 'Celo Alfajores',
987
+ title: 'Celo Alfajores Testnet',
988
+ nativeCurrency: {
989
+ name: 'Celo',
990
+ symbol: 'CELO',
991
+ decimals: 18,
992
+ },
993
+ chainId: 44787,
994
+ isTestnet: true,
995
+ explorerUrl: 'https://alfajores.celoscan.io/tx/{hash}',
996
+ rpcEndpoints: ['https://alfajores-forno.celo-testnet.org'],
997
+ eurcAddress: null,
998
+ usdcAddress: '0x2F25deB3848C207fc8E0c34035B3Ba7fC157602B',
999
+ usdtAddress: null,
1000
+ cctp: null,
1001
+ });
1002
+
1003
+ /**
1004
+ * Codex Mainnet chain definition
1005
+ * @remarks
1006
+ * This represents the main network for the Codex blockchain.
1007
+ */
1008
+ const Codex = defineChain({
1009
+ type: 'evm',
1010
+ chain: Blockchain.Codex,
1011
+ name: 'Codex Mainnet',
1012
+ title: 'Codex Mainnet',
1013
+ nativeCurrency: {
1014
+ name: 'ETH',
1015
+ symbol: 'ETH',
1016
+ decimals: 18,
1017
+ },
1018
+ chainId: 81224,
1019
+ isTestnet: false,
1020
+ explorerUrl: 'https://explorer.codex.xyz/tx/{hash}',
1021
+ rpcEndpoints: ['https://rpc.codex.xyz'],
1022
+ eurcAddress: null,
1023
+ usdcAddress: '0xd996633a415985DBd7D6D12f4A4343E31f5037cf',
1024
+ usdtAddress: null,
1025
+ cctp: {
1026
+ domain: 12,
1027
+ contracts: {
1028
+ v2: {
1029
+ type: 'split',
1030
+ tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
1031
+ messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
1032
+ confirmations: 65,
1033
+ fastConfirmations: 1,
1034
+ },
1035
+ },
1036
+ forwarderSupported: {
1037
+ source: true,
1038
+ destination: false,
1039
+ },
1040
+ },
1041
+ kitContracts: {
1042
+ bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1043
+ },
1044
+ });
1045
+
1046
+ /**
1047
+ * Codex Testnet chain definition
1048
+ * @remarks
1049
+ * This represents the test network for the Codex blockchain.
1050
+ */
1051
+ const CodexTestnet = defineChain({
1052
+ type: 'evm',
1053
+ chain: Blockchain.Codex_Testnet,
1054
+ name: 'Codex Testnet',
1055
+ title: 'Codex Testnet',
1056
+ nativeCurrency: {
1057
+ name: 'ETH',
1058
+ symbol: 'ETH',
1059
+ decimals: 18,
1060
+ },
1061
+ chainId: 812242,
1062
+ isTestnet: true,
1063
+ explorerUrl: 'https://explorer.codex-stg.xyz/tx/{hash}',
1064
+ rpcEndpoints: ['https://rpc.codex-stg.xyz'],
1065
+ eurcAddress: null,
1066
+ usdcAddress: '0x6d7f141b6819C2c9CC2f818e6ad549E7Ca090F8f',
1067
+ usdtAddress: null,
1068
+ cctp: {
1069
+ domain: 12,
1070
+ contracts: {
1071
+ v2: {
1072
+ type: 'split',
1073
+ tokenMessenger: '0x8fe6b999dc680ccfdd5bf7eb0974218be2542daa',
1074
+ messageTransmitter: '0xe737e5cebeeba77efe34d4aa090756590b1ce275',
1075
+ confirmations: 65,
1076
+ fastConfirmations: 1,
1077
+ },
1078
+ },
1079
+ forwarderSupported: {
1080
+ source: true,
1081
+ destination: false,
1082
+ },
1083
+ },
1084
+ kitContracts: {
1085
+ bridge: BRIDGE_CONTRACT_EVM_TESTNET,
1086
+ },
1087
+ });
1088
+
1089
+ /**
1090
+ * Ethereum Mainnet chain definition
1091
+ * @remarks
1092
+ * This represents the official production network for the Ethereum blockchain.
1093
+ */
1094
+ const Ethereum = defineChain({
1095
+ type: 'evm',
1096
+ chain: Blockchain.Ethereum,
1097
+ name: 'Ethereum',
1098
+ title: 'Ethereum Mainnet',
1099
+ nativeCurrency: {
1100
+ name: 'Ether',
1101
+ symbol: 'ETH',
1102
+ decimals: 18,
1103
+ },
1104
+ chainId: 1,
1105
+ isTestnet: false,
1106
+ explorerUrl: 'https://etherscan.io/tx/{hash}',
1107
+ rpcEndpoints: ['https://eth.merkle.io', 'https://ethereum.publicnode.com'],
1108
+ eurcAddress: '0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c',
1109
+ usdcAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
1110
+ usdtAddress: '0xdac17f958d2ee523a2206206994597c13d831ec7',
1111
+ cctp: {
1112
+ domain: 0,
1113
+ contracts: {
1114
+ v1: {
1115
+ type: 'split',
1116
+ tokenMessenger: '0xbd3fa81b58ba92a82136038b25adec7066af3155',
1117
+ messageTransmitter: '0x0a992d191deec32afe36203ad87d7d289a738f81',
1118
+ confirmations: 65,
1119
+ },
1120
+ v2: {
1121
+ type: 'split',
1122
+ tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
1123
+ messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
1124
+ confirmations: 65,
1125
+ fastConfirmations: 2,
1126
+ },
1127
+ },
1128
+ forwarderSupported: {
1129
+ source: true,
1130
+ destination: true,
1131
+ },
1132
+ },
1133
+ kitContracts: {
1134
+ bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1135
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1136
+ },
1137
+ });
1138
+
1139
+ /**
1140
+ * Ethereum Sepolia Testnet chain definition
1141
+ * @remarks
1142
+ * This represents the official test network for the Ethereum blockchain on Sepolia.
1143
+ */
1144
+ const EthereumSepolia = defineChain({
1145
+ type: 'evm',
1146
+ chain: Blockchain.Ethereum_Sepolia,
1147
+ name: 'Ethereum Sepolia',
1148
+ title: 'Ethereum Sepolia Testnet',
1149
+ nativeCurrency: {
1150
+ name: 'Sepolia Ether',
1151
+ symbol: 'ETH',
1152
+ decimals: 18,
1153
+ },
1154
+ chainId: 11155111,
1155
+ isTestnet: true,
1156
+ explorerUrl: 'https://sepolia.etherscan.io/tx/{hash}',
1157
+ rpcEndpoints: ['https://sepolia.drpc.org'],
1158
+ eurcAddress: '0x08210F9170F89Ab7658F0B5E3fF39b0E03C594D4',
1159
+ usdcAddress: '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238',
1160
+ usdtAddress: null,
1161
+ cctp: {
1162
+ domain: 0,
1163
+ contracts: {
1164
+ v1: {
1165
+ type: 'split',
1166
+ tokenMessenger: '0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5',
1167
+ messageTransmitter: '0x7865fAfC2db2093669d92c0F33AeEF291086BEFD',
1168
+ confirmations: 65,
1169
+ },
1170
+ v2: {
1171
+ type: 'split',
1172
+ tokenMessenger: '0x8fe6b999dc680ccfdd5bf7eb0974218be2542daa',
1173
+ messageTransmitter: '0xe737e5cebeeba77efe34d4aa090756590b1ce275',
1174
+ confirmations: 65,
1175
+ fastConfirmations: 2,
1176
+ },
1177
+ },
1178
+ forwarderSupported: {
1179
+ source: true,
1180
+ destination: true,
1181
+ },
1182
+ },
1183
+ kitContracts: {
1184
+ bridge: BRIDGE_CONTRACT_EVM_TESTNET,
1185
+ },
1186
+ });
1187
+
1188
+ /**
1189
+ * Hedera Mainnet chain definition
1190
+ * @remarks
1191
+ * This represents the official production network for the Hedera blockchain.
1192
+ */
1193
+ defineChain({
1194
+ type: 'hedera',
1195
+ chain: Blockchain.Hedera,
1196
+ name: 'Hedera',
1197
+ title: 'Hedera Mainnet',
1198
+ nativeCurrency: {
1199
+ name: 'HBAR',
1200
+ symbol: 'HBAR',
1201
+ decimals: 18,
1202
+ },
1203
+ isTestnet: false,
1204
+ explorerUrl: 'https://hashscan.io/mainnet/transaction/{hash}', // Note: Hedera uses `transaction_id`, not hash. Format is typically `0.0.X-YYYY...`.
1205
+ rpcEndpoints: ['https://mainnet.hashio.io/api'],
1206
+ eurcAddress: null,
1207
+ usdcAddress: '0.0.456858',
1208
+ usdtAddress: null,
1209
+ cctp: null,
1210
+ });
1211
+
1212
+ /**
1213
+ * Hedera Testnet chain definition
1214
+ * @remarks
1215
+ * This represents the official test network for the Hedera blockchain.
1216
+ */
1217
+ defineChain({
1218
+ type: 'hedera',
1219
+ chain: Blockchain.Hedera_Testnet,
1220
+ name: 'Hedera Testnet',
1221
+ title: 'Hedera Test Network',
1222
+ nativeCurrency: {
1223
+ name: 'HBAR',
1224
+ symbol: 'HBAR',
1225
+ decimals: 18,
1226
+ },
1227
+ isTestnet: true,
1228
+ explorerUrl: 'https://hashscan.io/testnet/transaction/{hash}', // Note: Hedera uses `transaction_id`, not hash. Format is typically `0.0.X-YYYY...`.
1229
+ rpcEndpoints: ['https://testnet.hashio.io/api'],
1230
+ eurcAddress: null,
1231
+ usdcAddress: '0.0.429274',
1232
+ usdtAddress: null,
1233
+ cctp: null,
1234
+ });
1235
+
1236
+ /**
1237
+ * HyperEVM Mainnet chain definition
1238
+ * @remarks
1239
+ * This represents the official production network for the HyperEVM blockchain.
1240
+ * HyperEVM is a Layer 1 blockchain specialized for DeFi and trading applications
1241
+ * with native orderbook and matching engine.
1242
+ */
1243
+ const HyperEVM = defineChain({
1244
+ type: 'evm',
1245
+ chain: Blockchain.HyperEVM,
1246
+ name: 'HyperEVM',
1247
+ title: 'HyperEVM Mainnet',
1248
+ nativeCurrency: {
1249
+ name: 'Hype',
1250
+ symbol: 'HYPE',
1251
+ decimals: 18,
1252
+ },
1253
+ chainId: 999,
1254
+ isTestnet: false,
1255
+ explorerUrl: 'https://hyperevmscan.io/tx/{hash}',
1256
+ rpcEndpoints: ['https://rpc.hyperliquid.xyz/evm'],
1257
+ eurcAddress: null,
1258
+ usdcAddress: '0xb88339CB7199b77E23DB6E890353E22632Ba630f',
1259
+ usdtAddress: null,
1260
+ cctp: {
1261
+ domain: 19,
1262
+ contracts: {
1263
+ v2: {
1264
+ type: 'split',
1265
+ tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
1266
+ messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
1267
+ confirmations: 1,
1268
+ fastConfirmations: 1,
1269
+ },
1270
+ },
1271
+ forwarderSupported: {
1272
+ source: true,
1273
+ destination: true,
1274
+ },
1275
+ },
1276
+ kitContracts: {
1277
+ bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1278
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1279
+ },
1280
+ });
1281
+
1282
+ /**
1283
+ * HyperEVM Testnet chain definition
1284
+ * @remarks
1285
+ * This represents the official testnet for the HyperEVM blockchain.
1286
+ * Used for development and testing purposes before deploying to mainnet.
1287
+ */
1288
+ const HyperEVMTestnet = defineChain({
1289
+ type: 'evm',
1290
+ chain: Blockchain.HyperEVM_Testnet,
1291
+ name: 'HyperEVM Testnet',
1292
+ title: 'HyperEVM Test Network',
1293
+ nativeCurrency: {
1294
+ name: 'Hype',
1295
+ symbol: 'HYPE',
1296
+ decimals: 18,
1297
+ },
1298
+ chainId: 998,
1299
+ isTestnet: true,
1300
+ explorerUrl: 'https://testnet.hyperliquid.xyz/explorer/tx/{hash}',
1301
+ rpcEndpoints: ['https://rpc.hyperliquid-testnet.xyz/evm'],
1302
+ eurcAddress: null,
1303
+ usdcAddress: '0x2B3370eE501B4a559b57D449569354196457D8Ab',
1304
+ usdtAddress: null,
1305
+ cctp: {
1306
+ domain: 19,
1307
+ contracts: {
1308
+ v2: {
1309
+ type: 'split',
1310
+ tokenMessenger: '0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA',
1311
+ messageTransmitter: '0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275',
1312
+ confirmations: 1,
1313
+ fastConfirmations: 1,
1314
+ },
1315
+ },
1316
+ forwarderSupported: {
1317
+ source: true,
1318
+ destination: true,
1319
+ },
1320
+ },
1321
+ kitContracts: {
1322
+ bridge: BRIDGE_CONTRACT_EVM_TESTNET,
1323
+ },
1324
+ });
1325
+
1326
+ /**
1327
+ * Ink Mainnet chain definition
1328
+ * @remarks
1329
+ * This represents the official production network for the Ink blockchain.
1330
+ * Ink is a Layer 1 blockchain specialized for DeFi and trading applications
1331
+ * with native orderbook and matching engine.
1332
+ */
1333
+ const Ink = defineChain({
1334
+ type: 'evm',
1335
+ chain: Blockchain.Ink,
1336
+ name: 'Ink',
1337
+ title: 'Ink Mainnet',
1338
+ nativeCurrency: {
1339
+ name: 'Ether',
1340
+ symbol: 'ETH',
1341
+ decimals: 18,
1342
+ },
1343
+ chainId: 57073,
1344
+ isTestnet: false,
1345
+ explorerUrl: 'https://explorer.inkonchain.com/tx/{hash}',
1346
+ rpcEndpoints: [
1347
+ 'https://rpc-gel.inkonchain.com',
1348
+ 'https://rpc-qnd.inkonchain.com',
1349
+ ],
1350
+ eurcAddress: null,
1351
+ usdcAddress: '0x2D270e6886d130D724215A266106e6832161EAEd',
1352
+ usdtAddress: null,
1353
+ cctp: {
1354
+ domain: 21,
1355
+ contracts: {
1356
+ v2: {
1357
+ type: 'split',
1358
+ tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
1359
+ messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
1360
+ confirmations: 65,
1361
+ fastConfirmations: 1,
1362
+ },
1363
+ },
1364
+ forwarderSupported: {
1365
+ source: true,
1366
+ destination: true,
1367
+ },
1368
+ },
1369
+ kitContracts: {
1370
+ bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1371
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1372
+ },
1373
+ });
1374
+
1375
+ /**
1376
+ * Ink Testnet chain definition
1377
+ * @remarks
1378
+ * This represents the official testnet for the Ink blockchain.
1379
+ * Used for development and testing purposes before deploying to mainnet.
1380
+ */
1381
+ const InkTestnet = defineChain({
1382
+ type: 'evm',
1383
+ chain: Blockchain.Ink_Testnet,
1384
+ name: 'Ink Sepolia',
1385
+ title: 'Ink Sepolia Testnet',
1386
+ nativeCurrency: {
1387
+ name: 'Sepolia Ether',
1388
+ symbol: 'ETH',
1389
+ decimals: 18,
1390
+ },
1391
+ chainId: 763373,
1392
+ isTestnet: true,
1393
+ explorerUrl: 'https://explorer-sepolia.inkonchain.com/tx/{hash}',
1394
+ rpcEndpoints: [
1395
+ 'https://rpc-gel-sepolia.inkonchain.com',
1396
+ 'https://rpc-qnd-sepolia.inkonchain.com',
1397
+ ],
1398
+ eurcAddress: null,
1399
+ usdcAddress: '0xFabab97dCE620294D2B0b0e46C68964e326300Ac',
1400
+ usdtAddress: null,
1401
+ cctp: {
1402
+ domain: 21,
1403
+ contracts: {
1404
+ v2: {
1405
+ type: 'split',
1406
+ tokenMessenger: '0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA',
1407
+ messageTransmitter: '0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275',
1408
+ confirmations: 65,
1409
+ fastConfirmations: 1,
1410
+ },
1411
+ },
1412
+ forwarderSupported: {
1413
+ source: true,
1414
+ destination: true,
1415
+ },
1416
+ },
1417
+ kitContracts: {
1418
+ bridge: BRIDGE_CONTRACT_EVM_TESTNET,
1419
+ },
1420
+ });
1421
+
1422
+ /**
1423
+ * Linea Mainnet chain definition
1424
+ * @remarks
1425
+ * This represents the official production network for the Linea blockchain.
1426
+ */
1427
+ const Linea = defineChain({
1428
+ type: 'evm',
1429
+ chain: Blockchain.Linea,
1430
+ name: 'Linea',
1431
+ title: 'Linea Mainnet',
1432
+ nativeCurrency: {
1433
+ name: 'Ether',
1434
+ symbol: 'ETH',
1435
+ decimals: 18,
1436
+ },
1437
+ chainId: 59144,
1438
+ isTestnet: false,
1439
+ explorerUrl: 'https://lineascan.build/tx/{hash}',
1440
+ rpcEndpoints: ['https://rpc.linea.build'],
1441
+ eurcAddress: null,
1442
+ usdcAddress: '0x176211869ca2b568f2a7d4ee941e073a821ee1ff',
1443
+ usdtAddress: null,
1444
+ cctp: {
1445
+ domain: 11,
1446
+ contracts: {
1447
+ v2: {
1448
+ type: 'split',
1449
+ tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
1450
+ messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
1451
+ confirmations: 1,
1452
+ fastConfirmations: 1,
1453
+ },
1454
+ },
1455
+ forwarderSupported: {
1456
+ source: true,
1457
+ destination: true,
1458
+ },
1459
+ },
1460
+ kitContracts: {
1461
+ bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1462
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1463
+ },
1464
+ });
1465
+
1466
+ /**
1467
+ * Linea Sepolia Testnet chain definition
1468
+ * @remarks
1469
+ * This represents the official test network for the Linea blockchain on Sepolia.
1470
+ */
1471
+ const LineaSepolia = defineChain({
1472
+ type: 'evm',
1473
+ chain: Blockchain.Linea_Sepolia,
1474
+ name: 'Linea Sepolia',
1475
+ title: 'Linea Sepolia Testnet',
1476
+ nativeCurrency: {
1477
+ name: 'Sepolia Ether',
1478
+ symbol: 'ETH',
1479
+ decimals: 18,
1480
+ },
1481
+ chainId: 59141,
1482
+ isTestnet: true,
1483
+ explorerUrl: 'https://sepolia.lineascan.build/tx/{hash}',
1484
+ rpcEndpoints: ['https://rpc.sepolia.linea.build'],
1485
+ eurcAddress: null,
1486
+ usdcAddress: '0xfece4462d57bd51a6a552365a011b95f0e16d9b7',
1487
+ usdtAddress: null,
1488
+ cctp: {
1489
+ domain: 11,
1490
+ contracts: {
1491
+ v2: {
1492
+ type: 'split',
1493
+ tokenMessenger: '0x8fe6b999dc680ccfdd5bf7eb0974218be2542daa',
1494
+ messageTransmitter: '0xe737e5cebeeba77efe34d4aa090756590b1ce275',
1495
+ confirmations: 1,
1496
+ fastConfirmations: 1,
1497
+ },
1498
+ },
1499
+ forwarderSupported: {
1500
+ source: true,
1501
+ destination: true,
1502
+ },
1503
+ },
1504
+ kitContracts: {
1505
+ bridge: BRIDGE_CONTRACT_EVM_TESTNET,
1506
+ },
1507
+ });
1508
+
1509
+ /**
1510
+ * Monad Mainnet chain definition
1511
+ * @remarks
1512
+ * This represents the official production network for the Monad blockchain.
1513
+ * Monad is a high-performance EVM-compatible Layer-1 blockchain featuring
1514
+ * over 10,000 TPS, sub-second finality, and near-zero gas fees.
1515
+ */
1516
+ defineChain({
1517
+ type: 'evm',
1518
+ chain: Blockchain.Monad,
1519
+ name: 'Monad',
1520
+ title: 'Monad Mainnet',
1521
+ nativeCurrency: {
1522
+ name: 'Monad',
1523
+ symbol: 'MON',
1524
+ decimals: 18,
1525
+ },
1526
+ chainId: 143,
1527
+ isTestnet: false,
1528
+ explorerUrl: 'https://monadscan.com/tx/{hash}',
1529
+ rpcEndpoints: ['https://rpc.monad.xyz'],
1530
+ eurcAddress: null,
1531
+ usdcAddress: '0x754704Bc059F8C67012fEd69BC8A327a5aafb603',
1532
+ usdtAddress: null,
1533
+ cctp: {
1534
+ domain: 15,
1535
+ contracts: {
1536
+ v2: {
1537
+ type: 'split',
1538
+ tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
1539
+ messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
1540
+ confirmations: 1,
1541
+ fastConfirmations: 1,
1542
+ },
1543
+ },
1544
+ forwarderSupported: {
1545
+ source: true,
1546
+ destination: true,
1547
+ },
1548
+ },
1549
+ kitContracts: {
1550
+ bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1551
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1552
+ },
1553
+ });
1554
+
1555
+ /**
1556
+ * Monad Testnet chain definition
1557
+ * @remarks
1558
+ * This represents the official test network for the Monad blockchain.
1559
+ * Monad is a high-performance EVM-compatible Layer-1 blockchain featuring
1560
+ * over 10,000 TPS, sub-second finality, and near-zero gas fees.
1561
+ */
1562
+ defineChain({
1563
+ type: 'evm',
1564
+ chain: Blockchain.Monad_Testnet,
1565
+ name: 'Monad Testnet',
1566
+ title: 'Monad Testnet',
1567
+ nativeCurrency: {
1568
+ name: 'Monad',
1569
+ symbol: 'MON',
1570
+ decimals: 18,
1571
+ },
1572
+ chainId: 10143,
1573
+ isTestnet: true,
1574
+ explorerUrl: 'https://testnet.monadscan.com/tx/{hash}',
1575
+ rpcEndpoints: ['https://testnet-rpc.monad.xyz'],
1576
+ eurcAddress: null,
1577
+ usdcAddress: '0x534b2f3A21130d7a60830c2Df862319e593943A3',
1578
+ usdtAddress: null,
1579
+ cctp: {
1580
+ domain: 15,
1581
+ contracts: {
1582
+ v2: {
1583
+ type: 'split',
1584
+ tokenMessenger: '0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA',
1585
+ messageTransmitter: '0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275',
1586
+ confirmations: 1,
1587
+ fastConfirmations: 1,
1588
+ },
1589
+ },
1590
+ forwarderSupported: {
1591
+ source: true,
1592
+ destination: true,
1593
+ },
1594
+ },
1595
+ kitContracts: {
1596
+ bridge: BRIDGE_CONTRACT_EVM_TESTNET,
1597
+ },
1598
+ });
1599
+
1600
+ /**
1601
+ * NEAR Protocol Mainnet chain definition
1602
+ * @remarks
1603
+ * This represents the official production network for the NEAR Protocol blockchain.
1604
+ */
1605
+ defineChain({
1606
+ type: 'near',
1607
+ chain: Blockchain.NEAR,
1608
+ name: 'NEAR Protocol',
1609
+ title: 'NEAR Mainnet',
1610
+ nativeCurrency: {
1611
+ name: 'NEAR',
1612
+ symbol: 'NEAR',
1613
+ decimals: 24,
1614
+ },
1615
+ isTestnet: false,
1616
+ explorerUrl: 'https://nearblocks.io/txns/{hash}',
1617
+ rpcEndpoints: ['https://eth-rpc.mainnet.near.org'],
1618
+ eurcAddress: null,
1619
+ usdcAddress: '17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1',
1620
+ usdtAddress: 'usdt.tether-token.near',
1621
+ cctp: null,
1622
+ });
1623
+
1624
+ /**
1625
+ * NEAR Testnet chain definition
1626
+ * @remarks
1627
+ * This represents the official test network for the NEAR Protocol blockchain.
1628
+ */
1629
+ defineChain({
1630
+ type: 'near',
1631
+ chain: Blockchain.NEAR_Testnet,
1632
+ name: 'NEAR Protocol Testnet',
1633
+ title: 'NEAR Test Network',
1634
+ nativeCurrency: {
1635
+ name: 'NEAR',
1636
+ symbol: 'NEAR',
1637
+ decimals: 24,
1638
+ },
1639
+ isTestnet: true,
1640
+ explorerUrl: 'https://testnet.nearblocks.io/txns/{hash}',
1641
+ rpcEndpoints: ['https://eth-rpc.testnet.near.org'],
1642
+ eurcAddress: null,
1643
+ usdcAddress: '3e2210e1184b45b64c8a434c0a7e7b23cc04ea7eb7a6c3c32520d03d4afcb8af',
1644
+ usdtAddress: null,
1645
+ cctp: null,
1646
+ });
1647
+
1648
+ /**
1649
+ * Noble Mainnet chain definition
1650
+ * @remarks
1651
+ * This represents the official production network for the Noble blockchain.
1652
+ */
1653
+ defineChain({
1654
+ type: 'noble',
1655
+ chain: Blockchain.Noble,
1656
+ name: 'Noble',
1657
+ title: 'Noble Mainnet',
1658
+ nativeCurrency: {
1659
+ name: 'Noble USDC',
1660
+ symbol: 'USDC',
1661
+ decimals: 6,
1662
+ },
1663
+ isTestnet: false,
1664
+ explorerUrl: 'https://www.mintscan.io/noble/tx/{hash}',
1665
+ rpcEndpoints: ['https://noble-rpc.polkachu.com'],
1666
+ eurcAddress: null,
1667
+ usdcAddress: 'uusdc',
1668
+ usdtAddress: null,
1669
+ cctp: {
1670
+ domain: 4,
1671
+ contracts: {
1672
+ v1: {
1673
+ type: 'merged',
1674
+ contract: 'noble12l2w4ugfz4m6dd73yysz477jszqnfughxvkss5',
1675
+ confirmations: 1,
1676
+ },
1677
+ },
1678
+ forwarderSupported: {
1679
+ source: false,
1680
+ destination: false,
1681
+ },
1682
+ },
1683
+ });
1684
+
1685
+ /**
1686
+ * Noble Testnet chain definition
1687
+ * @remarks
1688
+ * This represents the official test network for the Noble blockchain.
1689
+ */
1690
+ defineChain({
1691
+ type: 'noble',
1692
+ chain: Blockchain.Noble_Testnet,
1693
+ name: 'Noble Testnet',
1694
+ title: 'Noble Test Network',
1695
+ nativeCurrency: {
1696
+ name: 'Noble USDC',
1697
+ symbol: 'USDC',
1698
+ decimals: 6,
1699
+ },
1700
+ isTestnet: true,
1701
+ explorerUrl: 'https://www.mintscan.io/noble-testnet/tx/{hash}',
1702
+ rpcEndpoints: ['https://noble-testnet-rpc.polkachu.com'],
1703
+ eurcAddress: null,
1704
+ usdcAddress: 'uusdc',
1705
+ usdtAddress: null,
1706
+ cctp: {
1707
+ domain: 4,
1708
+ contracts: {
1709
+ v1: {
1710
+ type: 'merged',
1711
+ contract: 'noble12l2w4ugfz4m6dd73yysz477jszqnfughxvkss5',
1712
+ confirmations: 1,
1713
+ },
1714
+ },
1715
+ forwarderSupported: {
1716
+ source: false,
1717
+ destination: false,
1718
+ },
1719
+ },
1720
+ });
1721
+
1722
+ /**
1723
+ * Optimism Mainnet chain definition
1724
+ * @remarks
1725
+ * This represents the official production network for the Optimism blockchain.
1726
+ */
1727
+ const Optimism = defineChain({
1728
+ type: 'evm',
1729
+ chain: Blockchain.Optimism,
1730
+ name: 'Optimism',
1731
+ title: 'Optimism Mainnet',
1732
+ nativeCurrency: {
1733
+ name: 'Ether',
1734
+ symbol: 'ETH',
1735
+ decimals: 18,
1736
+ },
1737
+ chainId: 10,
1738
+ isTestnet: false,
1739
+ explorerUrl: 'https://optimistic.etherscan.io/tx/{hash}',
1740
+ rpcEndpoints: ['https://mainnet.optimism.io'],
1741
+ eurcAddress: null,
1742
+ usdcAddress: '0x0b2c639c533813f4aa9d7837caf62653d097ff85',
1743
+ usdtAddress: null,
1744
+ cctp: {
1745
+ domain: 2,
1746
+ contracts: {
1747
+ v1: {
1748
+ type: 'split',
1749
+ tokenMessenger: '0x2B4069517957735bE00ceE0fadAE88a26365528f',
1750
+ messageTransmitter: '0x0a992d191deec32afe36203ad87d7d289a738f81',
1751
+ confirmations: 65,
1752
+ },
1753
+ v2: {
1754
+ type: 'split',
1755
+ tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
1756
+ messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
1757
+ confirmations: 65,
1758
+ fastConfirmations: 1,
1759
+ },
1760
+ },
1761
+ forwarderSupported: {
1762
+ source: true,
1763
+ destination: true,
1764
+ },
1765
+ },
1766
+ kitContracts: {
1767
+ bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1768
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1769
+ },
1770
+ });
1771
+
1772
+ /**
1773
+ * Optimism Sepolia Testnet chain definition
1774
+ * @remarks
1775
+ * This represents the official test network for the Optimism blockchain on Sepolia.
1776
+ */
1777
+ const OptimismSepolia = defineChain({
1778
+ type: 'evm',
1779
+ chain: Blockchain.Optimism_Sepolia,
1780
+ name: 'Optimism Sepolia',
1781
+ title: 'Optimism Sepolia Testnet',
1782
+ nativeCurrency: {
1783
+ name: 'Sepolia Ether',
1784
+ symbol: 'ETH',
1785
+ decimals: 18,
1786
+ },
1787
+ chainId: 11155420,
1788
+ isTestnet: true,
1789
+ explorerUrl: 'https://sepolia-optimistic.etherscan.io/tx/{hash}',
1790
+ rpcEndpoints: ['https://sepolia.optimism.io'],
1791
+ eurcAddress: null,
1792
+ usdcAddress: '0x5fd84259d66Cd46123540766Be93DFE6D43130D7',
1793
+ usdtAddress: null,
1794
+ cctp: {
1795
+ domain: 2,
1796
+ contracts: {
1797
+ v1: {
1798
+ type: 'split',
1799
+ tokenMessenger: '0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5',
1800
+ messageTransmitter: '0x7865fAfC2db2093669d92c0F33AeEF291086BEFD',
1801
+ confirmations: 65,
1802
+ },
1803
+ v2: {
1804
+ type: 'split',
1805
+ tokenMessenger: '0x8fe6b999dc680ccfdd5bf7eb0974218be2542daa',
1806
+ messageTransmitter: '0xe737e5cebeeba77efe34d4aa090756590b1ce275',
1807
+ confirmations: 65,
1808
+ fastConfirmations: 1,
1809
+ },
1810
+ },
1811
+ forwarderSupported: {
1812
+ source: true,
1813
+ destination: true,
1814
+ },
1815
+ },
1816
+ kitContracts: {
1817
+ bridge: BRIDGE_CONTRACT_EVM_TESTNET,
1818
+ },
1819
+ });
1820
+
1821
+ /**
1822
+ * Plume Mainnet chain definition
1823
+ * @remarks
1824
+ * This represents the official production network for the Plume blockchain.
1825
+ * Plume is a Layer 1 blockchain specialized for DeFi and trading applications
1826
+ * with native orderbook and matching engine.
1827
+ */
1828
+ const Plume = defineChain({
1829
+ type: 'evm',
1830
+ chain: Blockchain.Plume,
1831
+ name: 'Plume',
1832
+ title: 'Plume Mainnet',
1833
+ nativeCurrency: {
1834
+ name: 'Plume',
1835
+ symbol: 'PLUME',
1836
+ decimals: 18,
1837
+ },
1838
+ chainId: 98866,
1839
+ isTestnet: false,
1840
+ explorerUrl: 'https://explorer.plume.org/tx/{hash}',
1841
+ rpcEndpoints: ['https://rpc.plume.org'],
1842
+ eurcAddress: null,
1843
+ usdcAddress: '0x222365EF19F7947e5484218551B56bb3965Aa7aF',
1844
+ usdtAddress: null,
1845
+ cctp: {
1846
+ domain: 22,
1847
+ contracts: {
1848
+ v2: {
1849
+ type: 'split',
1850
+ tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
1851
+ messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
1852
+ confirmations: 65,
1853
+ fastConfirmations: 1,
1854
+ },
1855
+ },
1856
+ forwarderSupported: {
1857
+ source: true,
1858
+ destination: false,
1859
+ },
1860
+ },
1861
+ kitContracts: {
1862
+ bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1863
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1864
+ },
1865
+ });
1866
+
1867
+ /**
1868
+ * Plume Testnet chain definition
1869
+ * @remarks
1870
+ * This represents the official testnet for the Plume blockchain.
1871
+ * Used for development and testing purposes before deploying to mainnet.
1872
+ */
1873
+ const PlumeTestnet = defineChain({
1874
+ type: 'evm',
1875
+ chain: Blockchain.Plume_Testnet,
1876
+ name: 'Plume Testnet',
1877
+ title: 'Plume Test Network',
1878
+ nativeCurrency: {
1879
+ name: 'Plume',
1880
+ symbol: 'PLUME',
1881
+ decimals: 18,
1882
+ },
1883
+ chainId: 98867,
1884
+ isTestnet: true,
1885
+ explorerUrl: 'https://testnet-explorer.plume.org/tx/{hash}',
1886
+ rpcEndpoints: ['https://testnet-rpc.plume.org'],
1887
+ eurcAddress: null,
1888
+ usdcAddress: '0xcB5f30e335672893c7eb944B374c196392C19D18',
1889
+ usdtAddress: null,
1890
+ cctp: {
1891
+ domain: 22,
1892
+ contracts: {
1893
+ v2: {
1894
+ type: 'split',
1895
+ tokenMessenger: '0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA',
1896
+ messageTransmitter: '0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275',
1897
+ confirmations: 65,
1898
+ fastConfirmations: 1,
1899
+ },
1900
+ },
1901
+ forwarderSupported: {
1902
+ source: true,
1903
+ destination: false,
1904
+ },
1905
+ },
1906
+ kitContracts: {
1907
+ bridge: BRIDGE_CONTRACT_EVM_TESTNET,
1908
+ },
1909
+ });
1910
+
1911
+ /**
1912
+ * Polkadot Asset Hub chain definition
1913
+ * @remarks
1914
+ * This represents the official asset management parachain for the Polkadot blockchain.
1915
+ */
1916
+ defineChain({
1917
+ type: 'polkadot',
1918
+ chain: Blockchain.Polkadot_Asset_Hub,
1919
+ name: 'Polkadot Asset Hub',
1920
+ title: 'Polkadot Asset Hub',
1921
+ nativeCurrency: {
1922
+ name: 'Polkadot',
1923
+ symbol: 'DOT',
1924
+ decimals: 10,
1925
+ },
1926
+ isTestnet: false,
1927
+ explorerUrl: 'https://polkadot.subscan.io/extrinsic/{hash}',
1928
+ rpcEndpoints: ['https://asset-hub-polkadot-rpc.n.dwellir.com'],
1929
+ eurcAddress: null,
1930
+ usdcAddress: '1337',
1931
+ usdtAddress: '1984',
1932
+ cctp: null,
1933
+ });
1934
+
1935
+ /**
1936
+ * Polkadot Westmint chain definition
1937
+ * @remarks
1938
+ * This represents an asset management parachain in the Polkadot ecosystem.
1939
+ */
1940
+ defineChain({
1941
+ type: 'polkadot',
1942
+ chain: Blockchain.Polkadot_Westmint,
1943
+ name: 'Polkadot Westmint',
1944
+ title: 'Polkadot Westmint',
1945
+ nativeCurrency: {
1946
+ name: 'Polkadot',
1947
+ symbol: 'DOT',
1948
+ decimals: 10,
1949
+ },
1950
+ isTestnet: false,
1951
+ explorerUrl: 'https://assethub-polkadot.subscan.io/extrinsic/{hash}',
1952
+ rpcEndpoints: ['https://westmint-rpc.polkadot.io'],
1953
+ eurcAddress: null,
1954
+ usdcAddress: 'Asset ID 31337',
1955
+ usdtAddress: null,
1956
+ cctp: null,
1957
+ });
1958
+
1959
+ /**
1960
+ * Polygon Mainnet chain definition
1961
+ * @remarks
1962
+ * This represents the official production network for the Polygon blockchain.
1963
+ */
1964
+ const Polygon = defineChain({
1965
+ type: 'evm',
1966
+ chain: Blockchain.Polygon,
1967
+ name: 'Polygon',
1968
+ title: 'Polygon Mainnet',
1969
+ nativeCurrency: {
1970
+ name: 'POL',
1971
+ symbol: 'POL',
1972
+ decimals: 18,
1973
+ },
1974
+ chainId: 137,
1975
+ isTestnet: false,
1976
+ explorerUrl: 'https://polygonscan.com/tx/{hash}',
1977
+ rpcEndpoints: ['https://polygon.publicnode.com', 'https://polygon.drpc.org'],
1978
+ eurcAddress: null,
1979
+ usdcAddress: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359',
1980
+ usdtAddress: null,
1981
+ cctp: {
1982
+ domain: 7,
1983
+ contracts: {
1984
+ v1: {
1985
+ type: 'split',
1986
+ tokenMessenger: '0x9daF8c91AEFAE50b9c0E69629D3F6Ca40cA3B3FE',
1987
+ messageTransmitter: '0xF3be9355363857F3e001be68856A2f96b4C39Ba9',
1988
+ confirmations: 200,
1989
+ },
1990
+ v2: {
1991
+ type: 'split',
1992
+ tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
1993
+ messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
1994
+ confirmations: 33,
1995
+ fastConfirmations: 13,
1996
+ },
1997
+ },
1998
+ forwarderSupported: {
1999
+ source: true,
2000
+ destination: true,
2001
+ },
2002
+ },
2003
+ kitContracts: {
2004
+ bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2005
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
2006
+ },
2007
+ });
2008
+
2009
+ /**
2010
+ * Polygon Amoy Testnet chain definition
2011
+ * @remarks
2012
+ * This represents the official test network for the Polygon blockchain.
2013
+ */
2014
+ const PolygonAmoy = defineChain({
2015
+ type: 'evm',
2016
+ chain: Blockchain.Polygon_Amoy_Testnet,
2017
+ name: 'Polygon Amoy',
2018
+ title: 'Polygon Amoy Testnet',
2019
+ nativeCurrency: {
2020
+ name: 'POL',
2021
+ symbol: 'POL',
2022
+ decimals: 18,
2023
+ },
2024
+ chainId: 80002,
2025
+ isTestnet: true,
2026
+ explorerUrl: 'https://amoy.polygonscan.com/tx/{hash}',
2027
+ rpcEndpoints: ['https://rpc-amoy.polygon.technology'],
2028
+ eurcAddress: null,
2029
+ usdcAddress: '0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582',
2030
+ usdtAddress: null,
2031
+ cctp: {
2032
+ domain: 7,
2033
+ contracts: {
2034
+ v1: {
2035
+ type: 'split',
2036
+ tokenMessenger: '0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5',
2037
+ messageTransmitter: '0x7865fAfC2db2093669d92c0F33AeEF291086BEFD',
2038
+ confirmations: 200,
2039
+ },
2040
+ v2: {
2041
+ type: 'split',
2042
+ tokenMessenger: '0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA',
2043
+ messageTransmitter: '0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275',
2044
+ confirmations: 33,
2045
+ fastConfirmations: 13,
2046
+ },
2047
+ },
2048
+ forwarderSupported: {
2049
+ source: true,
2050
+ destination: true,
2051
+ },
2052
+ },
2053
+ kitContracts: {
2054
+ bridge: BRIDGE_CONTRACT_EVM_TESTNET,
2055
+ },
2056
+ });
2057
+
2058
+ /**
2059
+ * Sei Mainnet chain definition
2060
+ * @remarks
2061
+ * This represents the official production network for the Sei blockchain.
2062
+ * Sei is a Layer 1 blockchain specialized for DeFi and trading applications
2063
+ * with native orderbook and matching engine.
2064
+ */
2065
+ const Sei = defineChain({
2066
+ type: 'evm',
2067
+ chain: Blockchain.Sei,
2068
+ name: 'Sei',
2069
+ title: 'Sei Mainnet',
2070
+ nativeCurrency: {
2071
+ name: 'Sei',
2072
+ symbol: 'SEI',
2073
+ decimals: 18,
2074
+ },
2075
+ chainId: 1329,
2076
+ isTestnet: false,
2077
+ explorerUrl: 'https://seitrace.com/tx/{hash}?chain=pacific-1',
2078
+ rpcEndpoints: ['https://evm-rpc.sei-apis.com'],
2079
+ eurcAddress: null,
2080
+ usdcAddress: '0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392',
2081
+ usdtAddress: null,
2082
+ cctp: {
2083
+ domain: 16,
2084
+ contracts: {
2085
+ v2: {
2086
+ type: 'split',
2087
+ tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
2088
+ messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
2089
+ confirmations: 1,
2090
+ fastConfirmations: 1,
2091
+ },
2092
+ },
2093
+ forwarderSupported: {
2094
+ source: true,
2095
+ destination: true,
2096
+ },
2097
+ },
2098
+ kitContracts: {
2099
+ bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2100
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
2101
+ },
2102
+ });
2103
+
2104
+ /**
2105
+ * Sei Testnet chain definition
2106
+ * @remarks
2107
+ * This represents the official testnet for the Sei blockchain.
2108
+ * Used for development and testing purposes before deploying to mainnet.
2109
+ */
2110
+ const SeiTestnet = defineChain({
2111
+ type: 'evm',
2112
+ chain: Blockchain.Sei_Testnet,
2113
+ name: 'Sei Testnet',
2114
+ title: 'Sei Test Network',
2115
+ nativeCurrency: {
2116
+ name: 'Sei',
2117
+ symbol: 'SEI',
2118
+ decimals: 18,
2119
+ },
2120
+ chainId: 1328,
2121
+ isTestnet: true,
2122
+ explorerUrl: 'https://seitrace.com/tx/{hash}?chain=atlantic-2',
2123
+ rpcEndpoints: ['https://evm-rpc-testnet.sei-apis.com'],
2124
+ eurcAddress: null,
2125
+ usdcAddress: '0x4fCF1784B31630811181f670Aea7A7bEF803eaED',
2126
+ usdtAddress: null,
2127
+ cctp: {
2128
+ domain: 16,
2129
+ contracts: {
2130
+ v2: {
2131
+ type: 'split',
2132
+ tokenMessenger: '0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA',
2133
+ messageTransmitter: '0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275',
2134
+ confirmations: 1,
2135
+ fastConfirmations: 1,
2136
+ },
2137
+ },
2138
+ forwarderSupported: {
2139
+ source: true,
2140
+ destination: true,
2141
+ },
2142
+ },
2143
+ kitContracts: {
2144
+ bridge: BRIDGE_CONTRACT_EVM_TESTNET,
2145
+ },
2146
+ });
2147
+
2148
+ /**
2149
+ * Sonic Mainnet chain definition
2150
+ * @remarks
2151
+ * This represents the official production network for the Sonic blockchain.
2152
+ */
2153
+ const Sonic = defineChain({
2154
+ type: 'evm',
2155
+ chain: Blockchain.Sonic,
2156
+ name: 'Sonic',
2157
+ title: 'Sonic Mainnet',
2158
+ nativeCurrency: {
2159
+ name: 'Sonic',
2160
+ symbol: 'S',
2161
+ decimals: 18,
2162
+ },
2163
+ chainId: 146,
2164
+ isTestnet: false,
2165
+ explorerUrl: 'https://sonicscan.org/tx/{hash}',
2166
+ rpcEndpoints: ['https://rpc.soniclabs.com'],
2167
+ eurcAddress: null,
2168
+ usdcAddress: '0x29219dd400f2Bf60E5a23d13Be72B486D4038894',
2169
+ usdtAddress: null,
2170
+ cctp: {
2171
+ domain: 13,
2172
+ contracts: {
2173
+ v2: {
2174
+ type: 'split',
2175
+ tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
2176
+ messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
2177
+ confirmations: 1,
2178
+ fastConfirmations: 1,
2179
+ },
2180
+ },
2181
+ forwarderSupported: {
2182
+ source: true,
2183
+ destination: true,
2184
+ },
2185
+ },
2186
+ kitContracts: {
2187
+ bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2188
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
2189
+ },
2190
+ });
2191
+
2192
+ /**
2193
+ * Sonic Testnet chain definition
2194
+ * @remarks
2195
+ * This represents the official test network for the Sonic blockchain.
2196
+ */
2197
+ const SonicTestnet = defineChain({
2198
+ type: 'evm',
2199
+ chain: Blockchain.Sonic_Testnet,
2200
+ name: 'Sonic Testnet',
2201
+ title: 'Sonic Testnet',
2202
+ nativeCurrency: {
2203
+ name: 'Sonic',
2204
+ symbol: 'S',
2205
+ decimals: 18,
2206
+ },
2207
+ chainId: 14601,
2208
+ isTestnet: true,
2209
+ explorerUrl: 'https://testnet.sonicscan.org/tx/{hash}',
2210
+ rpcEndpoints: ['https://rpc.testnet.soniclabs.com'],
2211
+ eurcAddress: null,
2212
+ usdcAddress: '0x0BA304580ee7c9a980CF72e55f5Ed2E9fd30Bc51',
2213
+ usdtAddress: null,
2214
+ cctp: {
2215
+ domain: 13,
2216
+ contracts: {
2217
+ v2: {
2218
+ type: 'split',
2219
+ tokenMessenger: '0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA',
2220
+ messageTransmitter: '0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275',
2221
+ confirmations: 1,
2222
+ fastConfirmations: 1,
2223
+ },
2224
+ },
2225
+ forwarderSupported: {
2226
+ source: true,
2227
+ destination: true,
2228
+ },
2229
+ },
2230
+ kitContracts: {
2231
+ bridge: BRIDGE_CONTRACT_EVM_TESTNET,
2232
+ },
2233
+ });
2234
+
2235
+ /**
2236
+ * Solana Mainnet chain definition
2237
+ * @remarks
2238
+ * This represents the official production network for the Solana blockchain.
2239
+ */
2240
+ const Solana = defineChain({
2241
+ type: 'solana',
2242
+ chain: Blockchain.Solana,
2243
+ name: 'Solana',
2244
+ title: 'Solana Mainnet',
2245
+ nativeCurrency: {
2246
+ name: 'Solana',
2247
+ symbol: 'SOL',
2248
+ decimals: 9,
2249
+ },
2250
+ isTestnet: false,
2251
+ explorerUrl: 'https://solscan.io/tx/{hash}',
2252
+ rpcEndpoints: ['https://api.mainnet-beta.solana.com'],
2253
+ eurcAddress: 'HzwqbKZw8HxMN6bF2yFZNrht3c2iXXzpKcFu7uBEDKtr',
2254
+ usdcAddress: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
2255
+ usdtAddress: 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB',
2256
+ cctp: {
2257
+ domain: 5,
2258
+ contracts: {
2259
+ v1: {
2260
+ type: 'split',
2261
+ tokenMessenger: 'CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3',
2262
+ messageTransmitter: 'CCTPmbSD7gX1bxKPAmg77w8oFzNFpaQiQUWD43TKaecd',
2263
+ confirmations: 32,
2264
+ },
2265
+ v2: {
2266
+ type: 'split',
2267
+ tokenMessenger: 'CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe',
2268
+ messageTransmitter: 'CCTPV2Sm4AdWt5296sk4P66VBZ7bEhcARwFaaS9YPbeC',
2269
+ confirmations: 32,
2270
+ fastConfirmations: 3,
2271
+ },
2272
+ },
2273
+ forwarderSupported: {
2274
+ source: true,
2275
+ destination: false,
2276
+ },
2277
+ },
2278
+ kitContracts: {
2279
+ bridge: 'DFaauJEjmiHkPs1JG89A4p95hDWi9m9SAEERY1LQJiC3',
2280
+ },
2281
+ });
2282
+
2283
+ /**
2284
+ * Solana Devnet chain definition
2285
+ * @remarks
2286
+ * This represents the development test network for the Solana blockchain.
2287
+ */
2288
+ const SolanaDevnet = defineChain({
2289
+ type: 'solana',
2290
+ chain: Blockchain.Solana_Devnet,
2291
+ name: 'Solana Devnet',
2292
+ title: 'Solana Development Network',
2293
+ nativeCurrency: {
2294
+ name: 'Solana',
2295
+ symbol: 'SOL',
2296
+ decimals: 9,
2297
+ },
2298
+ isTestnet: true,
2299
+ explorerUrl: 'https://solscan.io/tx/{hash}?cluster=devnet',
2300
+ eurcAddress: 'HzwqbKZw8HxMN6bF2yFZNrht3c2iXXzpKcFu7uBEDKtr',
2301
+ usdcAddress: '4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU',
2302
+ usdtAddress: null,
2303
+ cctp: {
2304
+ domain: 5,
2305
+ contracts: {
2306
+ v1: {
2307
+ type: 'split',
2308
+ tokenMessenger: 'CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3',
2309
+ messageTransmitter: 'CCTPmbSD7gX1bxKPAmg77w8oFzNFpaQiQUWD43TKaecd',
2310
+ confirmations: 32,
2311
+ },
2312
+ v2: {
2313
+ type: 'split',
2314
+ tokenMessenger: 'CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe',
2315
+ messageTransmitter: 'CCTPV2Sm4AdWt5296sk4P66VBZ7bEhcARwFaaS9YPbeC',
2316
+ confirmations: 32,
2317
+ fastConfirmations: 3,
2318
+ },
2319
+ },
2320
+ forwarderSupported: {
2321
+ source: true,
2322
+ destination: false,
2323
+ },
2324
+ },
2325
+ kitContracts: {
2326
+ bridge: 'DFaauJEjmiHkPs1JG89A4p95hDWi9m9SAEERY1LQJiC3',
2327
+ },
2328
+ rpcEndpoints: ['https://api.devnet.solana.com'],
2329
+ });
2330
+
2331
+ /**
2332
+ * Stellar Mainnet chain definition
2333
+ * @remarks
2334
+ * This represents the official production network for the Stellar blockchain.
2335
+ */
2336
+ defineChain({
2337
+ type: 'stellar',
2338
+ chain: Blockchain.Stellar,
2339
+ name: 'Stellar',
2340
+ title: 'Stellar Mainnet',
2341
+ nativeCurrency: {
2342
+ name: 'Stellar Lumens',
2343
+ symbol: 'XLM',
2344
+ decimals: 7,
2345
+ },
2346
+ isTestnet: false,
2347
+ explorerUrl: 'https://stellar.expert/explorer/public/tx/{hash}',
2348
+ rpcEndpoints: ['https://horizon.stellar.org'],
2349
+ eurcAddress: 'EURC-GDHU6WRG4IEQXM5NZ4BMPKOXHW76MZM4Y2IEMFDVXBSDP6SJY4ITNPP2',
2350
+ usdcAddress: 'USDC-GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN',
2351
+ usdtAddress: null,
2352
+ cctp: null,
2353
+ });
2354
+
2355
+ /**
2356
+ * Stellar Testnet chain definition
2357
+ * @remarks
2358
+ * This represents the official test network for the Stellar blockchain.
2359
+ */
2360
+ defineChain({
2361
+ type: 'stellar',
2362
+ chain: Blockchain.Stellar_Testnet,
2363
+ name: 'Stellar Testnet',
2364
+ title: 'Stellar Test Network',
2365
+ nativeCurrency: {
2366
+ name: 'Stellar Lumens',
2367
+ symbol: 'XLM',
2368
+ decimals: 7,
2369
+ },
2370
+ isTestnet: true,
2371
+ explorerUrl: 'https://stellar.expert/explorer/testnet/tx/{hash}',
2372
+ rpcEndpoints: ['https://horizon-testnet.stellar.org'],
2373
+ eurcAddress: 'EURC-GB3Q6QDZYTHWT7E5PVS3W7FUT5GVAFC5KSZFFLPU25GO7VTC3NM2ZTVO',
2374
+ usdcAddress: 'USDC-GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5',
2375
+ usdtAddress: null,
2376
+ cctp: null,
2377
+ });
2378
+
2379
+ /**
2380
+ * Sui Mainnet chain definition
2381
+ * @remarks
2382
+ * This represents the official production network for the Sui blockchain.
2383
+ */
2384
+ defineChain({
2385
+ type: 'sui',
2386
+ chain: Blockchain.Sui,
2387
+ name: 'Sui',
2388
+ title: 'Sui Mainnet',
2389
+ nativeCurrency: {
2390
+ name: 'Sui',
2391
+ symbol: 'SUI',
2392
+ decimals: 9,
2393
+ },
2394
+ isTestnet: false,
2395
+ explorerUrl: 'https://suiscan.xyz/mainnet/tx/{hash}',
2396
+ rpcEndpoints: ['https://fullnode.mainnet.sui.io'],
2397
+ eurcAddress: null,
2398
+ usdcAddress: '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC',
2399
+ usdtAddress: null,
2400
+ cctp: {
2401
+ domain: 8,
2402
+ contracts: {
2403
+ v1: {
2404
+ type: 'split',
2405
+ tokenMessenger: '0x2aa6c5d56376c371f88a6cc42e852824994993cb9bab8d3e6450cbe3cb32b94e',
2406
+ messageTransmitter: '0x08d87d37ba49e785dde270a83f8e979605b03dc552b5548f26fdf2f49bf7ed1b',
2407
+ confirmations: 1,
2408
+ },
2409
+ },
2410
+ forwarderSupported: {
2411
+ source: false,
2412
+ destination: false,
2413
+ },
2414
+ },
2415
+ });
2416
+
2417
+ /**
2418
+ * Sui Testnet chain definition
2419
+ * @remarks
2420
+ * This represents the official test network for the Sui blockchain.
2421
+ */
2422
+ defineChain({
2423
+ type: 'sui',
2424
+ chain: Blockchain.Sui_Testnet,
2425
+ name: 'Sui Testnet',
2426
+ title: 'Sui Test Network',
2427
+ nativeCurrency: {
2428
+ name: 'Sui',
2429
+ symbol: 'SUI',
2430
+ decimals: 9,
2431
+ },
2432
+ isTestnet: true,
2433
+ explorerUrl: 'https://suiscan.xyz/testnet/tx/{hash}',
2434
+ rpcEndpoints: ['https://fullnode.testnet.sui.io'],
2435
+ eurcAddress: null,
2436
+ usdcAddress: '0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29::usdc::USDC',
2437
+ usdtAddress: null,
2438
+ cctp: {
2439
+ domain: 8,
2440
+ contracts: {
2441
+ v1: {
2442
+ type: 'split',
2443
+ tokenMessenger: '0x31cc14d80c175ae39777c0238f20594c6d4869cfab199f40b69f3319956b8beb',
2444
+ messageTransmitter: '0x4931e06dce648b3931f890035bd196920770e913e43e45990b383f6486fdd0a5',
2445
+ confirmations: 1,
2446
+ },
2447
+ },
2448
+ forwarderSupported: {
2449
+ source: false,
2450
+ destination: false,
2451
+ },
2452
+ },
2453
+ });
2454
+
2455
+ /**
2456
+ * Unichain Mainnet chain definition
2457
+ * @remarks
2458
+ * This represents the official production network for the Unichain blockchain.
2459
+ */
2460
+ const Unichain = defineChain({
2461
+ type: 'evm',
2462
+ chain: Blockchain.Unichain,
2463
+ name: 'Unichain',
2464
+ title: 'Unichain Mainnet',
2465
+ nativeCurrency: {
2466
+ name: 'Uni',
2467
+ symbol: 'UNI',
2468
+ decimals: 18,
2469
+ },
2470
+ chainId: 130,
2471
+ isTestnet: false,
2472
+ explorerUrl: 'https://unichain.blockscout.com/tx/{hash}',
2473
+ rpcEndpoints: ['https://mainnet.unichain.org'],
2474
+ eurcAddress: null,
2475
+ usdcAddress: '0x078D782b760474a361dDA0AF3839290b0EF57AD6',
2476
+ usdtAddress: null,
2477
+ cctp: {
2478
+ domain: 10,
2479
+ contracts: {
2480
+ v1: {
2481
+ type: 'split',
2482
+ tokenMessenger: '0x4e744b28E787c3aD0e810eD65A24461D4ac5a762',
2483
+ messageTransmitter: '0x353bE9E2E38AB1D19104534e4edC21c643Df86f4',
2484
+ confirmations: 65,
2485
+ },
2486
+ v2: {
2487
+ type: 'split',
2488
+ tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
2489
+ messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
2490
+ confirmations: 65,
2491
+ fastConfirmations: 1,
2492
+ },
2493
+ },
2494
+ forwarderSupported: {
2495
+ source: true,
2496
+ destination: true,
2497
+ },
2498
+ },
2499
+ kitContracts: {
2500
+ bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2501
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
2502
+ },
2503
+ });
2504
+
2505
+ /**
2506
+ * Unichain Sepolia Testnet chain definition
2507
+ * @remarks
2508
+ * This represents the official test network for the Unichain blockchain.
2509
+ */
2510
+ const UnichainSepolia = defineChain({
2511
+ type: 'evm',
2512
+ chain: Blockchain.Unichain_Sepolia,
2513
+ name: 'Unichain Sepolia',
2514
+ title: 'Unichain Sepolia Testnet',
2515
+ nativeCurrency: {
2516
+ name: 'Sepolia Uni',
2517
+ symbol: 'UNI',
2518
+ decimals: 18,
2519
+ },
2520
+ chainId: 1301,
2521
+ isTestnet: true,
2522
+ explorerUrl: 'https://unichain-sepolia.blockscout.com/tx/{hash}',
2523
+ rpcEndpoints: ['https://sepolia.unichain.org'],
2524
+ eurcAddress: null,
2525
+ usdcAddress: '0x31d0220469e10c4E71834a79b1f276d740d3768F',
2526
+ usdtAddress: null,
2527
+ cctp: {
2528
+ domain: 10,
2529
+ contracts: {
2530
+ v1: {
2531
+ type: 'split',
2532
+ tokenMessenger: '0x8ed94B8dAd2Dc5453862ea5e316A8e71AAed9782',
2533
+ messageTransmitter: '0xbc498c326533d675cf571B90A2Ced265ACb7d086',
2534
+ confirmations: 65,
2535
+ },
2536
+ v2: {
2537
+ type: 'split',
2538
+ tokenMessenger: '0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA',
2539
+ messageTransmitter: '0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275',
2540
+ confirmations: 65,
2541
+ fastConfirmations: 1,
2542
+ },
2543
+ },
2544
+ forwarderSupported: {
2545
+ source: true,
2546
+ destination: true,
2547
+ },
2548
+ },
2549
+ kitContracts: {
2550
+ bridge: BRIDGE_CONTRACT_EVM_TESTNET,
2551
+ },
2552
+ });
2553
+
2554
+ /**
2555
+ * World Chain chain definition
2556
+ * @remarks
2557
+ * This represents the main network for the World Chain blockchain.
2558
+ */
2559
+ const WorldChain = defineChain({
2560
+ type: 'evm',
2561
+ chain: Blockchain.World_Chain,
2562
+ name: 'World Chain',
2563
+ title: 'World Chain',
2564
+ nativeCurrency: {
2565
+ name: 'Ether',
2566
+ symbol: 'ETH',
2567
+ decimals: 18,
2568
+ },
2569
+ chainId: 480,
2570
+ isTestnet: false,
2571
+ explorerUrl: 'https://worldscan.org/tx/{hash}',
2572
+ rpcEndpoints: ['https://worldchain-mainnet.g.alchemy.com/public'],
2573
+ eurcAddress: null,
2574
+ usdcAddress: '0x79A02482A880bCE3F13e09Da970dC34db4CD24d1',
2575
+ usdtAddress: null,
2576
+ cctp: {
2577
+ domain: 14,
2578
+ contracts: {
2579
+ v2: {
2580
+ type: 'split',
2581
+ tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cF5d',
2582
+ messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
2583
+ confirmations: 65,
2584
+ fastConfirmations: 1,
2585
+ },
2586
+ },
2587
+ forwarderSupported: {
2588
+ source: true,
2589
+ destination: true,
2590
+ },
2591
+ },
2592
+ kitContracts: {
2593
+ bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2594
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
2595
+ },
2596
+ });
2597
+
2598
+ /**
2599
+ * World Chain Sepolia chain definition
2600
+ * @remarks
2601
+ * This represents the test network for the World Chain blockchain.
2602
+ */
2603
+ const WorldChainSepolia = defineChain({
2604
+ type: 'evm',
2605
+ chain: Blockchain.World_Chain_Sepolia,
2606
+ name: 'World Chain Sepolia',
2607
+ title: 'World Chain Sepolia',
2608
+ nativeCurrency: {
2609
+ name: 'Ether',
2610
+ symbol: 'ETH',
2611
+ decimals: 18,
2612
+ },
2613
+ chainId: 4801,
2614
+ isTestnet: true,
2615
+ explorerUrl: 'https://sepolia.worldscan.org/tx/{hash}',
2616
+ rpcEndpoints: [
2617
+ 'https://worldchain-sepolia.drpc.org',
2618
+ 'https://worldchain-sepolia.g.alchemy.com/public',
2619
+ ],
2620
+ eurcAddress: null,
2621
+ usdcAddress: '0x66145f38cBAC35Ca6F1Dfb4914dF98F1614aeA88',
2622
+ usdtAddress: null,
2623
+ cctp: {
2624
+ domain: 14,
2625
+ contracts: {
2626
+ v2: {
2627
+ type: 'split',
2628
+ tokenMessenger: '0x8fe6b999dc680ccfdd5bf7eb0974218be2542daa',
2629
+ messageTransmitter: '0xe737e5cebeeba77efe34d4aa090756590b1ce275',
2630
+ confirmations: 65,
2631
+ fastConfirmations: 1,
2632
+ },
2633
+ },
2634
+ forwarderSupported: {
2635
+ source: true,
2636
+ destination: true,
2637
+ },
2638
+ },
2639
+ kitContracts: {
2640
+ bridge: BRIDGE_CONTRACT_EVM_TESTNET,
2641
+ },
2642
+ });
2643
+
2644
+ /**
2645
+ * XDC Mainnet chain definition
2646
+ * @remarks
2647
+ * This represents the official production network for the XDC blockchain.
2648
+ * XDC is a Layer 1 blockchain specialized for DeFi and trading applications
2649
+ * with native orderbook and matching engine.
2650
+ */
2651
+ const XDC = defineChain({
2652
+ type: 'evm',
2653
+ chain: Blockchain.XDC,
2654
+ name: 'XDC',
2655
+ title: 'XDC Mainnet',
2656
+ nativeCurrency: {
2657
+ name: 'XDC',
2658
+ symbol: 'XDC',
2659
+ decimals: 18,
2660
+ },
2661
+ chainId: 50,
2662
+ isTestnet: false,
2663
+ explorerUrl: 'https://xdcscan.io/tx/{hash}',
2664
+ rpcEndpoints: ['https://erpc.xdcrpc.com', 'https://erpc.xinfin.network'],
2665
+ eurcAddress: null,
2666
+ usdcAddress: '0xfA2958CB79b0491CC627c1557F441eF849Ca8eb1',
2667
+ usdtAddress: null,
2668
+ cctp: {
2669
+ domain: 18,
2670
+ contracts: {
2671
+ v2: {
2672
+ type: 'split',
2673
+ tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
2674
+ messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
2675
+ confirmations: 3,
2676
+ fastConfirmations: 3,
2677
+ },
2678
+ },
2679
+ forwarderSupported: {
2680
+ source: true,
2681
+ destination: false,
2682
+ },
2683
+ },
2684
+ kitContracts: {
2685
+ bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2686
+ adapter: ADAPTER_CONTRACT_EVM_MAINNET,
2687
+ },
2688
+ });
2689
+
2690
+ /**
2691
+ * XDC Apothem Testnet chain definition
2692
+ * @remarks
2693
+ * This represents the official test network for the XDC Network, known as Apothem.
2694
+ */
2695
+ const XDCApothem = defineChain({
2696
+ type: 'evm',
2697
+ chain: Blockchain.XDC_Apothem,
2698
+ name: 'Apothem Network',
2699
+ title: 'Apothem Network',
2700
+ nativeCurrency: {
2701
+ name: 'TXDC',
2702
+ symbol: 'TXDC',
2703
+ decimals: 18,
2704
+ },
2705
+ chainId: 51,
2706
+ isTestnet: true,
2707
+ explorerUrl: 'https://testnet.xdcscan.com/tx/{hash}',
2708
+ rpcEndpoints: ['https://erpc.apothem.network'],
2709
+ eurcAddress: null,
2710
+ usdcAddress: '0xb5AB69F7bBada22B28e79C8FFAECe55eF1c771D4',
2711
+ usdtAddress: null,
2712
+ cctp: {
2713
+ domain: 18,
2714
+ contracts: {
2715
+ v2: {
2716
+ type: 'split',
2717
+ tokenMessenger: '0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA',
2718
+ messageTransmitter: '0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275',
2719
+ confirmations: 3,
2720
+ fastConfirmations: 1,
2721
+ },
2722
+ },
2723
+ forwarderSupported: {
2724
+ source: true,
2725
+ destination: false,
2726
+ },
2727
+ },
2728
+ kitContracts: {
2729
+ bridge: BRIDGE_CONTRACT_EVM_TESTNET,
2730
+ },
2731
+ });
2732
+
2733
+ /**
2734
+ * ZKSync Era Mainnet chain definition
2735
+ * @remarks
2736
+ * This represents the official production network for the ZKSync Era blockchain.
2737
+ */
2738
+ defineChain({
2739
+ type: 'evm',
2740
+ chain: Blockchain.ZKSync_Era,
2741
+ name: 'ZKSync Era',
2742
+ title: 'ZKSync Era Mainnet',
2743
+ nativeCurrency: {
2744
+ name: 'Ether',
2745
+ symbol: 'ETH',
2746
+ decimals: 18,
2747
+ },
2748
+ chainId: 324,
2749
+ isTestnet: false,
2750
+ explorerUrl: 'https://explorer.zksync.io/tx/{hash}',
2751
+ rpcEndpoints: ['https://mainnet.era.zksync.io'],
2752
+ eurcAddress: null,
2753
+ usdcAddress: '0x1d17CBcF0D6D143135aE902365D2E5e2A16538D4',
2754
+ usdtAddress: null,
2755
+ cctp: null,
2756
+ });
2757
+
2758
+ /**
2759
+ * ZKSync Era Sepolia Testnet chain definition
2760
+ * @remarks
2761
+ * This represents the official test network for the ZKSync Era blockchain on Sepolia.
2762
+ */
2763
+ defineChain({
2764
+ type: 'evm',
2765
+ chain: Blockchain.ZKSync_Sepolia,
2766
+ name: 'ZKSync Era Sepolia',
2767
+ title: 'ZKSync Era Sepolia Testnet',
2768
+ nativeCurrency: {
2769
+ name: 'Sepolia Ether',
2770
+ symbol: 'ETH',
2771
+ decimals: 18,
2772
+ },
2773
+ chainId: 300,
2774
+ isTestnet: true,
2775
+ explorerUrl: 'https://sepolia.explorer.zksync.io/tx/{hash}',
2776
+ rpcEndpoints: ['https://sepolia.era.zksync.dev'],
2777
+ eurcAddress: null,
2778
+ usdcAddress: '0xAe045DE5638162fa134807Cb558E15A3F5A7F853',
2779
+ usdtAddress: null,
2780
+ cctp: null,
2781
+ });
2782
+
2783
+ /**
2784
+ * Base schema for common chain definition properties.
2785
+ * This contains all properties shared between EVM and non-EVM chains.
2786
+ */
2787
+ const baseChainDefinitionSchema = z.object({
2788
+ chain: z.nativeEnum(Blockchain, {
2789
+ required_error: 'Chain enum is required. Please provide a valid Blockchain enum value.',
2790
+ invalid_type_error: 'Chain must be a valid Blockchain enum value.',
2791
+ }),
2792
+ name: z.string({
2793
+ required_error: 'Chain name is required. Please provide a valid chain name.',
2794
+ invalid_type_error: 'Chain name must be a string.',
2795
+ }),
2796
+ title: z.string().optional(),
2797
+ nativeCurrency: z.object({
2798
+ name: z.string(),
2799
+ symbol: z.string(),
2800
+ decimals: z.number(),
2801
+ }),
2802
+ isTestnet: z.boolean({
2803
+ required_error: 'isTestnet is required. Please specify whether this is a testnet.',
2804
+ invalid_type_error: 'isTestnet must be a boolean.',
2805
+ }),
2806
+ explorerUrl: z.string({
2807
+ required_error: 'Explorer URL is required. Please provide a valid explorer URL.',
2808
+ invalid_type_error: 'Explorer URL must be a string.',
2809
+ }),
2810
+ rpcEndpoints: z.array(z.string()),
2811
+ eurcAddress: z.string().nullable(),
2812
+ usdcAddress: z.string().nullable(),
2813
+ usdtAddress: z.string().nullable(),
2814
+ cctp: z.any().nullable(), // We'll accept any CCTP config structure
2815
+ kitContracts: z
2816
+ .object({
2817
+ bridge: z.string().optional(),
2818
+ adapter: z.string().optional(),
2819
+ })
2820
+ .optional(),
2821
+ });
2822
+ /**
2823
+ * Zod schema for validating EVM chain definitions specifically.
2824
+ * This schema extends the base schema with EVM-specific properties.
2825
+ *
2826
+ * @example
2827
+ * ```typescript
2828
+ * import { evmChainDefinitionSchema } from '@core/chains/validation'
2829
+ * import { Blockchain } from '@core/chains'
2830
+ *
2831
+ * const ethereumChain = {
2832
+ * type: 'evm',
2833
+ * chain: Blockchain.Ethereum,
2834
+ * name: 'Ethereum',
2835
+ * chainId: 1,
2836
+ * nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
2837
+ * isTestnet: false,
2838
+ * explorerUrl: 'https://etherscan.io/tx/{hash}',
2839
+ * usdcAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
2840
+ * eurcAddress: null,
2841
+ * cctp: null
2842
+ * }
2843
+ *
2844
+ * const result = evmChainDefinitionSchema.safeParse(ethereumChain)
2845
+ * if (result.success) {
2846
+ * console.log('EVM chain definition is valid')
2847
+ * } else {
2848
+ * console.error('Validation failed:', result.error)
2849
+ * }
2850
+ * ```
2851
+ */
2852
+ const evmChainDefinitionSchema = baseChainDefinitionSchema
2853
+ .extend({
2854
+ type: z.literal('evm'),
2855
+ chainId: z.number({
2856
+ required_error: 'EVM chains must have a chainId. Please provide a valid EVM chain ID.',
2857
+ invalid_type_error: 'EVM chain ID must be a number.',
2858
+ }),
2859
+ })
2860
+ .strict(); //// Reject any additional properties not defined in the schema
2861
+ /**
2862
+ * Zod schema for validating non-EVM chain definitions.
2863
+ * This schema extends the base schema with non-EVM specific properties.
2864
+ */
2865
+ const nonEvmChainDefinitionSchema = baseChainDefinitionSchema
2866
+ .extend({
2867
+ type: z.enum([
2868
+ 'algorand',
2869
+ 'avalanche',
2870
+ 'solana',
2871
+ 'aptos',
2872
+ 'near',
2873
+ 'stellar',
2874
+ 'sui',
2875
+ 'hedera',
2876
+ 'noble',
2877
+ 'polkadot',
2878
+ ]),
2879
+ })
2880
+ .strict(); // Reject any additional properties not defined in the schema
2881
+ /**
2882
+ * Discriminated union schema for all chain definitions.
2883
+ * This schema validates different chain types based on their 'type' field.
2884
+ *
2885
+ * @example
2886
+ * ```typescript
2887
+ * import { chainDefinitionSchema } from '@core/chains/validation'
2888
+ * import { Blockchain } from '@core/chains'
2889
+ *
2890
+ * // EVM chain
2891
+ * chainDefinitionSchema.parse({
2892
+ * type: 'evm',
2893
+ * chain: Blockchain.Ethereum,
2894
+ * chainId: 1,
2895
+ * // ... other properties
2896
+ * })
2897
+ *
2898
+ * // Non-EVM chain
2899
+ * chainDefinitionSchema.parse({
2900
+ * type: 'solana',
2901
+ * chain: Blockchain.Solana,
2902
+ * // ... other properties (no chainId)
2903
+ * })
2904
+ * ```
2905
+ */
2906
+ const chainDefinitionSchema = z.discriminatedUnion('type', [
2907
+ evmChainDefinitionSchema,
2908
+ nonEvmChainDefinitionSchema,
2909
+ ]);
2910
+ /**
2911
+ * Zod schema for validating chain identifiers.
2912
+ * This schema accepts either a string blockchain identifier, a Blockchain enum value,
2913
+ * or a full ChainDefinition object.
2914
+ *
2915
+ * @example
2916
+ * ```typescript
2917
+ * import { chainIdentifierSchema } from '@core/chains/validation'
2918
+ * import { Blockchain, Ethereum } from '@core/chains'
2919
+ *
2920
+ * // All of these are valid:
2921
+ * chainIdentifierSchema.parse('Ethereum')
2922
+ * chainIdentifierSchema.parse(Blockchain.Ethereum)
2923
+ * chainIdentifierSchema.parse(Ethereum)
2924
+ * ```
2925
+ */
2926
+ z.union([
2927
+ z
2928
+ .string()
2929
+ .refine((val) => val in Blockchain, 'Must be a valid Blockchain enum value as string'),
2930
+ z.nativeEnum(Blockchain),
2931
+ chainDefinitionSchema,
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
+ ]);
2956
+ /**
2957
+ * Zod schema for validating bridge chain identifiers.
2958
+ *
2959
+ * This schema validates that the provided chain is supported for CCTPv2 bridging.
2960
+ * It accepts either a BridgeChain enum value, a string matching a BridgeChain value,
2961
+ * or a ChainDefinition for a supported chain.
2962
+ *
2963
+ * Use this schema when validating chain parameters for bridge operations to ensure
2964
+ * only CCTPv2-supported chains are accepted at runtime.
2965
+ *
2966
+ * @example
2967
+ * ```typescript
2968
+ * import { bridgeChainIdentifierSchema } from '@core/chains/validation'
2969
+ * import { BridgeChain, Chains } from '@core/chains'
2970
+ *
2971
+ * // Valid - BridgeChain enum value
2972
+ * bridgeChainIdentifierSchema.parse(BridgeChain.Ethereum)
2973
+ *
2974
+ * // Valid - string literal
2975
+ * bridgeChainIdentifierSchema.parse('Base_Sepolia')
2976
+ *
2977
+ * // Valid - ChainDefinition (validated by CCTP support)
2978
+ * bridgeChainIdentifierSchema.parse(Chains.Solana)
2979
+ *
2980
+ * // Invalid - Algorand is not in BridgeChain (throws ZodError)
2981
+ * bridgeChainIdentifierSchema.parse('Algorand')
2982
+ * ```
2983
+ *
2984
+ * @see {@link BridgeChain} for the enum of supported chains.
2985
+ */
2986
+ z.union([
2987
+ z.string().refine((val) => val in BridgeChain, (val) => ({
2988
+ message: `Chain "${val}" is not supported for bridging. Only chains in the BridgeChain enum support CCTPv2 bridging.`,
2989
+ })),
2990
+ chainDefinitionSchema.refine((chainDef) => chainDef.chain in BridgeChain, (chainDef) => ({
2991
+ message: `Chain "${chainDef.name}" (${chainDef.chain}) is not supported for bridging. Only chains in the BridgeChain enum support CCTPv2 bridging.`,
2992
+ })),
2993
+ ]);
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
+
3027
+ export { Arbitrum, ArbitrumSepolia, ArcTestnet, Avalanche, AvalancheFuji, Base, BaseSepolia, Codex, CodexTestnet, Ethereum, EthereumSepolia, HyperEVM, HyperEVMTestnet, Ink, InkTestnet, Linea, LineaSepolia, Optimism, OptimismSepolia, Plume, PlumeTestnet, Polygon, PolygonAmoy, Sei, SeiTestnet, Solana, SolanaDevnet, Sonic, SonicTestnet, Unichain, UnichainSepolia, WorldChain, WorldChainSepolia, XDC, XDCApothem };
3028
+ //# sourceMappingURL=chains.mjs.map