@circle-fin/app-kit 1.3.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/chains.mjs CHANGED
@@ -312,6 +312,57 @@ var BridgeChain;
312
312
  BridgeChain["XDC_Apothem"] = "XDC_Apothem";
313
313
  })(BridgeChain || (BridgeChain = {}));
314
314
  // -----------------------------------------------------------------------------
315
+ // Unified Balance Chain Enum (Gateway V1 Supported Chains)
316
+ // -----------------------------------------------------------------------------
317
+ /**
318
+ * Enumeration of blockchains that support Gateway V1 operations
319
+ * (deposit, spend, balance, delegate, removeFund).
320
+ *
321
+ * Derived from the full {@link Blockchain} enum but filtered to only
322
+ * include chains with active Gateway V1 contract support. When new chains
323
+ * gain Gateway V1 support, they are added to this enum.
324
+ *
325
+ * @enum
326
+ * @category Enums
327
+ *
328
+ * @remarks
329
+ * - This enum is the **canonical source** of Gateway-supported chains.
330
+ * - Use this enum (or its string literals) in unified-balance-kit calls
331
+ * for type safety.
332
+ *
333
+ * @see {@link Blockchain} for the complete list of all known blockchains.
334
+ * @see {@link UnifiedBalanceChainIdentifier} for the type that accepts these values.
335
+ */
336
+ var UnifiedBalanceChain;
337
+ (function (UnifiedBalanceChain) {
338
+ // Mainnet chains with Gateway V1 support
339
+ UnifiedBalanceChain["Arbitrum"] = "Arbitrum";
340
+ UnifiedBalanceChain["Avalanche"] = "Avalanche";
341
+ UnifiedBalanceChain["Base"] = "Base";
342
+ UnifiedBalanceChain["Ethereum"] = "Ethereum";
343
+ UnifiedBalanceChain["HyperEVM"] = "HyperEVM";
344
+ UnifiedBalanceChain["Optimism"] = "Optimism";
345
+ UnifiedBalanceChain["Polygon"] = "Polygon";
346
+ UnifiedBalanceChain["Sei"] = "Sei";
347
+ UnifiedBalanceChain["Solana"] = "Solana";
348
+ UnifiedBalanceChain["Sonic"] = "Sonic";
349
+ UnifiedBalanceChain["Unichain"] = "Unichain";
350
+ UnifiedBalanceChain["World_Chain"] = "World_Chain";
351
+ // Testnet chains with Gateway V1 support
352
+ UnifiedBalanceChain["Arbitrum_Sepolia"] = "Arbitrum_Sepolia";
353
+ UnifiedBalanceChain["Arc_Testnet"] = "Arc_Testnet";
354
+ UnifiedBalanceChain["Avalanche_Fuji"] = "Avalanche_Fuji";
355
+ UnifiedBalanceChain["Base_Sepolia"] = "Base_Sepolia";
356
+ UnifiedBalanceChain["Ethereum_Sepolia"] = "Ethereum_Sepolia";
357
+ UnifiedBalanceChain["HyperEVM_Testnet"] = "HyperEVM_Testnet";
358
+ UnifiedBalanceChain["Optimism_Sepolia"] = "Optimism_Sepolia";
359
+ UnifiedBalanceChain["Polygon_Amoy_Testnet"] = "Polygon_Amoy_Testnet";
360
+ UnifiedBalanceChain["Sei_Testnet"] = "Sei_Testnet";
361
+ UnifiedBalanceChain["Solana_Devnet"] = "Solana_Devnet";
362
+ UnifiedBalanceChain["Sonic_Testnet"] = "Sonic_Testnet";
363
+ UnifiedBalanceChain["Unichain_Sepolia"] = "Unichain_Sepolia";
364
+ UnifiedBalanceChain["World_Chain_Sepolia"] = "World_Chain_Sepolia";
365
+ })(UnifiedBalanceChain || (UnifiedBalanceChain = {}));
315
366
  // Earn Chain Enum
316
367
  // -----------------------------------------------------------------------------
317
368
  /**
@@ -646,6 +697,62 @@ const ADAPTER_CONTRACT_EVM_MAINNET = '0x7FB8c7260b63934d8da38aF902f87ae6e284a845
646
697
  * integrations (e.g., Arc Testnet).
647
698
  */
648
699
  const ADAPTER_CONTRACT_EVM_TESTNET = '0xBBD70b01a1CAbc96d5b7b129Ae1AAabdf50dd40b';
700
+ /**
701
+ * The GatewayWallet contract address for EVM mainnet networks.
702
+ *
703
+ * This contract manages wallet operations for Gateway transactions
704
+ * on mainnet environments across EVM-compatible chains.
705
+ */
706
+ const GATEWAY_WALLET_EVM_MAINNET = '0x77777777Dcc4d5A8B6E418Fd04D8997ef11000eE';
707
+ /**
708
+ * The GatewayMinter contract address for EVM mainnet networks.
709
+ *
710
+ * This contract handles minting operations for Gateway transactions
711
+ * on mainnet environments across EVM-compatible chains.
712
+ */
713
+ const GATEWAY_MINTER_EVM_MAINNET = '0x2222222d7164433c4C09B0b0D809a9b52C04C205';
714
+ /**
715
+ * The GatewayWallet contract address for EVM testnet networks.
716
+ *
717
+ * This contract manages wallet operations for Gateway transactions
718
+ * on testnet environments across EVM-compatible chains.
719
+ */
720
+ const GATEWAY_WALLET_EVM_TESTNET = '0x0077777d7EBA4688BDeF3E311b846F25870A19B9';
721
+ /**
722
+ * The GatewayMinter contract address for EVM testnet networks.
723
+ *
724
+ * This contract handles minting operations for Gateway transactions
725
+ * on testnet environments across EVM-compatible chains.
726
+ */
727
+ const GATEWAY_MINTER_EVM_TESTNET = '0x0022222ABE238Cc2C7Bb1f21003F0a260052475B';
728
+ /**
729
+ * The GatewayWallet program address for Solana mainnet.
730
+ *
731
+ * This program manages wallet operations for Gateway transactions
732
+ * on Solana mainnet.
733
+ */
734
+ const GATEWAY_WALLET_SOLANA_MAINNET = 'GATEwy4YxeiEbRJLwB6dXgg7q61e6zBPrMzYj5h1pRXQ';
735
+ /**
736
+ * The GatewayMinter program address for Solana mainnet.
737
+ *
738
+ * This program handles minting operations for Gateway transactions
739
+ * on Solana mainnet.
740
+ */
741
+ const GATEWAY_MINTER_SOLANA_MAINNET = 'GATEm5SoBJiSw1v2Pz1iPBgUYkXzCUJ27XSXhDfSyzVZ';
742
+ /**
743
+ * The GatewayWallet program address for Solana devnet.
744
+ *
745
+ * This program manages wallet operations for Gateway transactions
746
+ * on Solana devnet.
747
+ */
748
+ const GATEWAY_WALLET_SOLANA_DEVNET = 'GATEwdfmYNELfp5wDmmR6noSr2vHnAfBPMm2PvCzX5vu';
749
+ /**
750
+ * The GatewayMinter program address for Solana devnet.
751
+ *
752
+ * This program handles minting operations for Gateway transactions
753
+ * on Solana devnet.
754
+ */
755
+ const GATEWAY_MINTER_SOLANA_DEVNET = 'GATEmKK2ECL1brEngQZWCgMWPbvrEYqsV6u29dAaHavr';
649
756
 
650
757
  /**
651
758
  * Arc Testnet chain definition
@@ -696,6 +803,19 @@ const ArcTestnet = defineChain({
696
803
  bridge: BRIDGE_CONTRACT_EVM_TESTNET,
697
804
  adapter: ADAPTER_CONTRACT_EVM_TESTNET,
698
805
  },
806
+ gateway: {
807
+ domain: 26,
808
+ contracts: {
809
+ v1: {
810
+ wallet: GATEWAY_WALLET_EVM_TESTNET,
811
+ minter: GATEWAY_MINTER_EVM_TESTNET,
812
+ },
813
+ },
814
+ forwarderSupported: {
815
+ source: true,
816
+ destination: true,
817
+ },
818
+ },
699
819
  });
700
820
 
701
821
  /**
@@ -746,6 +866,19 @@ const Arbitrum = defineChain({
746
866
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
747
867
  adapter: ADAPTER_CONTRACT_EVM_MAINNET,
748
868
  },
869
+ gateway: {
870
+ domain: 3,
871
+ contracts: {
872
+ v1: {
873
+ wallet: GATEWAY_WALLET_EVM_MAINNET,
874
+ minter: GATEWAY_MINTER_EVM_MAINNET,
875
+ },
876
+ },
877
+ forwarderSupported: {
878
+ source: true,
879
+ destination: true,
880
+ },
881
+ },
749
882
  });
750
883
 
751
884
  /**
@@ -795,6 +928,19 @@ const ArbitrumSepolia = defineChain({
795
928
  kitContracts: {
796
929
  bridge: BRIDGE_CONTRACT_EVM_TESTNET,
797
930
  },
931
+ gateway: {
932
+ domain: 3,
933
+ contracts: {
934
+ v1: {
935
+ wallet: GATEWAY_WALLET_EVM_TESTNET,
936
+ minter: GATEWAY_MINTER_EVM_TESTNET,
937
+ },
938
+ },
939
+ forwarderSupported: {
940
+ source: true,
941
+ destination: true,
942
+ },
943
+ },
798
944
  });
799
945
 
800
946
  /**
@@ -845,6 +991,19 @@ const Avalanche = defineChain({
845
991
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
846
992
  adapter: ADAPTER_CONTRACT_EVM_MAINNET,
847
993
  },
994
+ gateway: {
995
+ domain: 1,
996
+ contracts: {
997
+ v1: {
998
+ wallet: GATEWAY_WALLET_EVM_MAINNET,
999
+ minter: GATEWAY_MINTER_EVM_MAINNET,
1000
+ },
1001
+ },
1002
+ forwarderSupported: {
1003
+ source: true,
1004
+ destination: true,
1005
+ },
1006
+ },
848
1007
  });
849
1008
 
850
1009
  /**
@@ -894,6 +1053,19 @@ const AvalancheFuji = defineChain({
894
1053
  kitContracts: {
895
1054
  bridge: BRIDGE_CONTRACT_EVM_TESTNET,
896
1055
  },
1056
+ gateway: {
1057
+ domain: 1,
1058
+ contracts: {
1059
+ v1: {
1060
+ wallet: GATEWAY_WALLET_EVM_TESTNET,
1061
+ minter: GATEWAY_MINTER_EVM_TESTNET,
1062
+ },
1063
+ },
1064
+ forwarderSupported: {
1065
+ source: true,
1066
+ destination: true,
1067
+ },
1068
+ },
897
1069
  });
898
1070
 
899
1071
  /**
@@ -944,6 +1116,19 @@ const Base = defineChain({
944
1116
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
945
1117
  adapter: ADAPTER_CONTRACT_EVM_MAINNET,
946
1118
  },
1119
+ gateway: {
1120
+ domain: 6,
1121
+ contracts: {
1122
+ v1: {
1123
+ wallet: GATEWAY_WALLET_EVM_MAINNET,
1124
+ minter: GATEWAY_MINTER_EVM_MAINNET,
1125
+ },
1126
+ },
1127
+ forwarderSupported: {
1128
+ source: true,
1129
+ destination: true,
1130
+ },
1131
+ },
947
1132
  });
948
1133
 
949
1134
  /**
@@ -993,6 +1178,19 @@ const BaseSepolia = defineChain({
993
1178
  kitContracts: {
994
1179
  bridge: BRIDGE_CONTRACT_EVM_TESTNET,
995
1180
  },
1181
+ gateway: {
1182
+ domain: 6,
1183
+ contracts: {
1184
+ v1: {
1185
+ wallet: GATEWAY_WALLET_EVM_TESTNET,
1186
+ minter: GATEWAY_MINTER_EVM_TESTNET,
1187
+ },
1188
+ },
1189
+ forwarderSupported: {
1190
+ source: true,
1191
+ destination: true,
1192
+ },
1193
+ },
996
1194
  });
997
1195
 
998
1196
  /**
@@ -1237,7 +1435,10 @@ const Ethereum = defineChain({
1237
1435
  chainId: 1,
1238
1436
  isTestnet: false,
1239
1437
  explorerUrl: 'https://etherscan.io/tx/{hash}',
1240
- rpcEndpoints: ['https://eth.merkle.io', 'https://ethereum.publicnode.com'],
1438
+ rpcEndpoints: [
1439
+ 'https://ethereum-rpc.publicnode.com',
1440
+ 'https://ethereum.publicnode.com',
1441
+ ],
1241
1442
  eurcAddress: '0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c',
1242
1443
  usdcAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
1243
1444
  usdtAddress: '0xdac17f958d2ee523a2206206994597c13d831ec7',
@@ -1267,6 +1468,19 @@ const Ethereum = defineChain({
1267
1468
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1268
1469
  adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1269
1470
  },
1471
+ gateway: {
1472
+ domain: 0,
1473
+ contracts: {
1474
+ v1: {
1475
+ wallet: GATEWAY_WALLET_EVM_MAINNET,
1476
+ minter: GATEWAY_MINTER_EVM_MAINNET,
1477
+ },
1478
+ },
1479
+ forwarderSupported: {
1480
+ source: true,
1481
+ destination: true,
1482
+ },
1483
+ },
1270
1484
  });
1271
1485
 
1272
1486
  /**
@@ -1287,7 +1501,7 @@ const EthereumSepolia = defineChain({
1287
1501
  chainId: 11155111,
1288
1502
  isTestnet: true,
1289
1503
  explorerUrl: 'https://sepolia.etherscan.io/tx/{hash}',
1290
- rpcEndpoints: ['https://sepolia.drpc.org'],
1504
+ rpcEndpoints: ['https://ethereum-sepolia-rpc.publicnode.com'],
1291
1505
  eurcAddress: '0x08210F9170F89Ab7658F0B5E3fF39b0E03C594D4',
1292
1506
  usdcAddress: '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238',
1293
1507
  usdtAddress: null,
@@ -1316,6 +1530,19 @@ const EthereumSepolia = defineChain({
1316
1530
  kitContracts: {
1317
1531
  bridge: BRIDGE_CONTRACT_EVM_TESTNET,
1318
1532
  },
1533
+ gateway: {
1534
+ domain: 0,
1535
+ contracts: {
1536
+ v1: {
1537
+ wallet: GATEWAY_WALLET_EVM_TESTNET,
1538
+ minter: GATEWAY_MINTER_EVM_TESTNET,
1539
+ },
1540
+ },
1541
+ forwarderSupported: {
1542
+ source: true,
1543
+ destination: true,
1544
+ },
1545
+ },
1319
1546
  });
1320
1547
 
1321
1548
  /**
@@ -1410,6 +1637,19 @@ const HyperEVM = defineChain({
1410
1637
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1411
1638
  adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1412
1639
  },
1640
+ gateway: {
1641
+ domain: 19,
1642
+ contracts: {
1643
+ v1: {
1644
+ wallet: GATEWAY_WALLET_EVM_MAINNET,
1645
+ minter: GATEWAY_MINTER_EVM_MAINNET,
1646
+ },
1647
+ },
1648
+ forwarderSupported: {
1649
+ source: true,
1650
+ destination: true,
1651
+ },
1652
+ },
1413
1653
  });
1414
1654
 
1415
1655
  /**
@@ -1454,6 +1694,19 @@ const HyperEVMTestnet = defineChain({
1454
1694
  kitContracts: {
1455
1695
  bridge: BRIDGE_CONTRACT_EVM_TESTNET,
1456
1696
  },
1697
+ gateway: {
1698
+ domain: 19,
1699
+ contracts: {
1700
+ v1: {
1701
+ wallet: GATEWAY_WALLET_EVM_TESTNET,
1702
+ minter: GATEWAY_MINTER_EVM_TESTNET,
1703
+ },
1704
+ },
1705
+ forwarderSupported: {
1706
+ source: true,
1707
+ destination: true,
1708
+ },
1709
+ },
1457
1710
  });
1458
1711
 
1459
1712
  /**
@@ -1988,6 +2241,19 @@ const Optimism = defineChain({
1988
2241
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
1989
2242
  adapter: ADAPTER_CONTRACT_EVM_MAINNET,
1990
2243
  },
2244
+ gateway: {
2245
+ domain: 2,
2246
+ contracts: {
2247
+ v1: {
2248
+ wallet: GATEWAY_WALLET_EVM_MAINNET,
2249
+ minter: GATEWAY_MINTER_EVM_MAINNET,
2250
+ },
2251
+ },
2252
+ forwarderSupported: {
2253
+ source: true,
2254
+ destination: true,
2255
+ },
2256
+ },
1991
2257
  });
1992
2258
 
1993
2259
  /**
@@ -2037,6 +2303,19 @@ const OptimismSepolia = defineChain({
2037
2303
  kitContracts: {
2038
2304
  bridge: BRIDGE_CONTRACT_EVM_TESTNET,
2039
2305
  },
2306
+ gateway: {
2307
+ domain: 2,
2308
+ contracts: {
2309
+ v1: {
2310
+ wallet: GATEWAY_WALLET_EVM_TESTNET,
2311
+ minter: GATEWAY_MINTER_EVM_TESTNET,
2312
+ },
2313
+ },
2314
+ forwarderSupported: {
2315
+ source: true,
2316
+ destination: true,
2317
+ },
2318
+ },
2040
2319
  });
2041
2320
 
2042
2321
  /**
@@ -2225,6 +2504,19 @@ const Polygon = defineChain({
2225
2504
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2226
2505
  adapter: ADAPTER_CONTRACT_EVM_MAINNET,
2227
2506
  },
2507
+ gateway: {
2508
+ domain: 7,
2509
+ contracts: {
2510
+ v1: {
2511
+ wallet: GATEWAY_WALLET_EVM_MAINNET,
2512
+ minter: GATEWAY_MINTER_EVM_MAINNET,
2513
+ },
2514
+ },
2515
+ forwarderSupported: {
2516
+ source: true,
2517
+ destination: true,
2518
+ },
2519
+ },
2228
2520
  });
2229
2521
 
2230
2522
  /**
@@ -2274,6 +2566,19 @@ const PolygonAmoy = defineChain({
2274
2566
  kitContracts: {
2275
2567
  bridge: BRIDGE_CONTRACT_EVM_TESTNET,
2276
2568
  },
2569
+ gateway: {
2570
+ domain: 7,
2571
+ contracts: {
2572
+ v1: {
2573
+ wallet: GATEWAY_WALLET_EVM_TESTNET,
2574
+ minter: GATEWAY_MINTER_EVM_TESTNET,
2575
+ },
2576
+ },
2577
+ forwarderSupported: {
2578
+ source: true,
2579
+ destination: true,
2580
+ },
2581
+ },
2277
2582
  });
2278
2583
 
2279
2584
  /**
@@ -2320,6 +2625,19 @@ const Sei = defineChain({
2320
2625
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2321
2626
  adapter: ADAPTER_CONTRACT_EVM_MAINNET,
2322
2627
  },
2628
+ gateway: {
2629
+ domain: 16,
2630
+ contracts: {
2631
+ v1: {
2632
+ wallet: GATEWAY_WALLET_EVM_MAINNET,
2633
+ minter: GATEWAY_MINTER_EVM_MAINNET,
2634
+ },
2635
+ },
2636
+ forwarderSupported: {
2637
+ source: true,
2638
+ destination: true,
2639
+ },
2640
+ },
2323
2641
  });
2324
2642
 
2325
2643
  /**
@@ -2364,6 +2682,19 @@ const SeiTestnet = defineChain({
2364
2682
  kitContracts: {
2365
2683
  bridge: BRIDGE_CONTRACT_EVM_TESTNET,
2366
2684
  },
2685
+ gateway: {
2686
+ domain: 16,
2687
+ contracts: {
2688
+ v1: {
2689
+ wallet: GATEWAY_WALLET_EVM_TESTNET,
2690
+ minter: GATEWAY_MINTER_EVM_TESTNET,
2691
+ },
2692
+ },
2693
+ forwarderSupported: {
2694
+ source: true,
2695
+ destination: true,
2696
+ },
2697
+ },
2367
2698
  });
2368
2699
 
2369
2700
  /**
@@ -2408,6 +2739,19 @@ const Sonic = defineChain({
2408
2739
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2409
2740
  adapter: ADAPTER_CONTRACT_EVM_MAINNET,
2410
2741
  },
2742
+ gateway: {
2743
+ domain: 13,
2744
+ contracts: {
2745
+ v1: {
2746
+ wallet: GATEWAY_WALLET_EVM_MAINNET,
2747
+ minter: GATEWAY_MINTER_EVM_MAINNET,
2748
+ },
2749
+ },
2750
+ forwarderSupported: {
2751
+ source: true,
2752
+ destination: true,
2753
+ },
2754
+ },
2411
2755
  });
2412
2756
 
2413
2757
  /**
@@ -2451,6 +2795,19 @@ const SonicTestnet = defineChain({
2451
2795
  kitContracts: {
2452
2796
  bridge: BRIDGE_CONTRACT_EVM_TESTNET,
2453
2797
  },
2798
+ gateway: {
2799
+ domain: 13,
2800
+ contracts: {
2801
+ v1: {
2802
+ wallet: GATEWAY_WALLET_EVM_TESTNET,
2803
+ minter: GATEWAY_MINTER_EVM_TESTNET,
2804
+ },
2805
+ },
2806
+ forwarderSupported: {
2807
+ source: true,
2808
+ destination: true,
2809
+ },
2810
+ },
2454
2811
  });
2455
2812
 
2456
2813
  /**
@@ -2499,6 +2856,19 @@ const Solana = defineChain({
2499
2856
  kitContracts: {
2500
2857
  bridge: 'DFaauJEjmiHkPs1JG89A4p95hDWi9m9SAEERY1LQJiC3',
2501
2858
  },
2859
+ gateway: {
2860
+ domain: 5,
2861
+ contracts: {
2862
+ v1: {
2863
+ wallet: GATEWAY_WALLET_SOLANA_MAINNET,
2864
+ minter: GATEWAY_MINTER_SOLANA_MAINNET,
2865
+ },
2866
+ },
2867
+ forwarderSupported: {
2868
+ source: true,
2869
+ destination: false,
2870
+ },
2871
+ },
2502
2872
  });
2503
2873
 
2504
2874
  /**
@@ -2547,6 +2917,19 @@ const SolanaDevnet = defineChain({
2547
2917
  bridge: 'DFaauJEjmiHkPs1JG89A4p95hDWi9m9SAEERY1LQJiC3',
2548
2918
  },
2549
2919
  rpcEndpoints: ['https://api.devnet.solana.com'],
2920
+ gateway: {
2921
+ domain: 5,
2922
+ contracts: {
2923
+ v1: {
2924
+ wallet: GATEWAY_WALLET_SOLANA_DEVNET,
2925
+ minter: GATEWAY_MINTER_SOLANA_DEVNET,
2926
+ },
2927
+ },
2928
+ forwarderSupported: {
2929
+ source: true,
2930
+ destination: false,
2931
+ },
2932
+ },
2550
2933
  });
2551
2934
 
2552
2935
  /**
@@ -2721,6 +3104,19 @@ const Unichain = defineChain({
2721
3104
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2722
3105
  adapter: ADAPTER_CONTRACT_EVM_MAINNET,
2723
3106
  },
3107
+ gateway: {
3108
+ domain: 10,
3109
+ contracts: {
3110
+ v1: {
3111
+ wallet: GATEWAY_WALLET_EVM_MAINNET,
3112
+ minter: GATEWAY_MINTER_EVM_MAINNET,
3113
+ },
3114
+ },
3115
+ forwarderSupported: {
3116
+ source: true,
3117
+ destination: true,
3118
+ },
3119
+ },
2724
3120
  });
2725
3121
 
2726
3122
  /**
@@ -2770,6 +3166,19 @@ const UnichainSepolia = defineChain({
2770
3166
  kitContracts: {
2771
3167
  bridge: BRIDGE_CONTRACT_EVM_TESTNET,
2772
3168
  },
3169
+ gateway: {
3170
+ domain: 10,
3171
+ contracts: {
3172
+ v1: {
3173
+ wallet: GATEWAY_WALLET_EVM_TESTNET,
3174
+ minter: GATEWAY_MINTER_EVM_TESTNET,
3175
+ },
3176
+ },
3177
+ forwarderSupported: {
3178
+ source: true,
3179
+ destination: true,
3180
+ },
3181
+ },
2773
3182
  });
2774
3183
 
2775
3184
  /**
@@ -2814,6 +3223,19 @@ const WorldChain = defineChain({
2814
3223
  bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2815
3224
  adapter: ADAPTER_CONTRACT_EVM_MAINNET,
2816
3225
  },
3226
+ gateway: {
3227
+ domain: 14,
3228
+ contracts: {
3229
+ v1: {
3230
+ wallet: GATEWAY_WALLET_EVM_MAINNET,
3231
+ minter: GATEWAY_MINTER_EVM_MAINNET,
3232
+ },
3233
+ },
3234
+ forwarderSupported: {
3235
+ source: true,
3236
+ destination: true,
3237
+ },
3238
+ },
2817
3239
  });
2818
3240
 
2819
3241
  /**
@@ -2860,6 +3282,19 @@ const WorldChainSepolia = defineChain({
2860
3282
  kitContracts: {
2861
3283
  bridge: BRIDGE_CONTRACT_EVM_TESTNET,
2862
3284
  },
3285
+ gateway: {
3286
+ domain: 14,
3287
+ contracts: {
3288
+ v1: {
3289
+ wallet: GATEWAY_WALLET_EVM_TESTNET,
3290
+ minter: GATEWAY_MINTER_EVM_TESTNET,
3291
+ },
3292
+ },
3293
+ forwarderSupported: {
3294
+ source: true,
3295
+ destination: true,
3296
+ },
3297
+ },
2863
3298
  });
2864
3299
 
2865
3300
  /**
@@ -3001,6 +3436,87 @@ defineChain({
3001
3436
  cctp: null,
3002
3437
  });
3003
3438
 
3439
+ /**
3440
+ * Zod schema for validating Gateway v1 contract addresses.
3441
+ *
3442
+ * @example
3443
+ * ```typescript
3444
+ * gatewayV1ContractsSchema.parse({
3445
+ * wallet: '0x1234567890abcdef1234567890abcdef12345678',
3446
+ * minter: '0xabcdef1234567890abcdef1234567890abcdef12'
3447
+ * })
3448
+ * ```
3449
+ */
3450
+ const gatewayV1ContractsSchema = z
3451
+ .object({
3452
+ wallet: z
3453
+ .string({
3454
+ required_error: 'Gateway wallet address is required. Please provide a valid contract address.',
3455
+ invalid_type_error: 'Gateway wallet address must be a string.',
3456
+ })
3457
+ .min(1, 'Gateway wallet address cannot be empty.'),
3458
+ minter: z
3459
+ .string({
3460
+ required_error: 'Gateway minter address is required. Please provide a valid contract address.',
3461
+ invalid_type_error: 'Gateway minter address must be a string.',
3462
+ })
3463
+ .min(1, 'Gateway minter address cannot be empty.'),
3464
+ })
3465
+ .strict(); // Reject any additional properties not defined in the schema
3466
+ /**
3467
+ * Zod schema for validating the versioned Gateway contracts map.
3468
+ *
3469
+ * @description Mirrors the {@link GatewayContracts} type: a partial map of
3470
+ * protocol versions to their contract addresses, following the same pattern
3471
+ * as {@link CCTPContracts}.
3472
+ *
3473
+ * @example
3474
+ * ```typescript
3475
+ * gatewayContractsSchema.parse({
3476
+ * v1: {
3477
+ * wallet: '0x1234567890abcdef1234567890abcdef12345678',
3478
+ * minter: '0xabcdef1234567890abcdef1234567890abcdef12'
3479
+ * }
3480
+ * })
3481
+ * ```
3482
+ */
3483
+ const gatewayContractsSchema = z
3484
+ .object({
3485
+ v1: gatewayV1ContractsSchema.optional(),
3486
+ })
3487
+ .strict(); // Reject any additional properties not defined in the schema
3488
+ /**
3489
+ * Zod schema for validating the full Gateway configuration.
3490
+ *
3491
+ * @description Mirrors the {@link GatewayConfig} type: a domain number plus
3492
+ * a versioned contracts map, following the same pattern as {@link CCTPConfig}.
3493
+ *
3494
+ * @example
3495
+ * ```typescript
3496
+ * gatewayConfigSchema.parse({
3497
+ * domain: 6,
3498
+ * contracts: {
3499
+ * v1: {
3500
+ * wallet: '0x1234567890abcdef1234567890abcdef12345678',
3501
+ * minter: '0xabcdef1234567890abcdef1234567890abcdef12'
3502
+ * }
3503
+ * }
3504
+ * })
3505
+ * ```
3506
+ */
3507
+ const gatewayConfigSchema = z
3508
+ .object({
3509
+ domain: z.number({
3510
+ required_error: 'Gateway domain is required. Please provide a valid domain number.',
3511
+ invalid_type_error: 'Gateway domain must be a number.',
3512
+ }),
3513
+ contracts: gatewayContractsSchema,
3514
+ forwarderSupported: z.object({
3515
+ source: z.boolean(),
3516
+ destination: z.boolean(),
3517
+ }),
3518
+ })
3519
+ .strict(); // Reject any additional properties not defined in the schema
3004
3520
  /**
3005
3521
  * Base schema for common chain definition properties.
3006
3522
  * This contains all properties shared between EVM and non-EVM chains.
@@ -3039,6 +3555,7 @@ const baseChainDefinitionSchema = z.object({
3039
3555
  adapter: z.string().optional(),
3040
3556
  })
3041
3557
  .optional(),
3558
+ gateway: gatewayConfigSchema.optional(),
3042
3559
  });
3043
3560
  /**
3044
3561
  * Zod schema for validating EVM chain definitions specifically.
@@ -3247,6 +3764,42 @@ z.union([
3247
3764
  `Supported chains: ${Object.values(EarnChain).join(', ')}`,
3248
3765
  })),
3249
3766
  ]);
3767
+ /**
3768
+ * Zod schema for validating unified balance chain identifiers.
3769
+ *
3770
+ * This schema validates that the provided chain is supported for unified balance operations.
3771
+ * It accepts either a UnifiedBalanceChain enum value, a string matching a UnifiedBalanceChain value,
3772
+ * or a ChainDefinition for a supported chain.
3773
+ *
3774
+ * Use this schema when validating chain parameters for unified balance operations to ensure
3775
+ * only Gateway V1-supported chains are accepted at runtime.
3776
+ *
3777
+ * @example
3778
+ * ```typescript
3779
+ * import { unifiedBalanceChainIdentifierSchema } from '@core/chains/validation'
3780
+ * import { UnifiedBalanceChain, Chains } from '@core/chains'
3781
+ *
3782
+ * // Valid - UnifiedBalanceChain enum value
3783
+ * unifiedBalanceChainIdentifierSchema.parse(UnifiedBalanceChain.Ethereum)
3784
+ *
3785
+ * // Valid - string literal
3786
+ * unifiedBalanceChainIdentifierSchema.parse('Ethereum')
3787
+ *
3788
+ * // Invalid - Algorand is not in UnifiedBalanceChain (throws ZodError)
3789
+ * unifiedBalanceChainIdentifierSchema.parse('Algorand')
3790
+ * ```
3791
+ *
3792
+ * @see {@link UnifiedBalanceChain} for the enum of supported chains.
3793
+ */
3794
+ const supportedUnifiedBalanceChains = Object.keys(UnifiedBalanceChain).join(', ');
3795
+ z.union([
3796
+ z.string().refine((val) => val in UnifiedBalanceChain, (val) => ({
3797
+ message: `Chain "${val}" is not supported for unified balance operations. Supported chains: ${supportedUnifiedBalanceChains}.`,
3798
+ })),
3799
+ chainDefinitionSchema.refine((chainDef) => chainDef.chain in UnifiedBalanceChain, (chainDef) => ({
3800
+ message: `Chain "${chainDef.name}" (${chainDef.chain}) is not supported for unified balance operations. Supported chains: ${supportedUnifiedBalanceChains}.`,
3801
+ })),
3802
+ ]);
3250
3803
 
3251
3804
  /**
3252
3805
  * @packageDocumentation