@circle-fin/app-kit 1.3.0 → 1.4.0

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