@circle-fin/provider-cctp-v2 1.0.3 → 1.0.5
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 +50 -0
- package/index.cjs +2147 -1240
- package/index.d.ts +71 -12
- package/index.mjs +2147 -1240
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,55 @@
|
|
|
1
1
|
# @circle-fin/provider-cctp-v2
|
|
2
2
|
|
|
3
|
+
## 1.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Improved how the retry function handles bridge transfers stuck in a pending state:
|
|
8
|
+
- The retry function now properly waits for pending transactions to complete before continuing with the next steps, instead of failing or skipping them
|
|
9
|
+
- Validates that required data (like transaction hashes) is present before attempting to continue, throwing clear errors immediately instead of failing silently
|
|
10
|
+
- Error messages now clearly indicate when "user action is required" for non-actionable states
|
|
11
|
+
- Validation errors during pending state resolution are no longer silently caught and now surface properly
|
|
12
|
+
|
|
13
|
+
- Fix retry functionality when a custom `recipientAddress` is specified in bridge parameters. Previously, retry operations would fail attestation validation because the `recipientAddress` was not preserved in the bridge result, causing the system to use the adapter address instead of the originally specified recipient.
|
|
14
|
+
- Validation errors now use standardized error codes for consistent error handling. All validation failures return the same `KitError` structure as other SDK errors.
|
|
15
|
+
|
|
16
|
+
**Migration:** If you're catching validation errors, update your error handling:
|
|
17
|
+
- Check `error.code === 1098` instead of `instanceof ValidationError`
|
|
18
|
+
- Access details via `error.cause?.trace?.validationErrors` instead of `error.errors`
|
|
19
|
+
|
|
20
|
+
The legacy `ValidationError` class remains available for backward compatibility.
|
|
21
|
+
|
|
22
|
+
- **Improved retry() behavior for completed bridges**
|
|
23
|
+
|
|
24
|
+
-The `retry()` method now handles completed bridge operations gracefully:
|
|
25
|
+
Calling `retry()` on an already-completed bridge now returns successfully instead of throwing an error
|
|
26
|
+
|
|
27
|
+
## 1.0.4
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- Fixed bug where tokens could be burned when bridging to unsupported chains, and improved error messages to clearly show which chains are supported.
|
|
32
|
+
|
|
33
|
+
**What's Fixed:**
|
|
34
|
+
- **Prevents fund loss**: Bridge operations now fail immediately if your adapter doesn't support the source or destination chain, **before** any tokens are approved or burned. Previously, tokens could be burned on the source chain before discovering the destination chain was unsupported, requiring manual recovery.
|
|
35
|
+
- **Better error messages**: When you attempt to use an unsupported chain, the error now clearly lists all chains your adapter supports, making it easy to pick an alternative:
|
|
36
|
+
```
|
|
37
|
+
Invalid chain 'Linea Sepolia': Not supported by this adapter.
|
|
38
|
+
It supports 17 chains: Arbitrum, Base, Ethereum, Polygon, Solana, ...
|
|
39
|
+
```
|
|
40
|
+
- **Correct error codes**: Chain validation errors now use the correct `INVALID_CHAIN` error code instead of `UNSUPPORTED_ROUTE`, making it easier to handle errors programmatically.
|
|
41
|
+
|
|
42
|
+
- Improved error handling with more informative and consistent error messages.
|
|
43
|
+
|
|
44
|
+
Errors now include:
|
|
45
|
+
- Specific error codes for programmatic handling
|
|
46
|
+
- Error type categorization (BALANCE, ONCHAIN, RPC, NETWORK)
|
|
47
|
+
- Recoverability information (FATAL vs RETRYABLE)
|
|
48
|
+
- Clearer error messages with chain context
|
|
49
|
+
- Original error details preserved for debugging
|
|
50
|
+
|
|
51
|
+
- Fixed an issue where bridging USDC to Solana would fail when specifying a recipient address different from the transaction signing wallet. The adapter now correctly creates the Associated Token Account (ATA) for the specified recipient address and delivers USDC to that address.
|
|
52
|
+
|
|
3
53
|
## 1.0.3
|
|
4
54
|
|
|
5
55
|
### Patch Changes
|