@glacislabs/stablegenie-zerodelta 4.15.1 → 4.16.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.
@@ -197,7 +197,9 @@ var CHAIN_DISPLAY_NAMES = Object.freeze({
197
197
  9745: "Plasma",
198
198
  34443: "Mode",
199
199
  42161: "Arbitrum One",
200
- 43114: "Avalanche C-Chain",
200
+ // "Avalanche", as the dApp prints it since zd-dapp#582 (from ZD Heavy's /chains). The widget's
201
+ // registry read lists no row for a payout-only chain, so this table is what names it here.
202
+ 43114: "Avalanche",
201
203
  48900: "Zircuit",
202
204
  57073: "Ink",
203
205
  59144: "Linea",
@@ -1327,6 +1329,8 @@ function normalizePreview(request, quote, to, amount) {
1327
1329
  estimatedDuration: Number(option.estimatedTimeSec || 0),
1328
1330
  via: null,
1329
1331
  nativeFeeRaw: String(option.gasCostSource || "0"),
1332
+ zeroDeltaFeeCentibips: option.zeroDeltaFeeCentibips,
1333
+ zeroDeltaFeeNative: option.zeroDeltaFeeNative,
1330
1334
  quote,
1331
1335
  option,
1332
1336
  txData: option.txData,
@@ -1364,7 +1368,9 @@ async function previewSolanaSource(api, input) {
1364
1368
  feeBps: Number(option.feeBps || 0),
1365
1369
  estimatedDuration: Number(option.estimatedTimeSec || 0),
1366
1370
  via: null,
1367
- nativeFeeRaw: "0"
1371
+ nativeFeeRaw: "0",
1372
+ zeroDeltaFeeCentibips: option.zeroDeltaFeeCentibips,
1373
+ zeroDeltaFeeNative: option.zeroDeltaFeeNative
1368
1374
  };
1369
1375
  }
1370
1376
  function solanaQuoteCompliance(quote) {
@@ -2189,6 +2195,12 @@ function humanizeComplianceReason(raw2) {
2189
2195
  }
2190
2196
  case "blocked_jurisdiction":
2191
2197
  return `Your region (${cleanJurisdiction(detail)}) isn't supported.`;
2198
+ // zd-dapp src/lib/complianceReason.ts (#588): ZD Heavy's account-country and wallet-origin rules.
2199
+ // Without these two the payer read the raw code ("account blocked country — IR").
2200
+ case "account_blocked_country":
2201
+ return `Your account doesn't support this region (${cleanJurisdiction(detail)}).`;
2202
+ case "blocked_origin_jurisdiction":
2203
+ return `The wallet's attributed region (${cleanJurisdiction(detail)}) isn't supported.`;
2192
2204
  case "blocked_destination_jurisdiction":
2193
2205
  return `The destination region (${cleanJurisdiction(detail)}) isn't supported.`;
2194
2206
  case "jurisdiction_out_of_scope":
@@ -2883,6 +2895,8 @@ async function buildRoute({
2883
2895
  quote: {
2884
2896
  bridge: quote.bridge,
2885
2897
  feeBps: quote.feeBps,
2898
+ zeroDeltaFeeCentibips: quote.zeroDeltaFeeCentibips,
2899
+ zeroDeltaFeeNative: quote.zeroDeltaFeeNative,
2886
2900
  estimatedDuration: quote.estimatedDuration,
2887
2901
  gasCostSource: quote.gasCostSource,
2888
2902
  msgValue: valueRaw.toString(),
@@ -2903,7 +2917,7 @@ var CHANNEL_HEADER = "x-zd-channel";
2903
2917
  var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
2904
2918
  var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
2905
2919
  var WIDGET_CHANNEL = "widget";
2906
- var WIDGET_VERSION = "4.15.1" ;
2920
+ var WIDGET_VERSION = "4.16.0" ;
2907
2921
  var MAX_CHANNEL_VERSION_LEN = 32;
2908
2922
  function sanitizeVersion(raw2) {
2909
2923
  const v = String(raw2).trim();
@@ -3493,6 +3507,8 @@ async function quoteSwapPreview(api, swap, owner) {
3493
3507
  return {
3494
3508
  receive: formatUnits(final, assetDecimals(destToken)),
3495
3509
  receiveRaw: final.toString(),
3510
+ zeroDeltaFeeCentibips: quote.zeroDeltaFeeCentibips,
3511
+ zeroDeltaFeeNative: quote.zeroDeltaFeeNative,
3496
3512
  fromAmount: v.amountIn,
3497
3513
  fromToken: sourceToken.symbol,
3498
3514
  toToken: destToken.symbol,
@@ -1,4 +1,4 @@
1
- import { CHAIN_DISPLAY_NAMES, EXECUTABLE_STABLE_ASSETS, STABLE_ASSETS, SUPPORTED_ASSETS, complianceView, complianceTagOf, symbolKey, normalizeDecimalText, findToken, laneLimitFor, laneLimitSymbol, tokenTicker, exceedsLaneLimit, assetDecimals, parseUnitsDecimal, counterpartTokens, assetClassOf, brokenLaneFor, brokenLaneReason, destinationAvailability, laneLimitHint, tickerOn, laneLimitError, routeNativeValue, formatNative, nativeSymbol, isSolanaChainId, isSellableRwa, formatUnits, amountFieldError, solanaQuoteCompliance, directComplianceFromScreens, SUPPORTED_CHAIN_IDS, complianceChecks, DIRECT_CHECK_IDS, isSolanaAddress, createEngine, isAddress, checkNativeFee, nativeFeeShortLabel, nativeFeeShortMessage, allowanceCovers, validatePlannedTransaction, TRACKING, mergeHistory, solanaPlanNeedsPreparation, SOLANA_CHAIN_ID, unattributedComplianceReasons, distinctScreenedWallets, formatJurisdiction, humanizeComplianceReason, DIRECT_SCOPE_NOTE, categoryLabel, SCREENING_BUCKETS, BUNDLED_RPC, foldTicker } from './chunk-SKVRYU3E.js';
1
+ import { CHAIN_DISPLAY_NAMES, EXECUTABLE_STABLE_ASSETS, STABLE_ASSETS, SUPPORTED_ASSETS, complianceView, complianceTagOf, symbolKey, normalizeDecimalText, findToken, laneLimitFor, laneLimitSymbol, tokenTicker, exceedsLaneLimit, assetDecimals, parseUnitsDecimal, counterpartTokens, assetClassOf, brokenLaneFor, brokenLaneReason, destinationAvailability, laneLimitHint, tickerOn, laneLimitError, routeNativeValue, formatNative, nativeSymbol, isSolanaChainId, isSellableRwa, formatUnits, amountFieldError, solanaQuoteCompliance, directComplianceFromScreens, SUPPORTED_CHAIN_IDS, complianceChecks, DIRECT_CHECK_IDS, isSolanaAddress, createEngine, isAddress, checkNativeFee, nativeFeeShortLabel, nativeFeeShortMessage, allowanceCovers, validatePlannedTransaction, TRACKING, mergeHistory, solanaPlanNeedsPreparation, SOLANA_CHAIN_ID, unattributedComplianceReasons, distinctScreenedWallets, formatJurisdiction, humanizeComplianceReason, DIRECT_SCOPE_NOTE, categoryLabel, SCREENING_BUCKETS, BUNDLED_RPC, foldTicker } from './chunk-7FBWRHP2.js';
2
2
  import { createContext, useState, useRef, useMemo, useEffect, useCallback, useId, useLayoutEffect, createElement, useContext, useSyncExternalStore, useReducer } from 'react';
3
3
  import { createRoot } from 'react-dom/client';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -496,6 +496,7 @@ function useFlow(args) {
496
496
  if (busyRef.current) return;
497
497
  setFieldError(null);
498
498
  if (!enabled || !wallet.account) {
499
+ reqId.current++;
499
500
  setStatus("idle");
500
501
  setPlan(null);
501
502
  return;
@@ -1089,6 +1090,8 @@ img.sg-tok-badge{width:16px;padding:0;object-fit:cover;background:var(--sg-bg)}
1089
1090
  .sg-pk-body{display:flex;flex-direction:column;gap:8px}
1090
1091
  .sg-pk-selected{display:flex;flex-direction:column;gap:8px;margin-bottom:8px}
1091
1092
  .sg-pk-cap{margin:0;font-size:12px;line-height:1.2;color:var(--sg-text-muted)}
1093
+ .sg-pk-cap--section{margin-top:8px}
1094
+ .sg-pk-bal-missing{flex:0 0 auto;font-size:13px;line-height:1.4;color:var(--sg-text-muted);text-align:right}
1092
1095
  .sg-pk-list{display:flex;flex-direction:column;gap:4px;max-height:320px;overflow-y:auto;margin:-1px;padding:1px;scrollbar-width:thin}
1093
1096
  .sg-pk-row{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:16px;border:none;border-radius:24px;background:color-mix(in srgb,var(--sg-accent) 4%,transparent);color:var(--sg-text);font:inherit;text-align:left;cursor:pointer;transition:background 120ms ease}
1094
1097
  .sg-pk-row:hover{background:color-mix(in srgb,var(--sg-accent) 8%,transparent)}
@@ -1884,6 +1887,12 @@ var SOURCE_CHAIN_LABELS = {
1884
1887
  98866: "Plume"
1885
1888
  };
1886
1889
  var CHAIN_LABELS = { ...CHAIN_DISPLAY_NAMES, ...SOURCE_CHAIN_LABELS };
1890
+ function chainLabel(chainId, chain) {
1891
+ const pinned = SOURCE_CHAIN_LABELS[chainId];
1892
+ if (pinned) return pinned;
1893
+ const fromRegistry = typeof chain?.displayName === "string" ? chain.displayName.trim() : "";
1894
+ return fromRegistry || CHAIN_DISPLAY_NAMES[chainId] || `Chain ${chainId}`;
1895
+ }
1887
1896
  var SUPPORTED_CHAINS = [1, 10, 42161, 8453, 57073, 130, 9745, 146, 98866];
1888
1897
  var SUPPORTED_ASSETS2 = [
1889
1898
  ...EXECUTABLE_STABLE_ASSETS,
@@ -2419,7 +2428,7 @@ function TokenTile(props) {
2419
2428
  /* @__PURE__ */ jsx(TokenGlyph, { symbol: props.pick.symbol, logoUrl: props.token?.logoUrl, chainId: props.pick.chainId, size: "tile" }),
2420
2429
  /* @__PURE__ */ jsxs("span", { className: "sg-tile-text", children: [
2421
2430
  /* @__PURE__ */ jsx("span", { className: "sg-tile-sym", children: shown }),
2422
- /* @__PURE__ */ jsx("span", { className: "sg-tile-chain", children: CHAIN_LABELS[props.pick.chainId] || `Chain ${props.pick.chainId}` })
2431
+ /* @__PURE__ */ jsx("span", { className: "sg-tile-chain", children: props.chainName || CHAIN_LABELS[props.pick.chainId] || `Chain ${props.pick.chainId}` })
2423
2432
  ] })
2424
2433
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
2425
2434
  /* @__PURE__ */ jsx("span", { className: "sg-tok", children: /* @__PURE__ */ jsx("span", { className: "sg-tok-fb", children: "?" }) }),
@@ -2498,7 +2507,9 @@ function TickBadge() {
2498
2507
  ] }) });
2499
2508
  }
2500
2509
  function BalanceColumn(props) {
2501
- if (props.amount == null) return null;
2510
+ if (props.amount == null) {
2511
+ return props.walletMissing ? /* @__PURE__ */ jsx("span", { className: "sg-pk-bal-missing", "data-testid": "balance-wallet-missing", children: "Wallet not connected" }) : null;
2512
+ }
2502
2513
  if (props.amount === 0) return /* @__PURE__ */ jsx("span", { className: "sg-pk-bal-zero", children: "0.00" });
2503
2514
  return /* @__PURE__ */ jsxs("span", { className: "sg-pk-bal", children: [
2504
2515
  /* @__PURE__ */ jsx("span", { className: "sg-pk-bal-usd sg-mono", children: props.usd == null ? "\u2014" : formatBalanceUsd(props.usd) }),
@@ -2551,7 +2562,7 @@ function TokenSelect(props) {
2551
2562
  const listRef = useRef(null);
2552
2563
  const savedScroll = useRef(0);
2553
2564
  const chainById = useMemo(() => new Map(props.chains.map((c) => [Number(c.chainId), c])), [props.chains]);
2554
- const chainName3 = (chainId) => CHAIN_LABELS[chainId] || chainById.get(chainId)?.displayName || chainById.get(chainId)?.name || `Chain ${chainId}`;
2565
+ const chainName3 = (chainId) => chainLabel(chainId, chainById.get(chainId));
2555
2566
  const showBalances = side === "from" && !!props.balances && Object.keys(props.balances).length > 0;
2556
2567
  const [prices, setPrices] = useState({});
2557
2568
  const symbolKey2 = useMemo(() => [...new Set(props.tokens.map((t) => String(t.symbol).toUpperCase()))].sort().join(","), [props.tokens]);
@@ -2597,6 +2608,15 @@ function TokenSelect(props) {
2597
2608
  }, [props.tokens, props.balances, props.optionStates, showBalances, prices]);
2598
2609
  const chainTerms = useMemo(() => buildChainSearchTerms(props.chains), [props.chains]);
2599
2610
  const visible = useMemo(() => searchGroups(groups, query, chainTerms, prices), [groups, query, chainTerms, prices]);
2611
+ const { listed, other } = useMemo(() => {
2612
+ const held = [];
2613
+ const none = [];
2614
+ for (const g of visible) {
2615
+ const readZero = showBalances && !g.unavailable && g.deployments.length > 0 && g.deployments.every((d) => d.balance === 0);
2616
+ (readZero ? none : held).push(g);
2617
+ }
2618
+ return { listed: held, other: none };
2619
+ }, [visible, showBalances]);
2600
2620
  const openGroup = openKey ? visible.find((g) => g.key === openKey) ?? null : null;
2601
2621
  useEffect(() => {
2602
2622
  if (openKey && !openGroup) setOpenKey(null);
@@ -2653,7 +2673,7 @@ function TokenSelect(props) {
2653
2673
  d.hint ? /* @__PURE__ */ jsx("span", { className: "sg-pk-note", "data-testid": "lane-limit", children: d.hint }) : null
2654
2674
  ] })
2655
2675
  ] }),
2656
- showBalances ? /* @__PURE__ */ jsx(BalanceColumn, { amount: d.balance, usd: usdOf(d.balance, prices, d.token.symbol), symbol: ticker }) : null
2676
+ showBalances ? /* @__PURE__ */ jsx(BalanceColumn, { amount: d.balance, usd: usdOf(d.balance, prices, d.token.symbol), symbol: ticker, walletMissing: props.walletMissing?.(d.token) }) : null
2657
2677
  ] }, d.key);
2658
2678
  }) })
2659
2679
  ] });
@@ -2692,52 +2712,58 @@ function TokenSelect(props) {
2692
2712
  ) : null
2693
2713
  ] })
2694
2714
  ] }) : null,
2695
- /* @__PURE__ */ jsx("p", { className: "sg-pk-cap", children: side === "from" ? "Your tokens \xB7 All networks" : "Popular tokens \xB7 All networks" }),
2696
- /* @__PURE__ */ jsx("div", { className: "sg-pk-list", ref: listRef, role: "group", "aria-label": props.title, children: visible.length === 0 ? /* @__PURE__ */ jsx("p", { className: "sg-pk-empty", children: props.loading ? "Loading the token list\u2026" : "No tokens found." }) : visible.map((g) => {
2697
- const members = g.deployments;
2698
- const multi = members.length > 1;
2699
- const single = members[0];
2700
- const label2 = multi ? g.symbol : tokenTicker(single.token);
2701
- const blocked = !!g.unavailable;
2702
- const opensNetworks = multi || blocked;
2703
- const zero = showBalances && g.amount === 0 || blocked;
2704
- return /* @__PURE__ */ jsxs(
2705
- "button",
2706
- {
2707
- type: "button",
2708
- className: "sg-pk-row",
2709
- "data-testid": "token-row",
2710
- "data-symbol": g.symbol,
2711
- "data-networks": members.length,
2712
- "data-zero": zero || void 0,
2713
- "data-unavailable": blocked || void 0,
2714
- onClick: () => {
2715
- if (opensNetworks) {
2716
- savedScroll.current = listRef.current?.scrollTop ?? 0;
2717
- setOpenKey(g.key);
2718
- } else pick(single.token);
2719
- },
2720
- children: [
2721
- /* @__PURE__ */ jsxs("span", { className: "sg-pk-left", children: [
2722
- /* @__PURE__ */ jsx(TokenPlate, { symbol: g.symbol, logoUrl: g.logoUrl }),
2723
- /* @__PURE__ */ jsxs("span", { className: "sg-pk-text", children: [
2724
- /* @__PURE__ */ jsx("span", { className: "sg-pk-label", children: label2 }),
2725
- /* @__PURE__ */ jsxs("span", { className: "sg-pk-line", children: [
2726
- /* @__PURE__ */ jsx("span", { className: "sg-pk-sub", children: multi ? showBalances ? "Total across" : "Available on" : `On ${chainName3(Number(single.token.chainId))}` }),
2727
- /* @__PURE__ */ jsx(ChainMarks, { chainIds: members.map((m) => Number(m.token.chainId)), chainById, decorative: !multi }),
2728
- opensNetworks && showBalances ? /* @__PURE__ */ jsx("span", { className: "sg-pk-chev sg-pk-chev--sm", "aria-hidden": "true", children: /* @__PURE__ */ jsx(ChevronGlyph, {}) }) : null
2729
- ] }),
2730
- !multi && single.hint ? /* @__PURE__ */ jsx("span", { className: "sg-pk-note", "data-testid": "lane-limit", children: single.hint }) : null
2731
- ] })
2732
- ] }),
2733
- showBalances ? /* @__PURE__ */ jsx(BalanceColumn, { amount: g.amount, usd: g.usd, symbol: label2 }) : opensNetworks ? /* @__PURE__ */ jsx("span", { className: "sg-pk-chev", "aria-hidden": "true", children: /* @__PURE__ */ jsx(ChevronGlyph, {}) }) : null
2734
- ]
2735
- },
2736
- g.key
2737
- );
2738
- }) })
2715
+ listed.length > 0 || visible.length === 0 ? /* @__PURE__ */ jsx("p", { className: "sg-pk-cap", children: side === "from" ? "Your tokens \xB7 All networks" : "Popular tokens \xB7 All networks" }) : null,
2716
+ /* @__PURE__ */ jsx("div", { className: "sg-pk-list", ref: listRef, role: "group", "aria-label": props.title, children: visible.length === 0 ? /* @__PURE__ */ jsx("p", { className: "sg-pk-empty", children: props.loading ? "Loading the token list\u2026" : "No tokens found." }) : /* @__PURE__ */ jsxs(Fragment, { children: [
2717
+ listed.map((g) => renderRow(g, false)),
2718
+ other.length > 0 ? /* @__PURE__ */ jsx("p", { className: "sg-pk-cap sg-pk-cap--section", "data-testid": "other-tokens-cap", children: "Other supported tokens" }) : null,
2719
+ other.map((g) => renderRow(g, true))
2720
+ ] }) })
2739
2721
  ] })
2740
2722
  ] });
2723
+ function renderRow(g, discovery) {
2724
+ const members = g.deployments;
2725
+ const multi = members.length > 1;
2726
+ const single = members[0];
2727
+ const label2 = multi ? g.symbol : tokenTicker(single.token);
2728
+ const blocked = !!g.unavailable;
2729
+ const opensNetworks = multi || blocked;
2730
+ const zero = showBalances && g.amount === 0 || blocked;
2731
+ return /* @__PURE__ */ jsxs(
2732
+ "button",
2733
+ {
2734
+ type: "button",
2735
+ className: "sg-pk-row",
2736
+ "data-testid": "token-row",
2737
+ "data-symbol": g.symbol,
2738
+ "data-networks": members.length,
2739
+ "data-zero": zero || void 0,
2740
+ "data-discovery": discovery || void 0,
2741
+ "data-unavailable": blocked || void 0,
2742
+ onClick: () => {
2743
+ if (opensNetworks) {
2744
+ savedScroll.current = listRef.current?.scrollTop ?? 0;
2745
+ setOpenKey(g.key);
2746
+ } else pick(single.token);
2747
+ },
2748
+ children: [
2749
+ /* @__PURE__ */ jsxs("span", { className: "sg-pk-left", children: [
2750
+ /* @__PURE__ */ jsx(TokenPlate, { symbol: g.symbol, logoUrl: g.logoUrl }),
2751
+ /* @__PURE__ */ jsxs("span", { className: "sg-pk-text", children: [
2752
+ /* @__PURE__ */ jsx("span", { className: "sg-pk-label", children: label2 }),
2753
+ /* @__PURE__ */ jsxs("span", { className: "sg-pk-line", children: [
2754
+ /* @__PURE__ */ jsx("span", { className: "sg-pk-sub", children: discovery ? "Available on" : multi ? showBalances ? "Total across" : "Available on" : `On ${chainName3(Number(single.token.chainId))}` }),
2755
+ /* @__PURE__ */ jsx(ChainMarks, { chainIds: members.map((m) => Number(m.token.chainId)), chainById, decorative: !multi && !discovery }),
2756
+ opensNetworks && showBalances ? /* @__PURE__ */ jsx("span", { className: "sg-pk-chev sg-pk-chev--sm", "aria-hidden": "true", children: /* @__PURE__ */ jsx(ChevronGlyph, {}) }) : null
2757
+ ] }),
2758
+ !multi && single.hint ? /* @__PURE__ */ jsx("span", { className: "sg-pk-note", "data-testid": "lane-limit", children: single.hint }) : null
2759
+ ] })
2760
+ ] }),
2761
+ showBalances ? /* @__PURE__ */ jsx(BalanceColumn, { amount: g.amount, usd: g.usd, symbol: label2, walletMissing: !multi && props.walletMissing?.(single.token) }) : opensNetworks ? /* @__PURE__ */ jsx("span", { className: "sg-pk-chev", "aria-hidden": "true", children: /* @__PURE__ */ jsx(ChevronGlyph, {}) }) : null
2762
+ ]
2763
+ },
2764
+ g.key
2765
+ );
2766
+ }
2741
2767
  }
2742
2768
  function ChevronRight({ size = 16 }) {
2743
2769
  return /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M6 4l4 4-4 4", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }) });
@@ -2814,7 +2840,7 @@ function durationLabel(seconds) {
2814
2840
  }
2815
2841
  function TokenButton(props) {
2816
2842
  const shown = props.token ? tokenTicker(props.token) : props.symbol ?? "";
2817
- const chain = props.chainId ? CHAIN_LABELS[props.chainId] || `Chain ${props.chainId}` : "";
2843
+ const chain = props.chainId ? props.chainName || CHAIN_LABELS[props.chainId] || `Chain ${props.chainId}` : "";
2818
2844
  return /* @__PURE__ */ jsxs(
2819
2845
  "button",
2820
2846
  {
@@ -3279,7 +3305,7 @@ function CheckGlyph() {
3279
3305
  function HistoryButton(props) {
3280
3306
  return /* @__PURE__ */ jsx("button", { type: "button", ref: props.btnRef, className: "sg-hist", disabled: props.disabled, onClick: props.onClick, "aria-label": "Transaction history", title: "Transaction history", children: /* @__PURE__ */ jsx(HistoryGlyph, {}) });
3281
3307
  }
3282
- function chainLabel(entry) {
3308
+ function chainLabel2(entry) {
3283
3309
  return entry.chainId != null && CHAIN_LABELS[entry.chainId] || entry.chainName || (entry.chainId != null ? `Chain ${entry.chainId}` : "Unknown chain");
3284
3310
  }
3285
3311
  function chainName(chainId, fallback) {
@@ -3412,7 +3438,7 @@ function TxHistoryList(props) {
3412
3438
  /* @__PURE__ */ jsxs("span", { className: "sg-txrow-when", children: [
3413
3439
  /* @__PURE__ */ jsxs("span", { className: "sg-txrow-what", children: [
3414
3440
  /* @__PURE__ */ jsx("span", { children: e.kind === "payment" ? "Payment" : "Swap" }),
3415
- /* @__PURE__ */ jsx("span", { children: chainLabel(e) }),
3441
+ /* @__PURE__ */ jsx("span", { children: chainLabel2(e) }),
3416
3442
  (e.legs?.length ?? 1) > 1 ? /* @__PURE__ */ jsx("span", { children: ordersLabel(e.legs.length) }) : null
3417
3443
  ] }),
3418
3444
  whenLabel(e.at) ? /* @__PURE__ */ jsx("span", { className: "sg-txrow-time", children: whenLabel(e.at) }) : null
@@ -3469,7 +3495,7 @@ function TxDetail(props) {
3469
3495
  ] }),
3470
3496
  /* @__PURE__ */ jsxs("div", { className: "sg-meta-row", children: [
3471
3497
  /* @__PURE__ */ jsx("span", { className: "sg-meta-label", children: "Signed on" }),
3472
- /* @__PURE__ */ jsx("b", { children: chainLabel(e) })
3498
+ /* @__PURE__ */ jsx("b", { children: chainLabel2(e) })
3473
3499
  ] }),
3474
3500
  e.recipient ? /* @__PURE__ */ jsxs("div", { className: "sg-meta-row", children: [
3475
3501
  /* @__PURE__ */ jsx("span", { className: "sg-meta-label", children: "Recipient" }),
@@ -6125,6 +6151,86 @@ function QuoteSheet(props) {
6125
6151
  ] })
6126
6152
  ] });
6127
6153
  }
6154
+
6155
+ // src/react/ui/cost.ts
6156
+ function tenPow(d) {
6157
+ let x = 1n;
6158
+ for (let i = 0; i < d; i++) x *= 10n;
6159
+ return x;
6160
+ }
6161
+ function divRoundNearest(n, d) {
6162
+ if (d === 0n) return 0n;
6163
+ const sign = n < 0n !== d < 0n ? -1n : 1n;
6164
+ const an = n < 0n ? -n : n;
6165
+ const ad = d < 0n ? -d : d;
6166
+ let q = an / ad;
6167
+ const r = an - q * ad;
6168
+ if (r * 2n >= ad) q += 1n;
6169
+ return sign * q;
6170
+ }
6171
+ function parSpreadBps(fromAmountRaw, fromDecimals, toAmountRaw, toDecimals) {
6172
+ try {
6173
+ const from = BigInt(fromAmountRaw);
6174
+ const to = BigInt(toAmountRaw);
6175
+ if (from <= 0n) return null;
6176
+ const pFrom = tenPow(fromDecimals);
6177
+ const pTo = tenPow(toDecimals);
6178
+ const den = from * pTo;
6179
+ if (den === 0n) return null;
6180
+ return Number(divRoundNearest((den - to * pFrom) * 100000n, den)) / 10;
6181
+ } catch {
6182
+ return null;
6183
+ }
6184
+ }
6185
+ function totalCostBps(fromUsd, toUsd) {
6186
+ if (fromUsd == null || toUsd == null) return null;
6187
+ if (!Number.isFinite(fromUsd) || !Number.isFinite(toUsd) || fromUsd <= 0) return null;
6188
+ return (fromUsd - toUsd) / fromUsd * 1e4;
6189
+ }
6190
+ function costBasisFor(fromSymbol, toSymbol) {
6191
+ return assetClassOf(fromSymbol) === "stable" && assetClassOf(toSymbol) === "stable" ? "tokens" : "value";
6192
+ }
6193
+ function quoteCostBps(input) {
6194
+ if (!input.fromSymbol || !input.toSymbol) return null;
6195
+ if (costBasisFor(input.fromSymbol, input.toSymbol) === "value") {
6196
+ const usd = (amount, price) => price === void 0 || !amount ? null : Number(amount) * price;
6197
+ return totalCostBps(usd(input.send, input.fromPrice), usd(input.receive, input.toPrice));
6198
+ }
6199
+ try {
6200
+ if (!input.send || !input.receive) return null;
6201
+ return parSpreadBps(parseUnitsDecimal(input.send, 18).toString(), 18, parseUnitsDecimal(input.receive, 18).toString(), 18);
6202
+ } catch {
6203
+ return null;
6204
+ }
6205
+ }
6206
+ function statedCentibips(fee) {
6207
+ const c = fee?.zeroDeltaFeeCentibips;
6208
+ return typeof c === "number" && Number.isSafeInteger(c) && c >= 0 ? c : null;
6209
+ }
6210
+ function centibipsPct(centibips) {
6211
+ if (centibips === 0) return "0%";
6212
+ const whole = Math.floor(centibips / 1e4);
6213
+ const frac = String(centibips % 1e4).padStart(4, "0").replace(/0+$/, "").padEnd(2, "0");
6214
+ return `${whole}.${frac}%`;
6215
+ }
6216
+ function zeroDeltaFeeLabel(fee, native) {
6217
+ const centibips = statedCentibips(fee);
6218
+ if (centibips === null) return "--";
6219
+ const pct = centibipsPct(centibips);
6220
+ const raw = fee?.zeroDeltaFeeNative;
6221
+ if (typeof raw !== "string" || !/^\d+$/.test(raw) || BigInt(raw) === 0n) return pct;
6222
+ return `${pct} + ${formatUnits(raw, native.decimals, 8)} ${native.symbol}`;
6223
+ }
6224
+ function formatCostBps(bps) {
6225
+ const rounded = Number(bps.toFixed(1));
6226
+ const sign = rounded < 0 ? "\u2212" : "+";
6227
+ return `${sign}${Math.abs(rounded).toFixed(1)} bps`;
6228
+ }
6229
+ function rateImpactLabel(totalBps, fee) {
6230
+ if (totalBps === null) return "--";
6231
+ const centibips = statedCentibips(fee);
6232
+ return formatCostBps(totalBps - (centibips === null ? 0 : centibips / 100));
6233
+ }
6128
6234
  var FIAT = [
6129
6235
  { code: "USD", glyph: "$", label: "US Dollar" },
6130
6236
  { code: "EUR", glyph: "\u20AC", label: "Euro" },
@@ -6192,6 +6298,8 @@ function ExchangeCard(props) {
6192
6298
  const order = new Map(SUPPORTED_CHAINS.map((id, i) => [id, i]));
6193
6299
  return [...catalogue?.chains ?? []].sort((a, b) => (order.get(Number(a.chainId)) ?? 99) - (order.get(Number(b.chainId)) ?? 99) || Number(a.chainId) - Number(b.chainId));
6194
6300
  }, [catalogue]);
6301
+ const chainRow = useMemo(() => new Map(chains.map((c) => [Number(c.chainId), c])), [chains]);
6302
+ const nameOf = (id) => id ? chainLabel(id, chainRow.get(id)) : void 0;
6195
6303
  const tokens = useMemo(() => catalogue?.tokens ?? [], [catalogue]);
6196
6304
  const sourceTokens = useMemo(() => catalogue?.sources ?? [], [catalogue]);
6197
6305
  const [view, setView] = useState("main");
@@ -6482,6 +6590,13 @@ function ExchangeCard(props) {
6482
6590
  const complianceHasQuote = solActive ? Boolean(solFlow.plan && solFlow.status !== "quoting") : Boolean(selected && flow.status !== "loading");
6483
6591
  const fromUsd = usdOf2(normalizedAmount, prices[from?.symbol ?? ""]);
6484
6592
  const toUsd = usdOf2(receive, prices[to?.symbol ?? ""]);
6593
+ const statedFee = solActive ? solFlow.preview : addressed ? selected?.quote : preview.data;
6594
+ const feeNative = solActive ? { symbol: "SOL", decimals: 9 } : { symbol: nativeSymbol(from?.chainId ?? 1, chains), decimals: 18 };
6595
+ const feeLabel = hasQuote ? zeroDeltaFeeLabel(statedFee, feeNative) : "--";
6596
+ const rateImpact = hasQuote ? rateImpactLabel(
6597
+ quoteCostBps({ send: normalizedAmount, receive, fromSymbol: from?.symbol, toSymbol: to?.symbol, fromPrice: prices[from?.symbol ?? ""], toPrice: prices[to?.symbol ?? ""] }),
6598
+ statedFee
6599
+ ) : "--";
6485
6600
  const flippable = !rampMode && !submitting && Boolean(to && sourceTokens.some((t) => Number(t.chainId) === to.chainId && symbolKey(t.symbol) === to.symbol));
6486
6601
  const flip = () => {
6487
6602
  if (!flippable) return;
@@ -6572,7 +6687,8 @@ function ExchangeCard(props) {
6572
6687
  { label: "You send", value: `${normalizedAmount} ${fromTicker}` },
6573
6688
  { label: "You receive", value: `${receive} ${toTicker}` },
6574
6689
  ...rate ? [{ label: "Rate", value: `1 ${fromTicker} = ${rate} ${toTicker}` }] : [],
6575
- { label: "Fee", value: `${meta?.feeBps ?? 0} bps` },
6690
+ { label: "Rate impact", value: rateImpact },
6691
+ { label: "Fee", value: feeLabel },
6576
6692
  { label: "Network fee", value: networkFee },
6577
6693
  ...eta ? [{ label: "Estimated time", value: eta }] : []
6578
6694
  ],
@@ -6629,6 +6745,7 @@ function ExchangeCard(props) {
6629
6745
  balances,
6630
6746
  optionStates: isFrom ? void 0 : destinationStates,
6631
6747
  loading: !catalogue?.ready,
6748
+ walletMissing: (t) => isSolanaChainId(t.chainId) && !solanaWallet.address,
6632
6749
  onBack: () => closeSelector(isFrom),
6633
6750
  onPick: (pick) => {
6634
6751
  (isFrom ? setFrom : setTo)({ chainId: pick.chainId, symbol: symbolKey(pick.symbol) });
@@ -6681,8 +6798,8 @@ function ExchangeCard(props) {
6681
6798
  ] })
6682
6799
  ] });
6683
6800
  } else {
6684
- const payToken = mode === "onramp" ? /* @__PURE__ */ jsx(FiatButton, { fiat, onCurrency: setFiatCurrency, disabled: submitting }) : /* @__PURE__ */ jsx(TokenButton, { label: "You pay", symbol: from?.symbol ?? null, chainId: from?.chainId ?? null, token: fromToken, disabled: submitting, btnRef: fromTileRef, onClick: () => setView("from") });
6685
- const receiveToken = mode === "offramp" ? /* @__PURE__ */ jsx(FiatButton, { fiat, onCurrency: setFiatCurrency, disabled: submitting }) : /* @__PURE__ */ jsx(TokenButton, { label: "You receive", symbol: to?.symbol ?? null, chainId: to?.chainId ?? null, token: toToken, disabled: submitting, btnRef: toTileRef, onClick: () => setView("to") });
6801
+ const payToken = mode === "onramp" ? /* @__PURE__ */ jsx(FiatButton, { fiat, onCurrency: setFiatCurrency, disabled: submitting }) : /* @__PURE__ */ jsx(TokenButton, { label: "You pay", symbol: from?.symbol ?? null, chainId: from?.chainId ?? null, chainName: nameOf(from?.chainId), token: fromToken, disabled: submitting, btnRef: fromTileRef, onClick: () => setView("from") });
6802
+ const receiveToken = mode === "offramp" ? /* @__PURE__ */ jsx(FiatButton, { fiat, onCurrency: setFiatCurrency, disabled: submitting }) : /* @__PURE__ */ jsx(TokenButton, { label: "You receive", symbol: to?.symbol ?? null, chainId: to?.chainId ?? null, chainName: nameOf(to?.chainId), token: toToken, disabled: submitting, btnRef: toTileRef, onClick: () => setView("to") });
6686
6803
  const cta = solActive ? /* @__PURE__ */ jsxs("div", { className: "sg-cta-wrap", children: [
6687
6804
  solanaSteps,
6688
6805
  solanaCta,
@@ -6703,9 +6820,9 @@ function ExchangeCard(props) {
6703
6820
  body = wide ? /* @__PURE__ */ jsxs(Fragment, { children: [
6704
6821
  /* @__PURE__ */ jsxs("div", { className: "sg-stack", children: [
6705
6822
  /* @__PURE__ */ jsxs("div", { className: "sg-ft", children: [
6706
- mode === "onramp" ? /* @__PURE__ */ jsx(FiatTile, { label: "From", currency: fiatCurrency, onCurrency: setFiatCurrency }) : /* @__PURE__ */ jsx(TokenTile, { label: "From", pick: from, token: fromToken, disabled: submitting, btnRef: fromTileRef, onClick: () => setView("from") }),
6823
+ mode === "onramp" ? /* @__PURE__ */ jsx(FiatTile, { label: "From", currency: fiatCurrency, onCurrency: setFiatCurrency }) : /* @__PURE__ */ jsx(TokenTile, { label: "From", pick: from, chainName: nameOf(from?.chainId), token: fromToken, disabled: submitting, btnRef: fromTileRef, onClick: () => setView("from") }),
6707
6824
  /* @__PURE__ */ jsx(FlipButton, { small: true, onClick: flip, disabled: !flippable }),
6708
- mode === "offramp" ? /* @__PURE__ */ jsx(FiatTile, { label: "To", currency: fiatCurrency, onCurrency: setFiatCurrency }) : /* @__PURE__ */ jsx(TokenTile, { label: "To", pick: to, token: toToken, disabled: submitting, btnRef: toTileRef, onClick: () => setView("to") })
6825
+ mode === "offramp" ? /* @__PURE__ */ jsx(FiatTile, { label: "To", currency: fiatCurrency, onCurrency: setFiatCurrency }) : /* @__PURE__ */ jsx(TokenTile, { label: "To", pick: to, chainName: nameOf(to?.chainId), token: toToken, disabled: submitting, btnRef: toTileRef, onClick: () => setView("to") })
6709
6826
  ] }),
6710
6827
  /* @__PURE__ */ jsxs("div", { className: "sg-pane", "data-kind": "send", children: [
6711
6828
  /* @__PURE__ */ jsxs("div", { className: "sg-pane-top", children: [
@@ -6804,7 +6921,7 @@ function ExchangeCard(props) {
6804
6921
  ] }),
6805
6922
  /* @__PURE__ */ jsxs("div", { className: "sg-recv-sub", children: [
6806
6923
  "On ",
6807
- CHAIN_LABELS[to?.chainId ?? 0] || `Chain ${to?.chainId}`
6924
+ nameOf(to?.chainId) ?? `Chain ${to?.chainId}`
6808
6925
  ] })
6809
6926
  ] }),
6810
6927
  /* @__PURE__ */ jsxs("div", { className: "sg-stack", children: [
@@ -769,7 +769,9 @@ var CHAIN_DISPLAY_NAMES = Object.freeze({
769
769
  9745: "Plasma",
770
770
  34443: "Mode",
771
771
  42161: "Arbitrum One",
772
- 43114: "Avalanche C-Chain",
772
+ // "Avalanche", as the dApp prints it since zd-dapp#582 (from ZD Heavy's /chains). The widget's
773
+ // registry read lists no row for a payout-only chain, so this table is what names it here.
774
+ 43114: "Avalanche",
773
775
  48900: "Zircuit",
774
776
  57073: "Ink",
775
777
  59144: "Linea",
@@ -1899,6 +1901,8 @@ function normalizePreview(request, quote, to, amount) {
1899
1901
  estimatedDuration: Number(option.estimatedTimeSec || 0),
1900
1902
  via: null,
1901
1903
  nativeFeeRaw: String(option.gasCostSource || "0"),
1904
+ zeroDeltaFeeCentibips: option.zeroDeltaFeeCentibips,
1905
+ zeroDeltaFeeNative: option.zeroDeltaFeeNative,
1902
1906
  quote,
1903
1907
  option,
1904
1908
  txData: option.txData,
@@ -1936,7 +1940,9 @@ async function previewSolanaSource(api, input) {
1936
1940
  feeBps: Number(option.feeBps || 0),
1937
1941
  estimatedDuration: Number(option.estimatedTimeSec || 0),
1938
1942
  via: null,
1939
- nativeFeeRaw: "0"
1943
+ nativeFeeRaw: "0",
1944
+ zeroDeltaFeeCentibips: option.zeroDeltaFeeCentibips,
1945
+ zeroDeltaFeeNative: option.zeroDeltaFeeNative
1940
1946
  };
1941
1947
  }
1942
1948
  function solanaQuoteCompliance(quote) {
@@ -2761,6 +2767,12 @@ function humanizeComplianceReason(raw2) {
2761
2767
  }
2762
2768
  case "blocked_jurisdiction":
2763
2769
  return `Your region (${cleanJurisdiction(detail)}) isn't supported.`;
2770
+ // zd-dapp src/lib/complianceReason.ts (#588): ZD Heavy's account-country and wallet-origin rules.
2771
+ // Without these two the payer read the raw code ("account blocked country — IR").
2772
+ case "account_blocked_country":
2773
+ return `Your account doesn't support this region (${cleanJurisdiction(detail)}).`;
2774
+ case "blocked_origin_jurisdiction":
2775
+ return `The wallet's attributed region (${cleanJurisdiction(detail)}) isn't supported.`;
2764
2776
  case "blocked_destination_jurisdiction":
2765
2777
  return `The destination region (${cleanJurisdiction(detail)}) isn't supported.`;
2766
2778
  case "jurisdiction_out_of_scope":
@@ -3455,6 +3467,8 @@ async function buildRoute({
3455
3467
  quote: {
3456
3468
  bridge: quote.bridge,
3457
3469
  feeBps: quote.feeBps,
3470
+ zeroDeltaFeeCentibips: quote.zeroDeltaFeeCentibips,
3471
+ zeroDeltaFeeNative: quote.zeroDeltaFeeNative,
3458
3472
  estimatedDuration: quote.estimatedDuration,
3459
3473
  gasCostSource: quote.gasCostSource,
3460
3474
  msgValue: valueRaw.toString(),
@@ -3475,7 +3489,7 @@ var CHANNEL_HEADER = "x-zd-channel";
3475
3489
  var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
3476
3490
  var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
3477
3491
  var WIDGET_CHANNEL = "widget";
3478
- var WIDGET_VERSION = "4.15.1" ;
3492
+ var WIDGET_VERSION = "4.16.0" ;
3479
3493
  var MAX_CHANNEL_VERSION_LEN = 32;
3480
3494
  function sanitizeVersion(raw2) {
3481
3495
  const v = String(raw2).trim();
@@ -4065,6 +4079,8 @@ async function quoteSwapPreview(api, swap, owner) {
4065
4079
  return {
4066
4080
  receive: formatUnits(final, assetDecimals(destToken)),
4067
4081
  receiveRaw: final.toString(),
4082
+ zeroDeltaFeeCentibips: quote.zeroDeltaFeeCentibips,
4083
+ zeroDeltaFeeNative: quote.zeroDeltaFeeNative,
4068
4084
  fromAmount: v.amountIn,
4069
4085
  fromToken: sourceToken.symbol,
4070
4086
  toToken: destToken.symbol,
@@ -1,5 +1,5 @@
1
- import { N as NormalizedOrder, s as ApiClient, t as SwapInput, P as Plan, C as Compliance, S as SanitizedTxEntry, T as Token, Q as Quote, u as PayOption, h as RouteResult, b as Chain, R as Route, a as Catalogue, v as RwaVault, F as FetchQuoteFn, w as SolveResult, O as OrderRequest, x as BalanceTarget, y as BalanceEntry, z as PlannedTx, D as Verifier, f as ExchangeProduct, i as TxHistoryEntry, E as EngineConfig } from '../verify-CoPaE02j.cjs';
2
- export { G as Address, H as ApiError, A as Availability, I as BLOCK_LABEL_DEFAULT, B as BrokenLane, J as COMPLIANCE_CHECK_ORDER, K as COMPLIANCE_DENY_LABEL, M as CatalogueContext, U as CatalogueInput, c as ComplianceCheck, X as ComplianceCheckId, Y as ComplianceDecision, d as ComplianceTone, e as ComplianceView, Z as DIRECT_CHECK_IDS, _ as DIRECT_SCOPE_NOTE, $ as Destination, a0 as FLOOR_CATEGORIES, a1 as Hex, a2 as LaneAvailabilityState, L as LaneLimit, a3 as PlannedTxKind, a4 as QuoteBlock, a5 as ResolvedConfig, a6 as RouteHealth, a7 as RouteHealthAvailability, a8 as RouteHealthLane, g as RouteLeg, a9 as SCREENING_BUCKETS, aa as ScreenProvider, ab as ScreeningBucket, ac as ScreeningOutcome, ad as TUNABLE_CATEGORIES, ae as TxPlan, V as VerifyResult, W as WalletScreen, af as amountFieldError, ag as apiError, j as assetClassOf, ah as blockLabelFor, ai as brokenLaneFor, k as brokenLaneReason, aj as buildCatalogue, ak as canAttachApiKey, al as categoryLabel, am as classifyQuoteError, l as complianceChecks, an as complianceControlsEvaluated, m as complianceControlsLine, ao as complianceReasonHead, ap as complianceReasonTag, aq as complianceTagOf, n as complianceView, o as counterpartTokens, ar as createApiClient, as as createVerifier, p as destinationAvailability, at as destinationKeys, au as directComplianceFromScreens, av as distinctScreenedWallets, aw as exceedsLaneLimit, ax as executableRoutes, ay as executionChainIds, q as formatJurisdiction, az as hasReachableDestination, aA as hubDeliverableSymbols, r as humanizeComplianceReason, aB as isExecutableBridge, aC as isKnownUnbridgeable, aD as isSellableRwa, aE as isSourceToken, aF as laneAvailabilityState, aG as laneKey, aH as laneKeys, aI as laneLimitAmount, aJ as laneLimitError, aK as laneLimitFor, aL as laneLimitHint, aM as laneLimitSymbol, aN as limitedLanes, aO as parseAllowedApiBase, aP as productAssets, aQ as registryRpc, aR as resolveApiBase, aS as resolveConfig, aT as screeningOutcomeOf, aU as sourceKeys, aV as suppressedLanes, aW as tokenKey, aX as txMatchesPlan, aY as unattributedComplianceReasons } from '../verify-CoPaE02j.cjs';
1
+ import { N as NormalizedOrder, s as ApiClient, t as SwapInput, P as Plan, C as Compliance, S as SanitizedTxEntry, T as Token, Q as Quote, u as PayOption, h as RouteResult, b as Chain, R as Route, a as Catalogue, v as RwaVault, F as FetchQuoteFn, w as SolveResult, O as OrderRequest, x as BalanceTarget, y as BalanceEntry, z as PlannedTx, D as Verifier, f as ExchangeProduct, i as TxHistoryEntry, E as EngineConfig } from '../verify-BBREdvIM.cjs';
2
+ export { G as Address, H as ApiError, A as Availability, I as BLOCK_LABEL_DEFAULT, B as BrokenLane, J as COMPLIANCE_CHECK_ORDER, K as COMPLIANCE_DENY_LABEL, M as CatalogueContext, U as CatalogueInput, c as ComplianceCheck, X as ComplianceCheckId, Y as ComplianceDecision, d as ComplianceTone, e as ComplianceView, Z as DIRECT_CHECK_IDS, _ as DIRECT_SCOPE_NOTE, $ as Destination, a0 as FLOOR_CATEGORIES, a1 as Hex, a2 as LaneAvailabilityState, L as LaneLimit, a3 as PlannedTxKind, a4 as QuoteBlock, a5 as ResolvedConfig, a6 as RouteHealth, a7 as RouteHealthAvailability, a8 as RouteHealthLane, g as RouteLeg, a9 as SCREENING_BUCKETS, aa as ScreenProvider, ab as ScreeningBucket, ac as ScreeningOutcome, ad as TUNABLE_CATEGORIES, ae as TxPlan, V as VerifyResult, W as WalletScreen, af as amountFieldError, ag as apiError, j as assetClassOf, ah as blockLabelFor, ai as brokenLaneFor, k as brokenLaneReason, aj as buildCatalogue, ak as canAttachApiKey, al as categoryLabel, am as classifyQuoteError, l as complianceChecks, an as complianceControlsEvaluated, m as complianceControlsLine, ao as complianceReasonHead, ap as complianceReasonTag, aq as complianceTagOf, n as complianceView, o as counterpartTokens, ar as createApiClient, as as createVerifier, p as destinationAvailability, at as destinationKeys, au as directComplianceFromScreens, av as distinctScreenedWallets, aw as exceedsLaneLimit, ax as executableRoutes, ay as executionChainIds, q as formatJurisdiction, az as hasReachableDestination, aA as hubDeliverableSymbols, r as humanizeComplianceReason, aB as isExecutableBridge, aC as isKnownUnbridgeable, aD as isSellableRwa, aE as isSourceToken, aF as laneAvailabilityState, aG as laneKey, aH as laneKeys, aI as laneLimitAmount, aJ as laneLimitError, aK as laneLimitFor, aL as laneLimitHint, aM as laneLimitSymbol, aN as limitedLanes, aO as parseAllowedApiBase, aP as productAssets, aQ as registryRpc, aR as resolveApiBase, aS as resolveConfig, aT as screeningOutcomeOf, aU as sourceKeys, aV as suppressedLanes, aW as tokenKey, aX as txMatchesPlan, aY as unattributedComplianceReasons } from '../verify-BBREdvIM.cjs';
3
3
 
4
4
  /** Default request base for the widget: the same-origin keyless custody proxy (server injects the
5
5
  * ZeroDelta key). A host may override to `/api/v1` + an apiKey for the demo-first fallback path. */
@@ -225,6 +225,10 @@ interface SwapPreview {
225
225
  /** The quote's `gasCostSource` in wei — the native fee a LayerZero leg attaches, before the
226
226
  * widget's buffer. "0" when the route charges none. Display only. */
227
227
  nativeFeeRaw: string;
228
+ /** ZeroDelta's own fee on this quote, as the gateway states it (`zeroDeltaFeeCentibips`, centibips of the
229
+ * input; `zeroDeltaFeeNative`, source-chain native base units). Absent when not stated. Display only. */
230
+ zeroDeltaFeeCentibips?: unknown;
231
+ zeroDeltaFeeNative?: unknown;
228
232
  }
229
233
  declare function quoteSwapPreview(api: ApiClient, swap: SwapInput, owner?: string): Promise<SwapPreview>;
230
234
  declare function buildSwapPlan(api: ApiClient, swap: SwapInput, payer: string, wallet?: {
@@ -1,5 +1,5 @@
1
- import { N as NormalizedOrder, s as ApiClient, t as SwapInput, P as Plan, C as Compliance, S as SanitizedTxEntry, T as Token, Q as Quote, u as PayOption, h as RouteResult, b as Chain, R as Route, a as Catalogue, v as RwaVault, F as FetchQuoteFn, w as SolveResult, O as OrderRequest, x as BalanceTarget, y as BalanceEntry, z as PlannedTx, D as Verifier, f as ExchangeProduct, i as TxHistoryEntry, E as EngineConfig } from '../verify-CoPaE02j.js';
2
- export { G as Address, H as ApiError, A as Availability, I as BLOCK_LABEL_DEFAULT, B as BrokenLane, J as COMPLIANCE_CHECK_ORDER, K as COMPLIANCE_DENY_LABEL, M as CatalogueContext, U as CatalogueInput, c as ComplianceCheck, X as ComplianceCheckId, Y as ComplianceDecision, d as ComplianceTone, e as ComplianceView, Z as DIRECT_CHECK_IDS, _ as DIRECT_SCOPE_NOTE, $ as Destination, a0 as FLOOR_CATEGORIES, a1 as Hex, a2 as LaneAvailabilityState, L as LaneLimit, a3 as PlannedTxKind, a4 as QuoteBlock, a5 as ResolvedConfig, a6 as RouteHealth, a7 as RouteHealthAvailability, a8 as RouteHealthLane, g as RouteLeg, a9 as SCREENING_BUCKETS, aa as ScreenProvider, ab as ScreeningBucket, ac as ScreeningOutcome, ad as TUNABLE_CATEGORIES, ae as TxPlan, V as VerifyResult, W as WalletScreen, af as amountFieldError, ag as apiError, j as assetClassOf, ah as blockLabelFor, ai as brokenLaneFor, k as brokenLaneReason, aj as buildCatalogue, ak as canAttachApiKey, al as categoryLabel, am as classifyQuoteError, l as complianceChecks, an as complianceControlsEvaluated, m as complianceControlsLine, ao as complianceReasonHead, ap as complianceReasonTag, aq as complianceTagOf, n as complianceView, o as counterpartTokens, ar as createApiClient, as as createVerifier, p as destinationAvailability, at as destinationKeys, au as directComplianceFromScreens, av as distinctScreenedWallets, aw as exceedsLaneLimit, ax as executableRoutes, ay as executionChainIds, q as formatJurisdiction, az as hasReachableDestination, aA as hubDeliverableSymbols, r as humanizeComplianceReason, aB as isExecutableBridge, aC as isKnownUnbridgeable, aD as isSellableRwa, aE as isSourceToken, aF as laneAvailabilityState, aG as laneKey, aH as laneKeys, aI as laneLimitAmount, aJ as laneLimitError, aK as laneLimitFor, aL as laneLimitHint, aM as laneLimitSymbol, aN as limitedLanes, aO as parseAllowedApiBase, aP as productAssets, aQ as registryRpc, aR as resolveApiBase, aS as resolveConfig, aT as screeningOutcomeOf, aU as sourceKeys, aV as suppressedLanes, aW as tokenKey, aX as txMatchesPlan, aY as unattributedComplianceReasons } from '../verify-CoPaE02j.js';
1
+ import { N as NormalizedOrder, s as ApiClient, t as SwapInput, P as Plan, C as Compliance, S as SanitizedTxEntry, T as Token, Q as Quote, u as PayOption, h as RouteResult, b as Chain, R as Route, a as Catalogue, v as RwaVault, F as FetchQuoteFn, w as SolveResult, O as OrderRequest, x as BalanceTarget, y as BalanceEntry, z as PlannedTx, D as Verifier, f as ExchangeProduct, i as TxHistoryEntry, E as EngineConfig } from '../verify-BBREdvIM.js';
2
+ export { G as Address, H as ApiError, A as Availability, I as BLOCK_LABEL_DEFAULT, B as BrokenLane, J as COMPLIANCE_CHECK_ORDER, K as COMPLIANCE_DENY_LABEL, M as CatalogueContext, U as CatalogueInput, c as ComplianceCheck, X as ComplianceCheckId, Y as ComplianceDecision, d as ComplianceTone, e as ComplianceView, Z as DIRECT_CHECK_IDS, _ as DIRECT_SCOPE_NOTE, $ as Destination, a0 as FLOOR_CATEGORIES, a1 as Hex, a2 as LaneAvailabilityState, L as LaneLimit, a3 as PlannedTxKind, a4 as QuoteBlock, a5 as ResolvedConfig, a6 as RouteHealth, a7 as RouteHealthAvailability, a8 as RouteHealthLane, g as RouteLeg, a9 as SCREENING_BUCKETS, aa as ScreenProvider, ab as ScreeningBucket, ac as ScreeningOutcome, ad as TUNABLE_CATEGORIES, ae as TxPlan, V as VerifyResult, W as WalletScreen, af as amountFieldError, ag as apiError, j as assetClassOf, ah as blockLabelFor, ai as brokenLaneFor, k as brokenLaneReason, aj as buildCatalogue, ak as canAttachApiKey, al as categoryLabel, am as classifyQuoteError, l as complianceChecks, an as complianceControlsEvaluated, m as complianceControlsLine, ao as complianceReasonHead, ap as complianceReasonTag, aq as complianceTagOf, n as complianceView, o as counterpartTokens, ar as createApiClient, as as createVerifier, p as destinationAvailability, at as destinationKeys, au as directComplianceFromScreens, av as distinctScreenedWallets, aw as exceedsLaneLimit, ax as executableRoutes, ay as executionChainIds, q as formatJurisdiction, az as hasReachableDestination, aA as hubDeliverableSymbols, r as humanizeComplianceReason, aB as isExecutableBridge, aC as isKnownUnbridgeable, aD as isSellableRwa, aE as isSourceToken, aF as laneAvailabilityState, aG as laneKey, aH as laneKeys, aI as laneLimitAmount, aJ as laneLimitError, aK as laneLimitFor, aL as laneLimitHint, aM as laneLimitSymbol, aN as limitedLanes, aO as parseAllowedApiBase, aP as productAssets, aQ as registryRpc, aR as resolveApiBase, aS as resolveConfig, aT as screeningOutcomeOf, aU as sourceKeys, aV as suppressedLanes, aW as tokenKey, aX as txMatchesPlan, aY as unattributedComplianceReasons } from '../verify-BBREdvIM.js';
3
3
 
4
4
  /** Default request base for the widget: the same-origin keyless custody proxy (server injects the
5
5
  * ZeroDelta key). A host may override to `/api/v1` + an apiKey for the demo-first fallback path. */
@@ -225,6 +225,10 @@ interface SwapPreview {
225
225
  /** The quote's `gasCostSource` in wei — the native fee a LayerZero leg attaches, before the
226
226
  * widget's buffer. "0" when the route charges none. Display only. */
227
227
  nativeFeeRaw: string;
228
+ /** ZeroDelta's own fee on this quote, as the gateway states it (`zeroDeltaFeeCentibips`, centibips of the
229
+ * input; `zeroDeltaFeeNative`, source-chain native base units). Absent when not stated. Display only. */
230
+ zeroDeltaFeeCentibips?: unknown;
231
+ zeroDeltaFeeNative?: unknown;
228
232
  }
229
233
  declare function quoteSwapPreview(api: ApiClient, swap: SwapInput, owner?: string): Promise<SwapPreview>;
230
234
  declare function buildSwapPlan(api: ApiClient, swap: SwapInput, payer: string, wallet?: {
@@ -1 +1 @@
1
- export { API_CACHE_TTL_MS, BLOCK_LABEL_DEFAULT, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CANONICAL_SOLANA_PROGRAM, CHAIN_DISPLAY_NAMES, COMPLIANCE_CHECK_ORDER, COMPLIANCE_DENY_LABEL, DEFAULT_WIDGET_API_BASE, DIRECT_CHECK_IDS, DIRECT_SCOPE_NOTE, ERC20_ALLOWANCE_SELECTOR, ERC20_APPROVE_SELECTOR, ERC20_BALANCEOF_SELECTOR, ERC20_TRANSFER_SELECTOR, EXECUTABLE_STABLE_ASSETS, FLOOR_CATEGORIES, LZ_FEE_BUFFER_BPS, MAX_LZ_MSG_VALUE_WEI, MAX_LZ_MSG_VALUE_WEI_BY_CHAIN, MAX_QUOTE_CANDIDATES, MAX_SAME_CLASS_PAY_BPS, MAX_UINT64, NO_PARTNER_ID, PREVIEW_OWNER, QUOTE_BUFFER_BPS, SAME_CLASS_STABLE, SCREENING_BUCKETS, SCREEN_CACHE_TTL_MS, SOLANA_CHAIN_ID, SOLANA_DESTINATION_ASSETS, SOL_SHORTFALL_MESSAGE, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_DISCRIMINATOR, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, SolanaSendError, TRACKING, TRADEABLE_RWA_ASSETS, TUNABLE_CATEGORIES, WALLET_HISTORY_LIMIT, ZERO_ADDRESS, addressWord, allowanceCovers, amountFieldError, apiError, applyLayerZeroBuffer, askCovers, askTokenDecimals, assertAddress, assertChainAddress, assertQuoteMatchesSelection, assertWalletMessage, assetClassOf, assetDecimals, associatedTokenAddress, base58Decode, base58Encode, base64Decode, base64Encode, blockLabelFor, brokenLaneFor, brokenLaneReason, buildCatalogue, buildPayOptions, buildRoute, buildSolanaSourcePlan, buildSwapPlan, bytes32Word, bytesEqual, bytesPayload, canAttachApiKey, categoryLabel, chainAddressKey, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, checkSolanaPlan as checkPlan, checkSolanaPlan, checkSolanaProgram, checkSolanaReceiver, checkSolanaRouteBuffer, classifyQuoteError, complianceChecks, complianceControlsEvaluated, complianceControlsLine, complianceReasonHead, complianceReasonTag, complianceTagOf, complianceView, cosignSolanaEvent, counterpartTokens, createApiClient, createEngine, createSolanaRpc, createVerifier, decodeSolanaSubmitOrder, decodeSolanaSubmitOrder as decodeSubmitOrder, decodeSubmitOrderCalldata, deriveSolanaEvent, destinationAvailability, destinationKeys, directComplianceFromScreens, distinctScreenedWallets, encodeAllowance, encodeApprove, encodeBalanceOf, encodeNextSolanaOrders, encodeSubmitOrder, encodeTransfer, exceedsLaneLimit, executableRoutes, executeSolanaPlan, executeSolanaPlanStaged, executionChainIds, expectedSolanaDelivery, fetchDelivery, fetchPaymentPlan, fetchWalletHistory, finalOf, findProgramAddress, findToken, foldTicker, formatJurisdiction, formatNative, formatUnits, hasReachableDestination, hexBytes, hexToSolanaKey, historyEntryFromOrder, historyKey, hubDeliverableSymbols, humanizeComplianceReason, isAddress, isChainAddress, isDeliverable, isExecutableBridge, isHexAddress, isHexData, isHexQuantity, isKnownUnbridgeable, isLayerZeroRoute, isOnEd25519Curve, isPreparationInstruction, isSellableRwa, isSolanaAddress, isSolanaChainId, isSourceToken, isSubmitOrder, laneAvailabilityState, laneKey, laneKeys, laneLimitAmount, laneLimitError, laneLimitFor, laneLimitHint, laneLimitSymbol, limitedLanes, maxDeadlineSeconds, maxNativeFeeWei, mergeHistory, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeDelivery, normalizeOrderRequest, normalizeOrderRequests, overwriteBlockhash, parseAddressLookupTable, parseAllowedApiBase, parseSolanaTransaction, parseUnitsDecimal, placeSignature, planErrorSummary, planMsgValueHex, pollSolanaConfirmation, previewSolanaSource, productAssets, quotePartnerId, quotePayOption, quoteSolanaSource, quoteSwapPreview, readSolanaBalance, recommendedDeadlineSeconds, registryRpc, requiresNativeBridgeFee, resolveApiBase, resolveConfig, resolveSolanaKeys, resolveSwapReceiver, resolveVaultIcon, routeNativeValue, safeTicker, scaleDecimals, screeningOutcomeOf, serializeSolanaTransaction, sha256, simulateSolanaCost, solanaBridgeOf, solanaDestinationAsset, solanaKeyBytes, solanaKeyHex, solanaLamportShortfall, solanaPlanNeedsPreparation, solanaQuoteCompliance, solveExactIn, solveExactOut, sourceKeys, stableGenieIntentSchema, strip0x, suppressedLanes, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenKey, tokenTicker, txMatchesPlan, uint64Word, uintWord, unattributedComplianceReasons, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, verifySolanaSubmit, verifySolanaTransaction, verifySolanaSubmit as verifySubmit, verifySolanaTransaction as verifyTransaction, withVaultArtwork } from '../chunk-SKVRYU3E.js';
1
+ export { API_CACHE_TTL_MS, BLOCK_LABEL_DEFAULT, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CANONICAL_SOLANA_PROGRAM, CHAIN_DISPLAY_NAMES, COMPLIANCE_CHECK_ORDER, COMPLIANCE_DENY_LABEL, DEFAULT_WIDGET_API_BASE, DIRECT_CHECK_IDS, DIRECT_SCOPE_NOTE, ERC20_ALLOWANCE_SELECTOR, ERC20_APPROVE_SELECTOR, ERC20_BALANCEOF_SELECTOR, ERC20_TRANSFER_SELECTOR, EXECUTABLE_STABLE_ASSETS, FLOOR_CATEGORIES, LZ_FEE_BUFFER_BPS, MAX_LZ_MSG_VALUE_WEI, MAX_LZ_MSG_VALUE_WEI_BY_CHAIN, MAX_QUOTE_CANDIDATES, MAX_SAME_CLASS_PAY_BPS, MAX_UINT64, NO_PARTNER_ID, PREVIEW_OWNER, QUOTE_BUFFER_BPS, SAME_CLASS_STABLE, SCREENING_BUCKETS, SCREEN_CACHE_TTL_MS, SOLANA_CHAIN_ID, SOLANA_DESTINATION_ASSETS, SOL_SHORTFALL_MESSAGE, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_DISCRIMINATOR, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, SolanaSendError, TRACKING, TRADEABLE_RWA_ASSETS, TUNABLE_CATEGORIES, WALLET_HISTORY_LIMIT, ZERO_ADDRESS, addressWord, allowanceCovers, amountFieldError, apiError, applyLayerZeroBuffer, askCovers, askTokenDecimals, assertAddress, assertChainAddress, assertQuoteMatchesSelection, assertWalletMessage, assetClassOf, assetDecimals, associatedTokenAddress, base58Decode, base58Encode, base64Decode, base64Encode, blockLabelFor, brokenLaneFor, brokenLaneReason, buildCatalogue, buildPayOptions, buildRoute, buildSolanaSourcePlan, buildSwapPlan, bytes32Word, bytesEqual, bytesPayload, canAttachApiKey, categoryLabel, chainAddressKey, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, checkSolanaPlan as checkPlan, checkSolanaPlan, checkSolanaProgram, checkSolanaReceiver, checkSolanaRouteBuffer, classifyQuoteError, complianceChecks, complianceControlsEvaluated, complianceControlsLine, complianceReasonHead, complianceReasonTag, complianceTagOf, complianceView, cosignSolanaEvent, counterpartTokens, createApiClient, createEngine, createSolanaRpc, createVerifier, decodeSolanaSubmitOrder, decodeSolanaSubmitOrder as decodeSubmitOrder, decodeSubmitOrderCalldata, deriveSolanaEvent, destinationAvailability, destinationKeys, directComplianceFromScreens, distinctScreenedWallets, encodeAllowance, encodeApprove, encodeBalanceOf, encodeNextSolanaOrders, encodeSubmitOrder, encodeTransfer, exceedsLaneLimit, executableRoutes, executeSolanaPlan, executeSolanaPlanStaged, executionChainIds, expectedSolanaDelivery, fetchDelivery, fetchPaymentPlan, fetchWalletHistory, finalOf, findProgramAddress, findToken, foldTicker, formatJurisdiction, formatNative, formatUnits, hasReachableDestination, hexBytes, hexToSolanaKey, historyEntryFromOrder, historyKey, hubDeliverableSymbols, humanizeComplianceReason, isAddress, isChainAddress, isDeliverable, isExecutableBridge, isHexAddress, isHexData, isHexQuantity, isKnownUnbridgeable, isLayerZeroRoute, isOnEd25519Curve, isPreparationInstruction, isSellableRwa, isSolanaAddress, isSolanaChainId, isSourceToken, isSubmitOrder, laneAvailabilityState, laneKey, laneKeys, laneLimitAmount, laneLimitError, laneLimitFor, laneLimitHint, laneLimitSymbol, limitedLanes, maxDeadlineSeconds, maxNativeFeeWei, mergeHistory, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeDelivery, normalizeOrderRequest, normalizeOrderRequests, overwriteBlockhash, parseAddressLookupTable, parseAllowedApiBase, parseSolanaTransaction, parseUnitsDecimal, placeSignature, planErrorSummary, planMsgValueHex, pollSolanaConfirmation, previewSolanaSource, productAssets, quotePartnerId, quotePayOption, quoteSolanaSource, quoteSwapPreview, readSolanaBalance, recommendedDeadlineSeconds, registryRpc, requiresNativeBridgeFee, resolveApiBase, resolveConfig, resolveSolanaKeys, resolveSwapReceiver, resolveVaultIcon, routeNativeValue, safeTicker, scaleDecimals, screeningOutcomeOf, serializeSolanaTransaction, sha256, simulateSolanaCost, solanaBridgeOf, solanaDestinationAsset, solanaKeyBytes, solanaKeyHex, solanaLamportShortfall, solanaPlanNeedsPreparation, solanaQuoteCompliance, solveExactIn, solveExactOut, sourceKeys, stableGenieIntentSchema, strip0x, suppressedLanes, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenKey, tokenTicker, txMatchesPlan, uint64Word, uintWord, unattributedComplianceReasons, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, verifySolanaSubmit, verifySolanaTransaction, verifySolanaSubmit as verifySubmit, verifySolanaTransaction as verifyTransaction, withVaultArtwork } from '../chunk-7FBWRHP2.js';