@circle-fin/app-kit 1.9.0 → 1.11.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/CHANGELOG.md CHANGED
@@ -1,5 +1,65 @@
1
1
  # @circle-fin/app-kit
2
2
 
3
+ ## 1.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - AppKit now accepts `disableAnalytics` to turn off success analytics in its
8
+ underlying EarnKit, SwapKit, and UnifiedBalanceKit operations. Use the existing
9
+ `disableErrorReporting` option to turn off error reporting.
10
+
11
+ ### Patch Changes
12
+
13
+ - Clarify Unified Balance `removeFund` documentation as a recovery path with a
14
+ 7-day withdrawal delay.
15
+ - Make the SDK safe to bundle and run in browsers/client-side apps.
16
+
17
+ - Browser requests omit Node-only headers that would cause CORS failures, including EarnKit’s SDK-version header.
18
+ - Solana operations in App Kit, Adapter Solana Kit, and Gateway work in a browser without requiring a consumer-provided `Buffer` polyfill.
19
+ - Supplying a `kitKey` or Circle Wallets `apiKey` in a browser now fails early. Keep those secrets on the server and forward a prepared transaction or other safe result to the client.
20
+
21
+ - EarnKit now sends structured telemetry for public-operation errors and for
22
+ completed vault lookups, vault discovery, deposits, withdrawals, and reward
23
+ claims. No code changes are required. Telemetry is enabled by default and
24
+ contains no wallet addresses or amounts. To opt out when constructing
25
+ `EarnKit`:
26
+
27
+ ```ts
28
+ const kit = new EarnKit({
29
+ disableAnalytics: true,
30
+ disableErrorReporting: true,
31
+ });
32
+ ```
33
+
34
+ AppKit now forwards its existing `disableErrorReporting` option to its EarnKit
35
+ operations.
36
+
37
+ ## 1.10.0
38
+
39
+ ### Minor Changes
40
+
41
+ - Emit earn step events from `AppKit.on()` / `off()` and add `kit.earn.retry()` for resumable multi-phase earn failures.
42
+ - Add `setFeeRecipients()` / `removeFeeRecipients()` on `appKit.unifiedBalance`. Declare fee recipient addresses per chain type (`{ evm, solana }`) instead of writing per-chain branching logic in a `resolveFeeRecipientAddress` callback. Mirrors the same methods added to `@circle-fin/unified-balance-kit`.
43
+ - Surface bridge quote metadata and quote-expired errors for cross-chain Earn deposits.
44
+
45
+ Cross-chain deposit results now include optional `quoteIssuedAt` and `quoteExpiry` metadata so applications can display quote validity and refresh before expiration. Expired quotes are surfaced as fatal `EarnError.BRIDGE_QUOTE_EXPIRED` errors, signaling that callers should start a new prepare/deposit flow instead of retrying stale prepared data.
46
+
47
+ - Swap no longer requires a Stablecoin Service kit key. You can now call `swap`, `estimateSwap`, `getSwapStatus`, `getTokenRates`, and `waitForSwap` without one — unblocking client-side and browser apps that can't safely ship a secret key.
48
+
49
+ This is non-breaking: if you already pass a `kitKey` it keeps working unchanged (and an invalid key is still rejected). To go keyless, omit `kitKey` from your config.
50
+
51
+ ### Patch Changes
52
+
53
+ - Deposit and withdrawal quotes now report the gas-fee estimate provided by the Earn Service instead of estimating it in the SDK. Previously the SDK estimated gas locally by simulating each action against current on-chain state, so the deposit or withdrawal entry could come back as `fees: null` with a revert error whenever a token approval had not yet been made — the Earn Service estimates gas for those actions, so quotes now return a usable gas fee in that case. Claim-rewards quotes do not carry a gas estimate (the service does not provide one), so their `gasFees` is now always empty. The response shape is unchanged (`EarnGasFeeEstimate[]`).
54
+ - Format cross-chain swap fees against the chain the fee token is denominated on. Swap, provider, and developer fees paid in the destination (output) token were resolved against the source chain, so the token symbol and decimals could not be found and the amount was returned as raw base units. This was most visible for Solana → any-chain swaps (e.g. a swap fee paid in EURC on Base surfaced as `'13202'` instead of `'0.013202'`). Fees now prefer the `decimals`/`symbol` the service supplies on each fee item, and otherwise resolve against whichever of the source or destination chain recognises the fee token, so amounts are consistently human-readable.
55
+ - Fix automatic allocation (`amountIn`) sometimes failing with an insufficient-balance error even when your balance was sufficient.
56
+
57
+ When you let the SDK choose which chains to draw from (passing `amountIn` instead of explicit `allocations`), a transfer could be rejected with `BALANCE_INSUFFICIENT_TOKEN` (9001) even though you held enough USDC, and topping up did not help.
58
+
59
+ Auto-allocation now accounts for the network's actual gas fee before submitting, so these transfers go through. If your balance genuinely cannot cover the amount plus gas, you now get a clear `BALANCE_INSUFFICIENT_GAS` (9002) error naming the affected chain and the shortfall, instead of an opaque rejection — reduce the amount or add USDC on that chain. Transfers with explicit `allocations` are unchanged, and there is no extra latency unless a correction is actually needed.
60
+
61
+ - Swaps that require an ERC-20 approval now submit the approval and the swap as a single atomic batch when your wallet supports it — one signing prompt instead of two for smart-contract wallets. Native-token and gasless permit swaps are unchanged.
62
+
3
63
  ## 1.9.0
4
64
 
5
65
  ### Minor Changes