@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/index.d.ts CHANGED
@@ -681,6 +681,8 @@ declare enum Blockchain {
681
681
  Noble_Testnet = "Noble_Testnet",
682
682
  Optimism = "Optimism",
683
683
  Optimism_Sepolia = "Optimism_Sepolia",
684
+ Pharos = "Pharos",
685
+ Pharos_Testnet = "Pharos_Testnet",
684
686
  Polkadot_Asset_Hub = "Polkadot_Asset_Hub",
685
687
  Polkadot_Westmint = "Polkadot_Westmint",
686
688
  Plume = "Plume",
@@ -904,6 +906,7 @@ declare enum BridgeChain {
904
906
  Monad = "Monad",
905
907
  Morph = "Morph",
906
908
  Optimism = "Optimism",
909
+ Pharos = "Pharos",
907
910
  Plume = "Plume",
908
911
  Polygon = "Polygon",
909
912
  Sei = "Sei",
@@ -925,6 +928,7 @@ declare enum BridgeChain {
925
928
  Monad_Testnet = "Monad_Testnet",
926
929
  Morph_Testnet = "Morph_Testnet",
927
930
  Optimism_Sepolia = "Optimism_Sepolia",
931
+ Pharos_Testnet = "Pharos_Testnet",
928
932
  Plume_Testnet = "Plume_Testnet",
929
933
  Polygon_Amoy_Testnet = "Polygon_Amoy_Testnet",
930
934
  Sei_Testnet = "Sei_Testnet",
@@ -2732,6 +2736,96 @@ declare const OptimismSepolia: {
2732
2736
  };
2733
2737
  };
2734
2738
 
2739
+ /**
2740
+ * Pharos Mainnet chain definition
2741
+ * @remarks
2742
+ * This represents the official production network for the Pharos blockchain.
2743
+ * Pharos is a modular, full-stack parallel Layer 1 blockchain with
2744
+ * sub-second finality and EVM compatibility.
2745
+ */
2746
+ declare const Pharos: {
2747
+ readonly type: "evm";
2748
+ readonly chain: Blockchain.Pharos;
2749
+ readonly name: "Pharos";
2750
+ readonly title: "Pharos Mainnet";
2751
+ readonly nativeCurrency: {
2752
+ readonly name: "Pharos";
2753
+ readonly symbol: "PHAROS";
2754
+ readonly decimals: 18;
2755
+ };
2756
+ readonly chainId: 1672;
2757
+ readonly isTestnet: false;
2758
+ readonly explorerUrl: "https://pharos.socialscan.io/tx/{hash}";
2759
+ readonly rpcEndpoints: readonly ["https://rpc.pharos.xyz"];
2760
+ readonly eurcAddress: null;
2761
+ readonly usdcAddress: "0xC879C018dB60520F4355C26eD1a6D572cdAC1815";
2762
+ readonly usdtAddress: null;
2763
+ readonly cctp: {
2764
+ readonly domain: 31;
2765
+ readonly contracts: {
2766
+ readonly v2: {
2767
+ readonly type: "split";
2768
+ readonly tokenMessenger: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d";
2769
+ readonly messageTransmitter: "0x81D40F21F12A8F0E3252Bccb954D722d4c464B64";
2770
+ readonly confirmations: 1;
2771
+ readonly fastConfirmations: 1;
2772
+ };
2773
+ };
2774
+ readonly forwarderSupported: {
2775
+ readonly source: false;
2776
+ readonly destination: false;
2777
+ };
2778
+ };
2779
+ readonly kitContracts: {
2780
+ readonly bridge: "0xB3FA262d0fB521cc93bE83d87b322b8A23DAf3F0";
2781
+ };
2782
+ };
2783
+
2784
+ /**
2785
+ * Pharos Atlantic Testnet chain definition
2786
+ * @remarks
2787
+ * This represents the official test network for the Pharos blockchain.
2788
+ * Pharos is a modular, full-stack parallel Layer 1 blockchain with
2789
+ * sub-second finality and EVM compatibility.
2790
+ */
2791
+ declare const PharosTestnet: {
2792
+ readonly type: "evm";
2793
+ readonly chain: Blockchain.Pharos_Testnet;
2794
+ readonly name: "Pharos Atlantic";
2795
+ readonly title: "Pharos Atlantic Testnet";
2796
+ readonly nativeCurrency: {
2797
+ readonly name: "Pharos";
2798
+ readonly symbol: "PHAROS";
2799
+ readonly decimals: 18;
2800
+ };
2801
+ readonly chainId: 688689;
2802
+ readonly isTestnet: true;
2803
+ readonly explorerUrl: "https://atlantic.pharosscan.xyz/tx/{hash}";
2804
+ readonly rpcEndpoints: readonly ["https://atlantic.dplabs-internal.com"];
2805
+ readonly eurcAddress: null;
2806
+ readonly usdcAddress: "0xcfC8330f4BCAB529c625D12781b1C19466A9Fc8B";
2807
+ readonly usdtAddress: null;
2808
+ readonly cctp: {
2809
+ readonly domain: 31;
2810
+ readonly contracts: {
2811
+ readonly v2: {
2812
+ readonly type: "split";
2813
+ readonly tokenMessenger: "0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA";
2814
+ readonly messageTransmitter: "0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275";
2815
+ readonly confirmations: 1;
2816
+ readonly fastConfirmations: 1;
2817
+ };
2818
+ };
2819
+ readonly forwarderSupported: {
2820
+ readonly source: false;
2821
+ readonly destination: false;
2822
+ };
2823
+ };
2824
+ readonly kitContracts: {
2825
+ readonly bridge: "0xC5567a5E3370d4DBfB0540025078e283e36A363d";
2826
+ };
2827
+ };
2828
+
2735
2829
  /**
2736
2830
  * Plume Mainnet chain definition
2737
2831
  * @remarks
@@ -3014,7 +3108,7 @@ declare const Sei: {
3014
3108
  };
3015
3109
  readonly chainId: 1329;
3016
3110
  readonly isTestnet: false;
3017
- readonly explorerUrl: "https://seitrace.com/tx/{hash}?chain=pacific-1";
3111
+ readonly explorerUrl: "https://seiscan.io/tx/{hash}";
3018
3112
  readonly rpcEndpoints: readonly ["https://evm-rpc.sei-apis.com"];
3019
3113
  readonly eurcAddress: null;
3020
3114
  readonly usdcAddress: "0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392";
@@ -3072,7 +3166,7 @@ declare const SeiTestnet: {
3072
3166
  };
3073
3167
  readonly chainId: 1328;
3074
3168
  readonly isTestnet: true;
3075
- readonly explorerUrl: "https://seitrace.com/tx/{hash}?chain=atlantic-2";
3169
+ readonly explorerUrl: "https://testnet.seiscan.io/tx/{hash}";
3076
3170
  readonly rpcEndpoints: readonly ["https://evm-rpc-testnet.sei-apis.com"];
3077
3171
  readonly eurcAddress: null;
3078
3172
  readonly usdcAddress: "0x4fCF1784B31630811181f670Aea7A7bEF803eaED";
@@ -3884,6 +3978,8 @@ declare const Chains_Noble: typeof Noble;
3884
3978
  declare const Chains_NobleTestnet: typeof NobleTestnet;
3885
3979
  declare const Chains_Optimism: typeof Optimism;
3886
3980
  declare const Chains_OptimismSepolia: typeof OptimismSepolia;
3981
+ declare const Chains_Pharos: typeof Pharos;
3982
+ declare const Chains_PharosTestnet: typeof PharosTestnet;
3887
3983
  declare const Chains_Plume: typeof Plume;
3888
3984
  declare const Chains_PlumeTestnet: typeof PlumeTestnet;
3889
3985
  declare const Chains_PolkadotAssetHub: typeof PolkadotAssetHub;
@@ -3947,6 +4043,8 @@ declare namespace Chains {
3947
4043
  Chains_NobleTestnet as NobleTestnet,
3948
4044
  Chains_Optimism as Optimism,
3949
4045
  Chains_OptimismSepolia as OptimismSepolia,
4046
+ Chains_Pharos as Pharos,
4047
+ Chains_PharosTestnet as PharosTestnet,
3950
4048
  Chains_Plume as Plume,
3951
4049
  Chains_PlumeTestnet as PlumeTestnet,
3952
4050
  Chains_PolkadotAssetHub as PolkadotAssetHub,
@@ -7016,6 +7114,7 @@ declare module './types' {
7016
7114
  POL: true;
7017
7115
  PLUME: true;
7018
7116
  MON: true;
7117
+ cirBTC: true;
7019
7118
  }
7020
7119
  }
7021
7120
 
@@ -9224,6 +9323,63 @@ TChainDefinition extends ChainDefinition = ChainDefinition> {
9224
9323
  */
9225
9324
  invocationMeta?: InvocationMeta;
9226
9325
  }
9326
+ /**
9327
+ * Machine-readable classification of a {@link BridgeStep} error.
9328
+ *
9329
+ * Consumers may use this field for UX decisions (e.g. distinguish a user
9330
+ * rejection from a wallet capability error) without string-matching on
9331
+ * {@link BridgeStep.errorMessage}. The original human-readable error
9332
+ * message is always preserved for display/logging.
9333
+ *
9334
+ * @remarks
9335
+ * The categories map to the most common failure shapes observed across
9336
+ * the EIP-5792 batched bridge path and the sequential bridge path:
9337
+ *
9338
+ * - `user_rejected` — user declined a wallet request (JSON-RPC `4001`).
9339
+ * - `atomic_unsupported` — wallet reported it cannot perform EIP-5792
9340
+ * atomic batching on this chain. Covers JSON-RPC `5700` (unsupported
9341
+ * capabilities), `5710` (chain not supported for the requested
9342
+ * capability), and `5750` (atomicity requires a wallet upgrade which
9343
+ * the user declined), or equivalent viem-wrapped messages.
9344
+ * - `batch_too_large` — wallet rejected the batch for exceeding its
9345
+ * size limit (JSON-RPC `5740`).
9346
+ * - `duplicate_batch_id` — wallet reported a duplicate batchId
9347
+ * (JSON-RPC `5720`).
9348
+ * - `unknown_bundle` — wallet reported an unknown bundle id during
9349
+ * status polling (JSON-RPC `5730`).
9350
+ * - `polling_timeout` — SDK polled `wallet_getCallsStatus` until the
9351
+ * configured timeout without receiving a terminal status.
9352
+ * - `failed_offchain` — wallet reported EIP-5792 `statusCode: 400`
9353
+ * (batch not included onchain, wallet will not retry).
9354
+ * - `reverted_onchain` — wallet reported EIP-5792 `statusCode: 500`
9355
+ * (batch reverted completely onchain).
9356
+ * - `partial_reverted` — wallet reported EIP-5792 `statusCode: 600`
9357
+ * (batch reverted partially onchain).
9358
+ * - `chain_revert` — transaction was mined but reverted on-chain
9359
+ * (sequential path).
9360
+ * - `unknown` — error did not match any of the above categories.
9361
+ *
9362
+ * @since 2.0.0
9363
+ *
9364
+ * @example
9365
+ * ```typescript
9366
+ * import type { BridgeStep } from '@core/provider'
9367
+ *
9368
+ * const step: BridgeStep = {
9369
+ * name: 'approve',
9370
+ * state: 'error',
9371
+ * errorMessage: 'User rejected the request',
9372
+ * errorCategory: 'user_rejected',
9373
+ * }
9374
+ *
9375
+ * if (step.errorCategory === 'user_rejected') {
9376
+ * // silent abort: user intentionally cancelled
9377
+ * } else if (step.errorCategory === 'atomic_unsupported') {
9378
+ * // hint the user about switching to step-by-step signing
9379
+ * }
9380
+ * ```
9381
+ */
9382
+ type BridgeStepErrorCategory = 'user_rejected' | 'atomic_unsupported' | 'batch_too_large' | 'duplicate_batch_id' | 'unknown_bundle' | 'polling_timeout' | 'failed_offchain' | 'reverted_onchain' | 'partial_reverted' | 'chain_revert' | 'unknown';
9227
9383
  /**
9228
9384
  * A step in the bridge process.
9229
9385
  *
@@ -9280,6 +9436,21 @@ interface BridgeStep {
9280
9436
  errorMessage?: string;
9281
9437
  /** Optional raw error object (can be Viem/Ethers/Chain error) */
9282
9438
  error?: unknown;
9439
+ /**
9440
+ * Optional machine-readable classification of the error.
9441
+ *
9442
+ * Present when the step is in `state: 'error'` and the SDK was able to
9443
+ * categorize the failure. See {@link BridgeStepErrorCategory} for the
9444
+ * list of categories and how they map to underlying error shapes.
9445
+ *
9446
+ * @remarks
9447
+ * The human-readable {@link errorMessage} is always preserved for
9448
+ * logging and display; this field is additive and should be preferred
9449
+ * over string-matching `errorMessage` for machine decisions.
9450
+ *
9451
+ * @since 2.0.0
9452
+ */
9453
+ errorCategory?: BridgeStepErrorCategory;
9283
9454
  }
9284
9455
  /**
9285
9456
  * Result object returned after a successful cross-chain bridge operation.