@spicenet-io/spiceflow-ui 4.21.3 → 4.22.0-metric.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/README.md +20 -2
- package/dist/auth-privy.cjs +1 -1
- package/dist/auth-privy.js +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.d.ts +2 -0
- package/dist/index.js +7 -7
- package/dist/privy-BOl05iJf.js +2 -0
- package/dist/privy-CB5iLiOK.cjs +1 -0
- package/dist/utils/crossChainRouter/metric.d.ts +93 -0
- package/dist/utils/crossChainRouter/venueConfig.d.ts +5 -0
- package/package.json +1 -1
- package/dist/privy-B9_DLG_6.cjs +0 -1
- package/dist/privy-CM7w8_v6.js +0 -2
package/README.md
CHANGED
|
@@ -125,8 +125,8 @@ providers: underlying quote/execution transports still have global state.
|
|
|
125
125
|
|
|
126
126
|
When a flow has to swap on the destination chain, the SDK quotes every liquidity
|
|
127
127
|
venue that covers that chain and takes the best fill: the most output on a
|
|
128
|
-
supply, the least input on a pay. Routing is decided
|
|
129
|
-
solver only executes the calls the winning quote produced.
|
|
128
|
+
supply, the least input on a pay. Routing is decided in the SDK using venue RPC
|
|
129
|
+
or API quotes. The solver only executes the calls the winning quote produced.
|
|
130
130
|
|
|
131
131
|
Leave `liquidityVenues` off and you get the built-in venues. Declare it once on
|
|
132
132
|
the provider to add your own, and every component picks them up.
|
|
@@ -166,6 +166,24 @@ spacings) and hub currencies.
|
|
|
166
166
|
| `uniswap-v3` | `chainId`, `swapRouter`, `quoterV2` | `name`, `feeTiers`, `hubCurrencies`, `routerHasDeadline` |
|
|
167
167
|
| `uniswap-v4` | `chainId`, `quoter`, `universalRouter`, `permit2` | `name`, `hubCurrencies` |
|
|
168
168
|
| `aerodrome-slipstream` | `chainId`, `swapRouter`, `quoterV2` | `name`, `tickSpacings`, `hubCurrencies` |
|
|
169
|
+
| `metric` | `chainId` | `name`, `apiUrl`, `swapRouter` |
|
|
170
|
+
|
|
171
|
+
Metric uses the tx API's `/liquidity/metric` proxy when running inside
|
|
172
|
+
`SpiceFlowProvider`, derived from its existing `apiUrl`. The backend injects
|
|
173
|
+
`METRIC_API_KEY`; no credential is included in the browser or SDK config.
|
|
174
|
+
Deploy the backend proxy and configure its secret before adopting this SDK.
|
|
175
|
+
|
|
176
|
+
Partner defaults cover Ethereum, BSC, Polygon, Monad, HyperEVM, MegaETH,
|
|
177
|
+
Robinhood, Base, Arbitrum, and Avalanche. This adds venue coverage only: the
|
|
178
|
+
app's supported chains, token policy and `includeDefaults: false` remain intact.
|
|
179
|
+
Standalone factories without a proxy retain the three public-chain defaults.
|
|
180
|
+
Set `liquidityVenues.metricApiUrl` to override the proxy base URL, or set a
|
|
181
|
+
Metric venue's `apiUrl` for that individual venue. Both exact-input and
|
|
182
|
+
exact-output use the same proxy and selected-pool metadata. Split routes are
|
|
183
|
+
not requested; the SDK encodes v1 router calls with recipient/slippage bounds.
|
|
184
|
+
A quote is not execution proof: pool extensions and oracle freshness can reject
|
|
185
|
+
a swap, and Ethereum conditional-update pools require compatible submission
|
|
186
|
+
ordering. Verify the actual caller and submission path before release.
|
|
169
187
|
|
|
170
188
|
`name` is the label shown to the user as "via <name>" once a swap is quoted, so
|
|
171
189
|
give it the name people know the venue by. It defaults to the protocol, which
|
package/dist/auth-privy.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
(function(){if(typeof document==="undefined"||document.getElementById("spiceflow-styles"))return;var s=document.createElement("style");s.id="spiceflow-styles";s.textContent="@keyframes spiceflow-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@media (prefers-reduced-motion:reduce){*,:after,:before{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.001ms!important}}.spiceflow-focus-ring:focus-visible,[data-spiceflow-focus]:focus-visible{border-radius:4px;outline:2px solid currentColor;outline-offset:2px}@media (forced-colors:active){.spiceflow-focus-ring:focus-visible,[data-spiceflow-focus]:focus-visible{outline:2px solid Highlight}}.ibm-plex-mono-thin{font-weight:100}.ibm-plex-mono-extralight,.ibm-plex-mono-thin{font-family:IBM Plex Mono,monospace!important;font-style:normal}.ibm-plex-mono-extralight{font-weight:200}.ibm-plex-mono-light{font-weight:300}.ibm-plex-mono-light,.ibm-plex-mono-regular{font-family:IBM Plex Mono,monospace!important;font-style:normal}.ibm-plex-mono-regular{font-weight:400}.ibm-plex-mono-medium{font-weight:500}.ibm-plex-mono-medium,.ibm-plex-mono-semibold{font-family:IBM Plex Mono,monospace!important;font-style:normal}.ibm-plex-mono-semibold{font-weight:600}.ibm-plex-mono-bold{font-family:IBM Plex Mono,monospace!important;font-style:normal;font-weight:700}#privy-modal-content button{border-radius:6px;font-family:IBM Plex Mono,monospace!important;font-size:small;letter-spacing:-.5px;text-transform:uppercase}#privy-modal-content input{background:#fff;border-radius:6px;padding-top:5px!important}#privy-dialog-title{display:none!important;font-size:18px;padding-bottom:10px;padding-top:10px}.AppLogoContainer-sc-a206bd44-0{display:none}#privy-modal-content{background:var(--Neutral-0,#fafafa);border:6px solid var(--Neutral-1,#e9e9e9);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15),0 330px 92px transparent,0 211px 84px rgba(0,0,0,.01),0 119px 71px rgba(0,0,0,.05),0 53px 53px rgba(0,0,0,.09),0 13px 29px rgba(0,0,0,.1);height:auto!important;padding-bottom:10px}.Subtitle-sc-ddbf22b4-4{font-size:12px;margin-top:-14px;opacity:.5}.StyledLink-sc-1c6127e5-0{background:none!important}.StyledLink-sc-c8577138-0,.login-method-button{font-family:IBM Plex Mono,monospace!important}.StyledLink-sc-c8577138-0{font-style:uppercase}#protected-by-privy{color:#000!important}";document.head.appendChild(s)})();
|
|
2
|
-
"use strict";const r=require("./privy-
|
|
2
|
+
"use strict";const r=require("./privy-CB5iLiOK.cjs");require("react/jsx-runtime"),require("react"),require("@spicenet-io/spiceflow-core"),require("@tanstack/react-query"),require("viem"),require("@privy-io/react-auth"),require("wagmi"),require("viem/actions"),exports.PrivyLogin=r.PrivyLogin;
|
package/dist/auth-privy.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
(function(){if(typeof document==="undefined"||document.getElementById("spiceflow-styles"))return;var s=document.createElement("style");s.id="spiceflow-styles";s.textContent="@keyframes spiceflow-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@media (prefers-reduced-motion:reduce){*,:after,:before{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.001ms!important}}.spiceflow-focus-ring:focus-visible,[data-spiceflow-focus]:focus-visible{border-radius:4px;outline:2px solid currentColor;outline-offset:2px}@media (forced-colors:active){.spiceflow-focus-ring:focus-visible,[data-spiceflow-focus]:focus-visible{outline:2px solid Highlight}}.ibm-plex-mono-thin{font-weight:100}.ibm-plex-mono-extralight,.ibm-plex-mono-thin{font-family:IBM Plex Mono,monospace!important;font-style:normal}.ibm-plex-mono-extralight{font-weight:200}.ibm-plex-mono-light{font-weight:300}.ibm-plex-mono-light,.ibm-plex-mono-regular{font-family:IBM Plex Mono,monospace!important;font-style:normal}.ibm-plex-mono-regular{font-weight:400}.ibm-plex-mono-medium{font-weight:500}.ibm-plex-mono-medium,.ibm-plex-mono-semibold{font-family:IBM Plex Mono,monospace!important;font-style:normal}.ibm-plex-mono-semibold{font-weight:600}.ibm-plex-mono-bold{font-family:IBM Plex Mono,monospace!important;font-style:normal;font-weight:700}#privy-modal-content button{border-radius:6px;font-family:IBM Plex Mono,monospace!important;font-size:small;letter-spacing:-.5px;text-transform:uppercase}#privy-modal-content input{background:#fff;border-radius:6px;padding-top:5px!important}#privy-dialog-title{display:none!important;font-size:18px;padding-bottom:10px;padding-top:10px}.AppLogoContainer-sc-a206bd44-0{display:none}#privy-modal-content{background:var(--Neutral-0,#fafafa);border:6px solid var(--Neutral-1,#e9e9e9);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15),0 330px 92px transparent,0 211px 84px rgba(0,0,0,.01),0 119px 71px rgba(0,0,0,.05),0 53px 53px rgba(0,0,0,.09),0 13px 29px rgba(0,0,0,.1);height:auto!important;padding-bottom:10px}.Subtitle-sc-ddbf22b4-4{font-size:12px;margin-top:-14px;opacity:.5}.StyledLink-sc-1c6127e5-0{background:none!important}.StyledLink-sc-c8577138-0,.login-method-button{font-family:IBM Plex Mono,monospace!important}.StyledLink-sc-c8577138-0{font-style:uppercase}#protected-by-privy{color:#000!important}";document.head.appendChild(s)})();
|
|
3
|
-
import{P as g}from"./privy-
|
|
3
|
+
import{P as g}from"./privy-BOl05iJf.js";import"react/jsx-runtime";import"react";import"@spicenet-io/spiceflow-core";import"@tanstack/react-query";import"viem";import"@privy-io/react-auth";import"wagmi";import"viem/actions";export{g as PrivyLogin};
|