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