@circle-fin/bridge-kit 1.1.0 → 1.1.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/CHANGELOG.md ADDED
@@ -0,0 +1,109 @@
1
+ # @circle-fin/bridge-kit
2
+
3
+ ## 1.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix CommonJS compatibility by correcting file extensions and package exports. This resolves a "ReferenceError: require is not defined" error that occurred when using packages in CommonJS projects with ts-node.
8
+
9
+ - Fixes a bug where the `recipientAddress` field in the `to` parameter was not being properly propagated to the underlying CCTP v2 provider. This caused custom recipient addresses to be ignored during cross-chain USDC transfers, resulting in funds being minted to the signer's address instead of the intended recipient.
10
+
11
+ With this fix, when you specify a `recipientAddress` in the `to` parameter, the Bridge Kit now correctly passes it through to the provider, ensuring funds are minted to the correct address.
12
+
13
+ **Example usage** (no changes needed if already using this pattern):
14
+
15
+ ```typescript
16
+ await kit.bridge({
17
+ from: { adapter: sourceAdapter, chain: 'Ethereum' },
18
+ to: {
19
+ adapter: destAdapter,
20
+ chain: 'Base',
21
+ recipientAddress: '0x...', // Now properly respected
22
+ },
23
+ amount: '10',
24
+ token: 'USDC',
25
+ })
26
+ ```
27
+
28
+ **No breaking changes** - existing code without `recipientAddress` continues to work unchanged. This fix only affects transfers where you explicitly provide a custom recipient address.
29
+
30
+ ## 1.1.0
31
+
32
+ ### Minor Changes
33
+
34
+ - Add automatic HTTP request tracking for analytics and debugging. The kit now automatically registers itself when the module loads, enabling Circle to track kit usage and identify issues. Applications can optionally set an external prefix using the new `setExternalPrefix` function to identify themselves in request analytics. All HTTP requests from the kit will include user agent information in the format: `[app/version] bridge-kit/version (runtime)`. This feature requires no code changes for existing users.
35
+
36
+ ### Patch Changes
37
+
38
+ - Standardize `maxFee` parameter to accept human-readable values. The `maxFee` parameter in `BridgeConfig` now correctly accepts human-readable token amounts (e.g., `"1"` for 1 USDC, `"0.5"` for 0.5 USDC), matching the behavior of `customFee.value`. This resolves an undocumented inconsistency in the API. If you were previously passing values in smallest units, update to human-readable format: use `"1"` instead of `"1000000"` for 1 USDC.
39
+ - Complete CCTP v2 chain support exports
40
+
41
+ Ensures all 35 chains with CCTP v2 support are properly exported from the `chains` entry point. This fix adds previously missing chain definitions including Codex, HyperEVM, Ink, Plume, Sei, Sonic, Unichain, WorldChain, and XDC networks (both mainnet and testnet variants where applicable).
42
+
43
+ - Add support for Arc Testnet chain definition. Arc is Circle's EVM-compatible Layer-1 blockchain designed for stablecoin finance and asset
44
+ tokenization, featuring USDC as the native gas token and sub-second finality via the Malachite BFT consensus engine.
45
+ - Fix support for developer-controlled address context. Bridge operations now correctly accept an explicit `address` field in the context, allowing developer-controlled adapters to specify which address to use for operations. Previously, this field was incorrectly rejected at runtime.
46
+ - Update Sonic Testnet chain definition to canonical network. The `SonicTestnet` chain definition now points to the official Sonic Testnet (chainId: 14601) instead of the deprecated Sonic Blaze Testnet (chainId: 57054). The RPC endpoint has been updated to `https://rpc.testnet.soniclabs.com`, the display name simplified to "Sonic Testnet", and the USDC contract address updated to the new deployment.
47
+
48
+ **Breaking Changes:**
49
+ - **Chain ID:** 57054 → 14601
50
+ - **RPC Endpoint:** `https://rpc.blaze.soniclabs.com` → `https://rpc.testnet.soniclabs.com`
51
+ - **USDC Address:** `0xA4879Fed32Ecbef99399e5cbC247E533421C4eC6` → `0x0BA304580ee7c9a980CF72e55f5Ed2E9fd30Bc51`
52
+
53
+ **Migration:** If you were using `SonicTestnet`, your application will automatically connect to the new network upon upgrading. Any accounts, contracts, or transactions on the old Blaze testnet (chainId: 57054) will need to be recreated on the new testnet.
54
+
55
+ ## 1.0.0
56
+
57
+ ### Major Changes
58
+
59
+ - # Bridge Kit 1.0.0 Release 🎉
60
+
61
+ The core orchestration library for cross-chain USDC transfers - providing a unified, type-safe interface for bridging USDC between heterogeneous blockchain networks.
62
+
63
+ ## 🚀 Core Features
64
+ - **Complete Cross-chain Orchestration**: High-level API for USDC transfers between any supported chains
65
+ - **Type-safe APIs**: Exhaustive runtime validation with strict TypeScript support
66
+ - **Deterministic Operations**: Pre-flight simulations and predictable quote generation
67
+ - **Comprehensive Finality Tracking**: Monitor transfer progress across all bridge steps
68
+
69
+ ## 🔄 Intelligent Retry System
70
+
71
+ Sophisticated retry mechanism that automatically handles failed or incomplete transfers:
72
+ - **Automatic Recovery**: Resume transfers from the exact point of failure
73
+ - **Step Analysis**: Intelligent detection of which operations completed successfully
74
+ - **Network Resilience**: Handle temporary connectivity issues and gas estimation failures
75
+ - **Multi-step Flow Support**: Retry complex bridge operations involving multiple blockchain transactions
76
+
77
+ ```typescript
78
+ // Retry a failed transfer with fresh adapter instances
79
+ const retryResult = await kit.retry(failedResult, {
80
+ from: sourceAdapter,
81
+ to: destAdapter,
82
+ })
83
+ ```
84
+
85
+ ## 💰 Flexible Fee Management
86
+
87
+ Comprehensive fee system supporting both protocol fees and custom integrator fees:
88
+ - **Transfer Speed Options**: Choose between FAST (with fees) and SLOW (fee-free) transfers
89
+ - **Dynamic Fee Calculation**: Automatic fee estimation based on transfer amount and network conditions
90
+ - **Custom Fee Policies**: Implement your own fee structures with absolute amounts
91
+ - **Multi-chain Fee Support**: Different fee configurations per source chain
92
+ - **Fee Recipient Control**: Specify where fees are sent on the source chain
93
+
94
+ ```typescript
95
+ // Set custom fee policy
96
+ kit.setCustomFeePolicy({
97
+ calculateFee: (params) =>
98
+ params.from.chain.type === 'solana' ? '0.1' : '0.2',
99
+ resolveFeeRecipientAddress: (chain) => getFeeRecipientForChain(chain),
100
+ })
101
+ ```
102
+
103
+ ## 🎯 Use Cases
104
+ - **Multi-chain dApp Integration**: Single SDK for all cross-chain USDC needs
105
+ - **Wallet Integration**: Seamless cross-chain transfers for end users
106
+ - **Exchange Integration**: Institutional-grade cross-chain USDC movement
107
+ - **DeFi Protocol Integration**: Bridge USDC liquidity across ecosystems
108
+
109
+ This release provides the foundational orchestration layer for cross-chain USDC applications with production-ready reliability and comprehensive developer tooling.
@@ -2301,4 +2301,4 @@ exports.WorldChain = WorldChain;
2301
2301
  exports.WorldChainSepolia = WorldChainSepolia;
2302
2302
  exports.XDC = XDC;
2303
2303
  exports.XDCApothem = XDCApothem;
2304
- //# sourceMappingURL=chains.cjs.js.map
2304
+ //# sourceMappingURL=chains.cjs.map
package/chains.cjs.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chains.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}