@circle-fin/app-kit 1.13.0 → 1.14.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 +56 -0
- package/bridge.cjs +910 -47
- package/bridge.d.cts +55 -0
- package/bridge.d.mts +55 -0
- package/bridge.d.ts +55 -0
- package/bridge.mjs +911 -48
- package/chains.cjs +129 -10
- package/chains.d.cts +9 -0
- package/chains.d.mts +9 -0
- package/chains.d.ts +9 -0
- package/chains.mjs +129 -10
- package/context.d.cts +55 -0
- package/context.d.mts +55 -0
- package/context.d.ts +55 -0
- package/earn.cjs +432 -27
- package/earn.d.cts +55 -0
- package/earn.d.mts +55 -0
- package/earn.d.ts +55 -0
- package/earn.mjs +428 -27
- package/estimateBridge.cjs +910 -47
- package/estimateBridge.d.cts +61 -0
- package/estimateBridge.d.mts +61 -0
- package/estimateBridge.d.ts +61 -0
- package/estimateBridge.mjs +911 -48
- package/estimateSwap.cjs +428 -26
- package/estimateSwap.d.cts +55 -0
- package/estimateSwap.d.mts +55 -0
- package/estimateSwap.d.ts +55 -0
- package/estimateSwap.mjs +427 -26
- package/index.cjs +4613 -346
- package/index.d.cts +777 -216
- package/index.d.mts +777 -216
- package/index.d.ts +777 -216
- package/index.mjs +4614 -347
- package/package.json +6 -6
- package/swap.cjs +428 -26
- package/swap.d.cts +55 -0
- package/swap.d.mts +55 -0
- package/swap.d.ts +55 -0
- package/swap.mjs +427 -26
- package/unifiedBalance.cjs +20602 -8389
- package/unifiedBalance.d.cts +544 -160
- package/unifiedBalance.d.mts +544 -160
- package/unifiedBalance.d.ts +544 -160
- package/unifiedBalance.mjs +20603 -8391
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,61 @@
|
|
|
1
1
|
# @circle-fin/app-kit
|
|
2
2
|
|
|
3
|
+
## 1.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add fast cross-chain deposits and fee estimation to Unified Balance Kit.
|
|
8
|
+
|
|
9
|
+
## Fast cross-chain deposits
|
|
10
|
+
|
|
11
|
+
`deposit` and `depositFor` now accept a `to` field and a `config.transferSpeed`
|
|
12
|
+
of `'FAST'` to burn USDC on the source chain and credit a Gateway balance on a
|
|
13
|
+
different destination chain in a single relayed flow:
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
const result = await kit.deposit({
|
|
17
|
+
from,
|
|
18
|
+
amount: "10",
|
|
19
|
+
token: "USDC",
|
|
20
|
+
to: { chain: "Arc_Testnet" },
|
|
21
|
+
config: { transferSpeed: "FAST" },
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`DepositResult` now includes `fees`, `progress`, `sourceChain`, and
|
|
26
|
+
`destinationChain` on the fast path.
|
|
27
|
+
|
|
28
|
+
## Fee estimation
|
|
29
|
+
|
|
30
|
+
New `estimateDeposit` method returns an itemized fee breakdown and a signed
|
|
31
|
+
quote that can be passed directly into a subsequent `deposit` / `depositFor` to
|
|
32
|
+
lock the price:
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
const estimate = await kit.estimateDeposit({
|
|
36
|
+
from,
|
|
37
|
+
amount: "10",
|
|
38
|
+
token: "USDC",
|
|
39
|
+
to: { chain: "Arc_Testnet" },
|
|
40
|
+
config: { transferSpeed: "FAST" },
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// Spread the estimate at the top level; re-attach `from` (which holds the signer).
|
|
44
|
+
// The signed `quote` inside the estimate locks the quoted fee for this call.
|
|
45
|
+
const result = await kit.deposit({ ...estimate, from });
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`estimateDeposit` is also available on `AppKit` via
|
|
49
|
+
`kit.unifiedBalance.estimateDeposit(...)`.
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- Fix `getSupportedChains({ sourceFeeSupported: true })` over-reporting source-fee
|
|
54
|
+
bridging support. Previously, source-fee eligibility was inferred from a contract
|
|
55
|
+
address shared with the fast-deposit forwarding path, causing fast-deposit-only chains
|
|
56
|
+
to appear supported and fail at the Quote API instead of being rejected client-side.
|
|
57
|
+
Source-fee support is now gated on an explicit allowlist of eligible source chains.
|
|
58
|
+
|
|
3
59
|
## 1.13.0
|
|
4
60
|
|
|
5
61
|
### Minor Changes
|