@circle-fin/app-kit 1.4.1 → 1.4.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @circle-fin/app-kit
2
2
 
3
+ ## 1.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix `kit.send()` and `kit.estimateSend()` when sending from a Circle Wallet. You can now pass the wallet's address in `from.address` and the transfer will go through.
8
+ - Add support for bridging USDC to and from Pharos (mainnet and testnet) via CCTP v2.
9
+ - You can now reference cirBTC by its symbol when looking up tokens on Arc Testnet (e.g. when resolving swap inputs/outputs).
10
+ - Bridge errors now expose a machine-readable `errorCategory` so apps can distinguish user rejections, wallet capability errors, and offchain vs onchain failures without string-matching.
11
+ - The block explorer URLs returned in the Sei (mainnet and testnet) chain definitions now point to the current explorers. If you derive transaction or address links from `chain.blockExplorers`, your links will now resolve correctly.
12
+
3
13
  ## 1.4.1
4
14
 
5
15
  ### Patch Changes
package/README.md CHANGED
@@ -64,9 +64,9 @@ The App Kit provides a **unified interface** for cross-chain transfers, same-cha
64
64
  - **🔧 Bring your own infrastructure**: Seamlessly integrate with your existing setup when needed
65
65
  - **🔒 Production-ready security**: Leverages Circle's CCTPv2 for bridging and trusted swap providers
66
66
  - **🚀 Developer experience**: Complete TypeScript support, comprehensive validation, and instant connectivity
67
- - **🌍 Multi-chain support**: Bridge across **41 chains** with **800 total bridge routes** through Circle's CCTPv2
68
- - **Mainnet (20 chains)**: Arbitrum, Avalanche, Base, Codex, Edge, Ethereum, HyperEVM, Ink, Linea, Monad, Morph, OP Mainnet, Plume, Polygon PoS, Sei, Solana, Sonic, Unichain, World Chain, XDC
69
- - **Testnet (21 chains)**: Arc Testnet, Arbitrum Sepolia, Avalanche Fuji, Base Sepolia, Codex Testnet, Edge Testnet, Ethereum Sepolia, HyperEVM Testnet, Ink Testnet, Linea Sepolia, Monad Testnet, Morph Testnet, OP Sepolia, Plume Testnet, Polygon PoS Amoy, Sei Testnet, Solana Devnet, Sonic Testnet, Unichain Sepolia, World Chain Sepolia, XDC Apothem
67
+ - **🌍 Multi-chain support**: Bridge across **43 chains** with **882 total bridge routes** through Circle's CCTPv2
68
+ - **Mainnet (21 chains)**: Arbitrum, Avalanche, Base, Codex, Edge, Ethereum, HyperEVM, Ink, Linea, Monad, Morph, OP Mainnet, Pharos, Plume, Polygon PoS, Sei, Solana, Sonic, Unichain, World Chain, XDC
69
+ - **Testnet (22 chains)**: Arc Testnet, Arbitrum Sepolia, Avalanche Fuji, Base Sepolia, Codex Testnet, Edge Testnet, Ethereum Sepolia, HyperEVM Testnet, Ink Testnet, Linea Sepolia, Monad Testnet, Morph Testnet, OP Sepolia, Pharos Atlantic, Plume Testnet, Polygon PoS Amoy, Sei Testnet, Solana Devnet, Sonic Testnet, Unichain Sepolia, World Chain Sepolia, XDC Apothem
70
70
  - **🔄 Swap support**: Same-chain token swaps powered by Circle's Stablecoin Service
71
71
  - **🎯 Flexible adapters**: Supporting EVM (Viem, Ethers) and Solana (@solana/web3)
72
72
  - **📡 Real-time event monitoring**: Track progress throughout the operation lifecycle
package/chains.cjs CHANGED
@@ -74,6 +74,8 @@ var Blockchain;
74
74
  Blockchain["Noble_Testnet"] = "Noble_Testnet";
75
75
  Blockchain["Optimism"] = "Optimism";
76
76
  Blockchain["Optimism_Sepolia"] = "Optimism_Sepolia";
77
+ Blockchain["Pharos"] = "Pharos";
78
+ Blockchain["Pharos_Testnet"] = "Pharos_Testnet";
77
79
  Blockchain["Polkadot_Asset_Hub"] = "Polkadot_Asset_Hub";
78
80
  Blockchain["Polkadot_Westmint"] = "Polkadot_Westmint";
79
81
  Blockchain["Plume"] = "Plume";
@@ -282,6 +284,7 @@ var BridgeChain;
282
284
  BridgeChain["Monad"] = "Monad";
283
285
  BridgeChain["Morph"] = "Morph";
284
286
  BridgeChain["Optimism"] = "Optimism";
287
+ BridgeChain["Pharos"] = "Pharos";
285
288
  BridgeChain["Plume"] = "Plume";
286
289
  BridgeChain["Polygon"] = "Polygon";
287
290
  BridgeChain["Sei"] = "Sei";
@@ -304,6 +307,7 @@ var BridgeChain;
304
307
  BridgeChain["Monad_Testnet"] = "Monad_Testnet";
305
308
  BridgeChain["Morph_Testnet"] = "Morph_Testnet";
306
309
  BridgeChain["Optimism_Sepolia"] = "Optimism_Sepolia";
310
+ BridgeChain["Pharos_Testnet"] = "Pharos_Testnet";
307
311
  BridgeChain["Plume_Testnet"] = "Plume_Testnet";
308
312
  BridgeChain["Polygon_Amoy_Testnet"] = "Polygon_Amoy_Testnet";
309
313
  BridgeChain["Sei_Testnet"] = "Sei_Testnet";
@@ -649,6 +653,12 @@ const SWAP_TOKEN_REGISTRY = {
649
653
  category: 'wrapped',
650
654
  description: 'Wrapped Polygon',
651
655
  },
656
+ CIRBTC: {
657
+ symbol: 'CIRBTC',
658
+ decimals: 8,
659
+ category: 'wrapped',
660
+ description: 'Circle Bitcoin',
661
+ },
652
662
  };
653
663
  /**
654
664
  * Special NATIVE token constant for swap operations.
@@ -2320,6 +2330,96 @@ const OptimismSepolia = defineChain({
2320
2330
  },
2321
2331
  });
2322
2332
 
2333
+ /**
2334
+ * Pharos Mainnet chain definition
2335
+ * @remarks
2336
+ * This represents the official production network for the Pharos blockchain.
2337
+ * Pharos is a modular, full-stack parallel Layer 1 blockchain with
2338
+ * sub-second finality and EVM compatibility.
2339
+ */
2340
+ defineChain({
2341
+ type: 'evm',
2342
+ chain: Blockchain.Pharos,
2343
+ name: 'Pharos',
2344
+ title: 'Pharos Mainnet',
2345
+ nativeCurrency: {
2346
+ name: 'Pharos',
2347
+ symbol: 'PHAROS',
2348
+ decimals: 18,
2349
+ },
2350
+ chainId: 1672,
2351
+ isTestnet: false,
2352
+ explorerUrl: 'https://pharos.socialscan.io/tx/{hash}',
2353
+ rpcEndpoints: ['https://rpc.pharos.xyz'],
2354
+ eurcAddress: null,
2355
+ usdcAddress: '0xC879C018dB60520F4355C26eD1a6D572cdAC1815',
2356
+ usdtAddress: null,
2357
+ cctp: {
2358
+ domain: 31,
2359
+ contracts: {
2360
+ v2: {
2361
+ type: 'split',
2362
+ tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
2363
+ messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
2364
+ confirmations: 1,
2365
+ fastConfirmations: 1,
2366
+ },
2367
+ },
2368
+ forwarderSupported: {
2369
+ source: false,
2370
+ destination: false,
2371
+ },
2372
+ },
2373
+ kitContracts: {
2374
+ bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2375
+ },
2376
+ });
2377
+
2378
+ /**
2379
+ * Pharos Atlantic Testnet chain definition
2380
+ * @remarks
2381
+ * This represents the official test network for the Pharos blockchain.
2382
+ * Pharos is a modular, full-stack parallel Layer 1 blockchain with
2383
+ * sub-second finality and EVM compatibility.
2384
+ */
2385
+ defineChain({
2386
+ type: 'evm',
2387
+ chain: Blockchain.Pharos_Testnet,
2388
+ name: 'Pharos Atlantic',
2389
+ title: 'Pharos Atlantic Testnet',
2390
+ nativeCurrency: {
2391
+ name: 'Pharos',
2392
+ symbol: 'PHAROS',
2393
+ decimals: 18,
2394
+ },
2395
+ chainId: 688689,
2396
+ isTestnet: true,
2397
+ explorerUrl: 'https://atlantic.pharosscan.xyz/tx/{hash}',
2398
+ rpcEndpoints: ['https://atlantic.dplabs-internal.com'],
2399
+ eurcAddress: null,
2400
+ usdcAddress: '0xcfC8330f4BCAB529c625D12781b1C19466A9Fc8B',
2401
+ usdtAddress: null,
2402
+ cctp: {
2403
+ domain: 31,
2404
+ contracts: {
2405
+ v2: {
2406
+ type: 'split',
2407
+ tokenMessenger: '0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA',
2408
+ messageTransmitter: '0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275',
2409
+ confirmations: 1,
2410
+ fastConfirmations: 1,
2411
+ },
2412
+ },
2413
+ forwarderSupported: {
2414
+ source: false,
2415
+ destination: false,
2416
+ },
2417
+ },
2418
+ kitContracts: {
2419
+ bridge: BRIDGE_CONTRACT_EVM_TESTNET,
2420
+ },
2421
+ });
2422
+
2323
2423
  /**
2324
2424
  * Plume Mainnet chain definition
2325
2425
  * @remarks
@@ -2602,7 +2702,7 @@ const Sei = defineChain({
2602
2702
  },
2603
2703
  chainId: 1329,
2604
2704
  isTestnet: false,
2605
- explorerUrl: 'https://seitrace.com/tx/{hash}?chain=pacific-1',
2705
+ explorerUrl: 'https://seiscan.io/tx/{hash}',
2606
2706
  rpcEndpoints: ['https://evm-rpc.sei-apis.com'],
2607
2707
  eurcAddress: null,
2608
2708
  usdcAddress: '0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392',
@@ -2660,7 +2760,7 @@ const SeiTestnet = defineChain({
2660
2760
  },
2661
2761
  chainId: 1328,
2662
2762
  isTestnet: true,
2663
- explorerUrl: 'https://seitrace.com/tx/{hash}?chain=atlantic-2',
2763
+ explorerUrl: 'https://testnet.seiscan.io/tx/{hash}',
2664
2764
  rpcEndpoints: ['https://evm-rpc-testnet.sei-apis.com'],
2665
2765
  eurcAddress: null,
2666
2766
  usdcAddress: '0x4fCF1784B31630811181f670Aea7A7bEF803eaED',
package/chains.d.ts CHANGED
@@ -66,6 +66,8 @@ declare enum Blockchain {
66
66
  Noble_Testnet = "Noble_Testnet",
67
67
  Optimism = "Optimism",
68
68
  Optimism_Sepolia = "Optimism_Sepolia",
69
+ Pharos = "Pharos",
70
+ Pharos_Testnet = "Pharos_Testnet",
69
71
  Polkadot_Asset_Hub = "Polkadot_Asset_Hub",
70
72
  Polkadot_Westmint = "Polkadot_Westmint",
71
73
  Plume = "Plume",
@@ -1391,7 +1393,7 @@ declare const Sei: {
1391
1393
  };
1392
1394
  readonly chainId: 1329;
1393
1395
  readonly isTestnet: false;
1394
- readonly explorerUrl: "https://seitrace.com/tx/{hash}?chain=pacific-1";
1396
+ readonly explorerUrl: "https://seiscan.io/tx/{hash}";
1395
1397
  readonly rpcEndpoints: readonly ["https://evm-rpc.sei-apis.com"];
1396
1398
  readonly eurcAddress: null;
1397
1399
  readonly usdcAddress: "0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392";
@@ -1449,7 +1451,7 @@ declare const SeiTestnet: {
1449
1451
  };
1450
1452
  readonly chainId: 1328;
1451
1453
  readonly isTestnet: true;
1452
- readonly explorerUrl: "https://seitrace.com/tx/{hash}?chain=atlantic-2";
1454
+ readonly explorerUrl: "https://testnet.seiscan.io/tx/{hash}";
1453
1455
  readonly rpcEndpoints: readonly ["https://evm-rpc-testnet.sei-apis.com"];
1454
1456
  readonly eurcAddress: null;
1455
1457
  readonly usdcAddress: "0x4fCF1784B31630811181f670Aea7A7bEF803eaED";
package/chains.mjs CHANGED
@@ -72,6 +72,8 @@ var Blockchain;
72
72
  Blockchain["Noble_Testnet"] = "Noble_Testnet";
73
73
  Blockchain["Optimism"] = "Optimism";
74
74
  Blockchain["Optimism_Sepolia"] = "Optimism_Sepolia";
75
+ Blockchain["Pharos"] = "Pharos";
76
+ Blockchain["Pharos_Testnet"] = "Pharos_Testnet";
75
77
  Blockchain["Polkadot_Asset_Hub"] = "Polkadot_Asset_Hub";
76
78
  Blockchain["Polkadot_Westmint"] = "Polkadot_Westmint";
77
79
  Blockchain["Plume"] = "Plume";
@@ -280,6 +282,7 @@ var BridgeChain;
280
282
  BridgeChain["Monad"] = "Monad";
281
283
  BridgeChain["Morph"] = "Morph";
282
284
  BridgeChain["Optimism"] = "Optimism";
285
+ BridgeChain["Pharos"] = "Pharos";
283
286
  BridgeChain["Plume"] = "Plume";
284
287
  BridgeChain["Polygon"] = "Polygon";
285
288
  BridgeChain["Sei"] = "Sei";
@@ -302,6 +305,7 @@ var BridgeChain;
302
305
  BridgeChain["Monad_Testnet"] = "Monad_Testnet";
303
306
  BridgeChain["Morph_Testnet"] = "Morph_Testnet";
304
307
  BridgeChain["Optimism_Sepolia"] = "Optimism_Sepolia";
308
+ BridgeChain["Pharos_Testnet"] = "Pharos_Testnet";
305
309
  BridgeChain["Plume_Testnet"] = "Plume_Testnet";
306
310
  BridgeChain["Polygon_Amoy_Testnet"] = "Polygon_Amoy_Testnet";
307
311
  BridgeChain["Sei_Testnet"] = "Sei_Testnet";
@@ -647,6 +651,12 @@ const SWAP_TOKEN_REGISTRY = {
647
651
  category: 'wrapped',
648
652
  description: 'Wrapped Polygon',
649
653
  },
654
+ CIRBTC: {
655
+ symbol: 'CIRBTC',
656
+ decimals: 8,
657
+ category: 'wrapped',
658
+ description: 'Circle Bitcoin',
659
+ },
650
660
  };
651
661
  /**
652
662
  * Special NATIVE token constant for swap operations.
@@ -2318,6 +2328,96 @@ const OptimismSepolia = defineChain({
2318
2328
  },
2319
2329
  });
2320
2330
 
2331
+ /**
2332
+ * Pharos Mainnet chain definition
2333
+ * @remarks
2334
+ * This represents the official production network for the Pharos blockchain.
2335
+ * Pharos is a modular, full-stack parallel Layer 1 blockchain with
2336
+ * sub-second finality and EVM compatibility.
2337
+ */
2338
+ defineChain({
2339
+ type: 'evm',
2340
+ chain: Blockchain.Pharos,
2341
+ name: 'Pharos',
2342
+ title: 'Pharos Mainnet',
2343
+ nativeCurrency: {
2344
+ name: 'Pharos',
2345
+ symbol: 'PHAROS',
2346
+ decimals: 18,
2347
+ },
2348
+ chainId: 1672,
2349
+ isTestnet: false,
2350
+ explorerUrl: 'https://pharos.socialscan.io/tx/{hash}',
2351
+ rpcEndpoints: ['https://rpc.pharos.xyz'],
2352
+ eurcAddress: null,
2353
+ usdcAddress: '0xC879C018dB60520F4355C26eD1a6D572cdAC1815',
2354
+ usdtAddress: null,
2355
+ cctp: {
2356
+ domain: 31,
2357
+ contracts: {
2358
+ v2: {
2359
+ type: 'split',
2360
+ tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
2361
+ messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
2362
+ confirmations: 1,
2363
+ fastConfirmations: 1,
2364
+ },
2365
+ },
2366
+ forwarderSupported: {
2367
+ source: false,
2368
+ destination: false,
2369
+ },
2370
+ },
2371
+ kitContracts: {
2372
+ bridge: BRIDGE_CONTRACT_EVM_MAINNET,
2373
+ },
2374
+ });
2375
+
2376
+ /**
2377
+ * Pharos Atlantic Testnet chain definition
2378
+ * @remarks
2379
+ * This represents the official test network for the Pharos blockchain.
2380
+ * Pharos is a modular, full-stack parallel Layer 1 blockchain with
2381
+ * sub-second finality and EVM compatibility.
2382
+ */
2383
+ defineChain({
2384
+ type: 'evm',
2385
+ chain: Blockchain.Pharos_Testnet,
2386
+ name: 'Pharos Atlantic',
2387
+ title: 'Pharos Atlantic Testnet',
2388
+ nativeCurrency: {
2389
+ name: 'Pharos',
2390
+ symbol: 'PHAROS',
2391
+ decimals: 18,
2392
+ },
2393
+ chainId: 688689,
2394
+ isTestnet: true,
2395
+ explorerUrl: 'https://atlantic.pharosscan.xyz/tx/{hash}',
2396
+ rpcEndpoints: ['https://atlantic.dplabs-internal.com'],
2397
+ eurcAddress: null,
2398
+ usdcAddress: '0xcfC8330f4BCAB529c625D12781b1C19466A9Fc8B',
2399
+ usdtAddress: null,
2400
+ cctp: {
2401
+ domain: 31,
2402
+ contracts: {
2403
+ v2: {
2404
+ type: 'split',
2405
+ tokenMessenger: '0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA',
2406
+ messageTransmitter: '0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275',
2407
+ confirmations: 1,
2408
+ fastConfirmations: 1,
2409
+ },
2410
+ },
2411
+ forwarderSupported: {
2412
+ source: false,
2413
+ destination: false,
2414
+ },
2415
+ },
2416
+ kitContracts: {
2417
+ bridge: BRIDGE_CONTRACT_EVM_TESTNET,
2418
+ },
2419
+ });
2420
+
2321
2421
  /**
2322
2422
  * Plume Mainnet chain definition
2323
2423
  * @remarks
@@ -2600,7 +2700,7 @@ const Sei = defineChain({
2600
2700
  },
2601
2701
  chainId: 1329,
2602
2702
  isTestnet: false,
2603
- explorerUrl: 'https://seitrace.com/tx/{hash}?chain=pacific-1',
2703
+ explorerUrl: 'https://seiscan.io/tx/{hash}',
2604
2704
  rpcEndpoints: ['https://evm-rpc.sei-apis.com'],
2605
2705
  eurcAddress: null,
2606
2706
  usdcAddress: '0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392',
@@ -2658,7 +2758,7 @@ const SeiTestnet = defineChain({
2658
2758
  },
2659
2759
  chainId: 1328,
2660
2760
  isTestnet: true,
2661
- explorerUrl: 'https://seitrace.com/tx/{hash}?chain=atlantic-2',
2761
+ explorerUrl: 'https://testnet.seiscan.io/tx/{hash}',
2662
2762
  rpcEndpoints: ['https://evm-rpc-testnet.sei-apis.com'],
2663
2763
  eurcAddress: null,
2664
2764
  usdcAddress: '0x4fCF1784B31630811181f670Aea7A7bEF803eaED',