@anywalletkit/protocol-swap2-lifi 0.7.0 → 0.8.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/README.md +38 -2
- package/dist/{chunk-HJRWHGMX.js → chunk-G26GE46T.js} +410 -115
- package/dist/chunk-G26GE46T.js.map +1 -0
- package/dist/{chunk-D42KNYLU.js → chunk-TCPUWYDL.js} +2 -2
- package/dist/index.cjs +409 -114
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/protocol.cjs +409 -114
- package/dist/protocol.cjs.map +1 -1
- package/dist/protocol.js +2 -2
- package/dist/provider.cjs +409 -114
- package/dist/provider.cjs.map +1 -1
- package/dist/provider.d.cts +3 -1
- package/dist/provider.d.ts +3 -1
- package/dist/provider.js +1 -1
- package/package.json +9 -7
- package/dist/chunk-HJRWHGMX.js.map +0 -1
- /package/dist/{chunk-D42KNYLU.js.map → chunk-TCPUWYDL.js.map} +0 -0
package/README.md
CHANGED
|
@@ -27,11 +27,47 @@ calls are refused) and its `BridgeData` must name the reviewed recipient and cha
|
|
|
27
27
|
input token (or what its source swaps make of it). Every refund, depositor or fallback address a
|
|
28
28
|
bridge carries in its own data (Stargate's LayerZero fee refund, an expired Across deposit or LI.FI
|
|
29
29
|
intent, a Mayan Swift order's trader, Chainflip's refund address, …) must be the sender or the
|
|
30
|
-
recipient. Refused, because the recipient cannot be read from the calldata: routes with a destination call
|
|
30
|
+
recipient. Refused, because the recipient cannot be read from the calldata: routes with a destination call and the
|
|
31
31
|
bridges whose facet does not bind the delivery to `BridgeData` (Relay, Garden, deBridge DLN,
|
|
32
32
|
ThorSwap, Squid, Symbiosis) — cross-chain requests ask LI.FI to route around Relay, Garden, Squid
|
|
33
33
|
and Symbiosis, and not to offer destination calls (`allowDestinationCall=false`), so their pairs get
|
|
34
|
-
another bridge.
|
|
34
|
+
another bridge. **LI.FI Intents** (`lifiIntents`) is refused on every route from an EVM chain and denied in every
|
|
35
|
+
cross-chain request from an EVM chain (Solana-source requests are unchanged): its escrowed order names its own input oracle, output oracle, output settler and
|
|
36
|
+
output amount multiplier, none of which is pinned here, so a matching recipient would not bind the delivery (the
|
|
37
|
+
escrow releases the input on the oracle's word). LI.FI serves those pairs through another bridge; where LI.FI Intents
|
|
38
|
+
is its only one (Elysium, 2026-11-13) LI.FI has no route. Unknown calldata is refused.
|
|
39
|
+
|
|
40
|
+
**EVM → Solana.** `BridgeData` names LI.FI's Solana chain id and, as its receiver, only LI.FI's non-EVM
|
|
41
|
+
placeholder (`0x11f1…11F1`, required exactly); the recipient sits in the bridge's own data and is read there for
|
|
42
|
+
the bridges whose delivery the transaction binds, then held to the requested owner (`destAddress`) and token:
|
|
43
|
+
|
|
44
|
+
- **Mayan** (`mayan`, `mayanMCTP`, `mayanFastMCTP`): the facet's `nonEVMReceiver` and the destination address in
|
|
45
|
+
the Mayan order or transfer it forwards (Swift v2, MCTP `createOrder` / `bridgeWithFee`, Fast MCTP `createOrder`
|
|
46
|
+
/ `bridge`) must both be the owner; the order must go to Solana (Wormhole chain 1 / CCTP domain 5), carry no
|
|
47
|
+
custom payload and name the requested mint (32 zero bytes for SOL); a plain CCTP transfer delivers USDC. Other
|
|
48
|
+
Mayan entry points are refused.
|
|
49
|
+
- **Polymer CCTP** (`polymer`, `polymerStandard`): CCTP mints to the token account the calldata names, which the
|
|
50
|
+
facet cannot check; it must be the owner's USDC associated token account, derived on the device.
|
|
51
|
+
- **Chainflip**: the vault swap's 32-byte destination address must be the owner and its asset the requested one
|
|
52
|
+
(SOL, USDC or USDT on Solana).
|
|
53
|
+
|
|
54
|
+
These requests ask LI.FI for those bridges only (`allowBridges`; a `chooseRoute` pick is kept among them). NEAR
|
|
55
|
+
Intents and LayerSwap pay a deposit address whose off-chain order names the recipient, and Smart Deposits a
|
|
56
|
+
deposit address outright: deposits the device cannot verify, refused for this direction. LI.FI Intents to
|
|
57
|
+
Solana is refused like everywhere else (see above). Any other bridge to Solana is refused as before. Solana-source
|
|
58
|
+
requests are unchanged.
|
|
59
|
+
|
|
60
|
+
**Dry quotes without an address.** A dry quote (`dry` not `false`) without `refundAddress` is priced for a
|
|
61
|
+
placeholder sender (vitalik.eth on EVM, the public BIP-39 "abandon" account on Solana), and a dry EVM → Solana quote
|
|
62
|
+
without `destAddress` for the "abandon" account as the recipient. Such a quote prices the route only: it carries no
|
|
63
|
+
`txRequest` (its `providerData.placeholder` names the stand-in), `buildDeposit` refuses it, and `lifiVerifyQuote` /
|
|
64
|
+
`lifiPins` refuse a quote for such a request that carries a transaction — LI.FI's transaction for a placeholder would
|
|
65
|
+
pay or refund that public account from whichever wallet signs it. Quote again with both addresses to build. A dry
|
|
66
|
+
EVM → EVM quote with a `refundAddress` but no recipient prices the sender's own address and keeps its transaction.
|
|
67
|
+
A bridge's native fee on top of the input (LayerZero's on Stargate, for instance) stays on the price-only quote as
|
|
68
|
+
`providerData.nativeFee` (base units of the source chain's native coin), which the router's `usdValue` and
|
|
69
|
+
`quoteValues` net out of its value as they do `txRequest.nativeFee`; `lifiVerifyQuote` refuses one that is not a
|
|
70
|
+
base-unit integer.
|
|
35
71
|
|
|
36
72
|
Every swap step is read, not only the ends: each must spend what the step before delivered, only
|
|
37
73
|
steps that spend the input token may pull from the wallet (`requiresDeposit`), and together at most
|