@glacislabs/stablegenie-zerodelta 4.2.1 → 4.4.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/dist/index.cjs CHANGED
@@ -568,6 +568,10 @@ function brokenLaneFor(token, source, brokenLanes) {
568
568
  if (!source || !brokenLanes) return void 0;
569
569
  return brokenLanes.get(laneKey(source.chainId, source.address, token.chainId, token.address));
570
570
  }
571
+ function laneLimitFor(token, source, limitedLanes2) {
572
+ if (!source || !limitedLanes2) return void 0;
573
+ return limitedLanes2.get(laneKey(source.chainId, source.address, token.chainId, token.address));
574
+ }
571
575
  function destinationAvailability(token, ctx, source) {
572
576
  if (brokenLaneFor(token, source ?? void 0, ctx.brokenLanes)) return "unreachable";
573
577
  if (directLaneOK(token, source ?? void 0, ctx.lanes)) {
@@ -623,7 +627,17 @@ function buildCatalogue(input) {
623
627
  );
624
628
  const byId = new Map(enabledChains.map((c) => [Number(c.chainId), c]));
625
629
  for (const id of chainIds) if (!byId.has(id)) byId.set(id, { chainId: id, isEnabled: true });
626
- return { ...ctx, product, tokens: catalogue, sources, chainIds, chains: [...byId.values()], ready, vaultIcons: input.vaultIcons ?? /* @__PURE__ */ new Map() };
630
+ return {
631
+ ...ctx,
632
+ product,
633
+ tokens: catalogue,
634
+ sources,
635
+ chainIds,
636
+ chains: [...byId.values()],
637
+ ready,
638
+ vaultIcons: input.vaultIcons ?? /* @__PURE__ */ new Map(),
639
+ limitedLanes: input.limitedLanes ?? /* @__PURE__ */ new Map()
640
+ };
627
641
  }
628
642
 
629
643
  // src/core/options.ts
@@ -758,23 +772,89 @@ function nativeFeeShortMessage(check, symbol, chainName3) {
758
772
 
759
773
  // src/core/route-health.ts
760
774
  var EMPTY = /* @__PURE__ */ new Map();
775
+ var NO_LIMITS = /* @__PURE__ */ new Map();
776
+ function laneAvailabilityState(lane) {
777
+ const availability = lane?.availability;
778
+ if (!availability || typeof availability !== "object") return null;
779
+ const state = availability.state;
780
+ return state === "available" || state === "limited" || state === "unavailable" ? state : null;
781
+ }
782
+ function isSuppressed(lane) {
783
+ const state = laneAvailabilityState(lane);
784
+ if (state) return state === "unavailable";
785
+ const firewalled = lane.status === "unknown" && lane.kind === "firewalled";
786
+ return lane.status === "broken" || firewalled;
787
+ }
761
788
  function suppressedLanes(health) {
762
789
  if (health?.mode !== "enforce" || !Array.isArray(health.lanes)) return EMPTY;
763
790
  const out = /* @__PURE__ */ new Map();
764
791
  for (const lane of health.lanes) {
765
- const firewalled = lane?.status === "unknown" && lane?.kind === "firewalled";
766
- if (lane?.status !== "broken" && !firewalled) continue;
792
+ if (!lane || typeof lane !== "object" || !isSuppressed(lane)) continue;
767
793
  const key = typeof lane.laneKey === "string" ? lane.laneKey.toLowerCase() : "";
768
794
  if (!key) continue;
795
+ const availability = laneAvailabilityState(lane) ? lane.availability : void 0;
796
+ const code = typeof availability?.code === "string" && availability.code ? availability.code : lane.code;
797
+ const message = typeof availability?.message === "string" && availability.message ? availability.message : lane.message;
769
798
  out.set(key, {
770
799
  route: typeof lane.route === "string" ? lane.route : "",
771
- code: typeof lane.code === "string" ? lane.code : "",
772
- message: typeof lane.message === "string" ? lane.message : "",
800
+ code: typeof code === "string" ? code : "",
801
+ message: typeof message === "string" ? message : "",
773
802
  ...typeof lane.kind === "string" ? { kind: lane.kind } : {}
774
803
  });
775
804
  }
776
805
  return out;
777
806
  }
807
+ var BASE_UNITS = /^\d{1,78}$/;
808
+ function limitedLanes(health) {
809
+ if (health?.mode !== "enforce" || !Array.isArray(health.lanes)) return NO_LIMITS;
810
+ const out = /* @__PURE__ */ new Map();
811
+ for (const lane of health.lanes) {
812
+ if (!lane || typeof lane !== "object" || laneAvailabilityState(lane) !== "limited") continue;
813
+ const key = typeof lane.laneKey === "string" ? lane.laneKey.toLowerCase() : "";
814
+ const limit = lane.availability?.limit;
815
+ if (!key || !limit || typeof limit !== "object") continue;
816
+ const side = limit.side === "bid" || limit.side === "ask" ? limit.side : null;
817
+ const maxAmount = typeof limit.maxAmount === "string" ? limit.maxAmount.trim() : "";
818
+ const decimals = limit.decimals;
819
+ if (!side || !BASE_UNITS.test(maxAmount) || typeof decimals !== "number" || !Number.isInteger(decimals) || decimals < 0 || decimals > 36) continue;
820
+ const code = lane.availability?.code;
821
+ out.set(key, {
822
+ side,
823
+ token: typeof limit.token === "string" ? limit.token : "",
824
+ fromChainId: Number(limit.fromChainId) || 0,
825
+ toChainId: Number(limit.toChainId) || 0,
826
+ maxAmount,
827
+ decimals,
828
+ code: typeof code === "string" ? code : "",
829
+ ...typeof limit.measuredAt === "string" ? { measuredAt: limit.measuredAt } : {}
830
+ });
831
+ }
832
+ return out;
833
+ }
834
+ function exceedsLaneLimit(limit, amount, bidDecimals) {
835
+ if (limit?.side !== "bid" || !BASE_UNITS.test(limit.maxAmount)) return false;
836
+ let raw;
837
+ try {
838
+ raw = parseUnitsDecimal(amount, bidDecimals);
839
+ } catch {
840
+ return false;
841
+ }
842
+ const scale = Math.max(bidDecimals, limit.decimals);
843
+ return scaleDecimals(raw, bidDecimals, scale) > scaleDecimals(BigInt(limit.maxAmount), limit.decimals, scale);
844
+ }
845
+ function laneLimitAmount(limit) {
846
+ return formatUnits(limit.maxAmount, limit.decimals);
847
+ }
848
+ function laneLimitSymbol(limit, bidTicker) {
849
+ if (limit.side === "bid" && bidTicker) return bidTicker;
850
+ return safeTicker(limit.token, limit.token);
851
+ }
852
+ function laneLimitHint(limit, symbol) {
853
+ return `Max ${laneLimitAmount(limit)}${symbol ? ` ${symbol}` : ""} right now`;
854
+ }
855
+ function laneLimitError(limit, symbol) {
856
+ return `Maximum: ${laneLimitAmount(limit)}${symbol ? ` ${symbol}` : ""} right now`;
857
+ }
778
858
  function brokenLaneReason(lane) {
779
859
  if (!lane) return "";
780
860
  switch (lane.kind) {
@@ -1283,9 +1363,18 @@ async function solveExactIn({ option, destination, destinationToken, payer, fetc
1283
1363
  // src/core/order.ts
1284
1364
  var DEFAULT_DEADLINE_SECONDS = 1800;
1285
1365
  var MAX_DEADLINE_SECONDS = 60 * 60;
1286
- function normalizeOrderRequest(order, payer, destination, fallbackExecutionChainId, deadlineOverride) {
1366
+ var ABSOLUTE_MAX_DEADLINE_SECONDS = 24 * 60 * 60;
1367
+ function recommendedDeadlineSeconds(quote) {
1368
+ const recommended = Number(quote?.recommendedDeadlineSeconds);
1369
+ if (!Number.isFinite(recommended) || recommended <= 0) return DEFAULT_DEADLINE_SECONDS;
1370
+ return Math.min(Math.floor(recommended), ABSOLUTE_MAX_DEADLINE_SECONDS);
1371
+ }
1372
+ function maxDeadlineSeconds(quote) {
1373
+ return Math.min(Math.max(MAX_DEADLINE_SECONDS, recommendedDeadlineSeconds(quote)), ABSOLUTE_MAX_DEADLINE_SECONDS);
1374
+ }
1375
+ function normalizeOrderRequest(order, payer, destination, fallbackExecutionChainId, deadlineOverride, lifetimeSeconds = DEFAULT_DEADLINE_SECONDS) {
1287
1376
  const apiDeadline = Number(order.deadline);
1288
- const deadline = deadlineOverride ?? (Number.isFinite(apiDeadline) && apiDeadline > 0 ? String(order.deadline) : String(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE_SECONDS));
1377
+ const deadline = deadlineOverride ?? (Number.isFinite(apiDeadline) && apiDeadline > 0 ? String(order.deadline) : String(Math.floor(Date.now() / 1e3) + lifetimeSeconds));
1289
1378
  const executionChainId = String(order.executionChainId || fallbackExecutionChainId || "0");
1290
1379
  if (!/^\d+$/.test(executionChainId) || BigInt(executionChainId) <= 0n) throw new Error("ZeroDelta quote did not include an execution chain.");
1291
1380
  return {
@@ -1300,10 +1389,10 @@ function normalizeOrderRequest(order, payer, destination, fallbackExecutionChain
1300
1389
  deadline
1301
1390
  };
1302
1391
  }
1303
- function normalizeOrderRequests(requests, payer, destination, fallbackExecutionChainId) {
1392
+ function normalizeOrderRequests(requests, payer, destination, fallbackExecutionChainId, lifetimeSeconds = DEFAULT_DEADLINE_SECONDS) {
1304
1393
  if (!requests.length) throw new Error("ZeroDelta quote did not include any order requests.");
1305
1394
  return requests.map(
1306
- (request, index) => index === 0 ? normalizeOrderRequest(request, payer, destination, fallbackExecutionChainId) : normalizeOrderRequest(request, payer, destination, fallbackExecutionChainId, String(request.deadline || "0"))
1395
+ (request, index) => index === 0 ? normalizeOrderRequest(request, payer, destination, fallbackExecutionChainId, void 0, lifetimeSeconds) : normalizeOrderRequest(request, payer, destination, fallbackExecutionChainId, String(request.deadline || "0"))
1307
1396
  );
1308
1397
  }
1309
1398
  function assertQuoteMatchesSelection({ quote, order, orders, option, destinationToken, destination, payer, result }) {
@@ -1353,7 +1442,8 @@ function assertQuoteMatchesSelection({ quote, order, orders, option, destination
1353
1442
  if (BigInt(finalOrder.askTokenAmount || "0") < BigInt(result.recipientReceivesRaw || "0")) {
1354
1443
  throw new Error("ZeroDelta order guarantees less than the displayed receive amount.");
1355
1444
  }
1356
- if (!Number.isFinite(deadline) || deadline <= now || deadline > now + MAX_DEADLINE_SECONDS) {
1445
+ const maxDeadline = maxDeadlineSeconds(quote);
1446
+ if (!Number.isFinite(deadline) || deadline <= now || deadline > now + maxDeadline) {
1357
1447
  throw new Error("ZeroDelta quote deadline is invalid or too far in the future.");
1358
1448
  }
1359
1449
  for (let index = 1; index < list.length; index += 1) {
@@ -1366,7 +1456,7 @@ function assertQuoteMatchesSelection({ quote, order, orders, option, destination
1366
1456
  throw new Error("ZeroDelta chained quote returned disconnected execution chains.");
1367
1457
  }
1368
1458
  const followupDeadline = Number(current.deadline || 0);
1369
- if (followupDeadline !== 0 && (!Number.isFinite(followupDeadline) || followupDeadline <= now || followupDeadline > now + MAX_DEADLINE_SECONDS)) {
1459
+ if (followupDeadline !== 0 && (!Number.isFinite(followupDeadline) || followupDeadline <= now || followupDeadline > now + maxDeadline)) {
1370
1460
  throw new Error("ZeroDelta chained quote returned an invalid follow-up deadline.");
1371
1461
  }
1372
1462
  }
@@ -1529,7 +1619,7 @@ async function buildRoute({
1529
1619
  if (!requestList.length) throw new Error("ZeroDelta quote did not include an order request.");
1530
1620
  const sourceChain = chainById(chains, option.chainId);
1531
1621
  const escrow = checkEscrow(option.chainId, quote.escrowAddress, sourceChain?.escrowContract);
1532
- const orders = normalizeOrderRequests(requestList, payer, destination, quote.executionChainId);
1622
+ const orders = normalizeOrderRequests(requestList, payer, destination, quote.executionChainId, recommendedDeadlineSeconds(quote));
1533
1623
  const order = orders[0];
1534
1624
  assertQuoteMatchesSelection({ quote, order, orders, option, destinationToken, destination, payer, result });
1535
1625
  const needsNativeFee = requiresNativeBridgeFee(quote, option);
@@ -1669,10 +1759,18 @@ function classifyQuoteError(error) {
1669
1759
  message: `This payment was blocked by compliance screening \u2014 the recipient is ${label}. Choose a different recipient or connect a different wallet.`
1670
1760
  };
1671
1761
  }
1762
+ function amountFieldError(error) {
1763
+ const fieldErrors = error?.fieldErrors;
1764
+ if (!Array.isArray(fieldErrors)) return null;
1765
+ const entry = fieldErrors.find((e) => e && typeof e === "object" && e.field === "fromAmount" && typeof e.message === "string");
1766
+ const message = entry ? sanitizeMessage(entry.message, "") : "";
1767
+ return message || null;
1768
+ }
1672
1769
  function nowFresh(entry) {
1673
1770
  return !!entry && Date.now() - entry.at < API_CACHE_TTL_MS;
1674
1771
  }
1675
1772
  function isTransientQuoteError(error) {
1773
+ if (error?.code === "BRIDGE_RATE_LIMITED" || Array.isArray(error?.fieldErrors) && error.fieldErrors.length > 0) return false;
1676
1774
  return error?.code === "gateway_timeout" || error?.status === 502 || error?.status === 503 || error?.status === 504 || /failed to get swap quote|timeout|temporar/i.test(error?.message || "");
1677
1775
  }
1678
1776
  function wait(ms) {
@@ -1724,6 +1822,7 @@ function createApiClient(cfg) {
1724
1822
  status: response.status,
1725
1823
  code: json?.error?.code || json?.code || (response.status >= 502 ? "gateway_timeout" : "api_error"),
1726
1824
  fieldErrors: json?.error?.fieldErrors || json?.fieldErrors,
1825
+ limits: json?.error?.limits || json?.limits,
1727
1826
  reasons: json?.error?.reasons || json?.reasons
1728
1827
  });
1729
1828
  }
@@ -2512,6 +2611,8 @@ function createEngine(config = {}) {
2512
2611
  ...allowed ? { allowedAssets: allowed } : {},
2513
2612
  supportedChainIds: SUPPORTED_CHAIN_IDS,
2514
2613
  brokenLanes: suppressedLanes(health),
2614
+ // Same read, same degraded mode: a null health response limits nothing.
2615
+ limitedLanes: limitedLanes(health),
2515
2616
  vaultIcons
2516
2617
  });
2517
2618
  },
@@ -2813,6 +2914,7 @@ function useFlow(args) {
2813
2914
  const [plan, setPlan] = react.useState(null);
2814
2915
  const [selectedId, setSelectedId] = react.useState(null);
2815
2916
  const [error, setError] = react.useState(null);
2917
+ const [fieldError, setFieldError] = react.useState(null);
2816
2918
  const [insufficient, setInsufficient] = react.useState(false);
2817
2919
  const [nativeShortfall, setNativeShortfall] = react.useState(null);
2818
2920
  const [steps, setSteps] = react.useState([]);
@@ -2827,6 +2929,7 @@ function useFlow(args) {
2827
2929
  const reload = react.useCallback(() => setNonce((n) => n + 1), []);
2828
2930
  react.useEffect(() => {
2829
2931
  if (busyRef.current) return;
2932
+ setFieldError(null);
2830
2933
  if (!enabled || !wallet.account) {
2831
2934
  setStatus("idle");
2832
2935
  setPlan(null);
@@ -2850,6 +2953,7 @@ function useFlow(args) {
2850
2953
  if (id !== reqId.current) return;
2851
2954
  setPlan(null);
2852
2955
  setError(e?.message || "Could not price this right now.");
2956
+ setFieldError(amountFieldError(e));
2853
2957
  setStatus("error");
2854
2958
  onError?.(e instanceof Error ? e : new Error(String(e)));
2855
2959
  }
@@ -3016,6 +3120,7 @@ function useFlow(args) {
3016
3120
  selected,
3017
3121
  selectRoute: setSelectedId,
3018
3122
  error,
3123
+ fieldError,
3019
3124
  insufficient,
3020
3125
  nativeShortfall,
3021
3126
  steps,
@@ -3253,6 +3358,10 @@ img.sg-tok-badge{width:16px;padding:0;object-fit:cover;background:var(--sg-bg)}
3253
3358
  .sg-send-row{display:flex;align-items:center;gap:12px}
3254
3359
  .sg-send-row .sg-amount{flex:1 1 auto;min-width:0}
3255
3360
  .sg-send-bal{font-size:11px;color:var(--sg-text-muted);margin-top:6px}
3361
+ /* the line under the amount: a lane's current size limit (muted), or why the amount is refused (danger) */
3362
+ .sg-amount-note{font-size:12px;font-weight:600;line-height:1.35;color:var(--sg-text-muted);margin-top:6px}
3363
+ .sg-amount-note[data-tone="error"]{color:var(--sg-danger)}
3364
+ .sg-amount[aria-invalid="true"]{color:var(--sg-danger)}
3256
3365
  .sg-pct-row{display:flex;gap:8px;margin-top:12px}
3257
3366
  .sg-pct{flex:1 1 0;padding:7px 0;border-radius:var(--sg-radius-cta);border:1px solid var(--sg-border);background:var(--sg-bg);color:var(--sg-text-muted);font:inherit;font-size:12px;font-weight:600;cursor:pointer;transition:color 120ms ease,border-color 120ms ease}
3258
3367
  .sg-pct:hover:not(:disabled){color:var(--sg-accent);border-color:var(--sg-accent)}
@@ -3294,6 +3403,8 @@ img.sg-tok-badge{width:16px;padding:0;object-fit:cover;background:var(--sg-bg)}
3294
3403
  .sg-tokrow--off:hover,.sg-tokrow[disabled]:hover{background:transparent}
3295
3404
  .sg-tokrow--off .sg-tokrow-sym,.sg-tokrow--off .sg-tokrow-name,.sg-tokrow--off .sg-tokrow-bal{color:var(--sg-text-muted)}
3296
3405
  .sg-tokrow-hint{display:block;font-size:11px;font-weight:600;color:var(--sg-danger)}
3406
+ /* on a row that stays selectable (a limited lane): a caveat, not a refusal */
3407
+ .sg-tokrow-hint[data-tone="note"]{color:var(--sg-text-muted)}
3297
3408
  .sg-sel-empty{padding:26px 10px;text-align:center;font-size:13px;color:var(--sg-text-muted)}
3298
3409
 
3299
3410
  /* wide (duo) layout: main card + receive/routes side card. The collapse is keyed to the WIDGET'S
@@ -3830,10 +3941,16 @@ function AmountInput(props) {
3830
3941
  placeholder: props.placeholder ?? "0.0",
3831
3942
  value: props.value,
3832
3943
  disabled: props.disabled,
3944
+ "aria-invalid": props.invalid || void 0,
3945
+ "aria-describedby": props.describedBy,
3833
3946
  onChange: (e) => props.onChange(e.target.value.replace(/[^0-9.,]/g, ""))
3834
3947
  }
3835
3948
  );
3836
3949
  }
3950
+ function AmountNote(props) {
3951
+ const error = props.tone === "error";
3952
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { id: props.id, className: "sg-amount-note", "data-tone": error ? "error" : void 0, role: error ? "alert" : void 0, children: props.children });
3953
+ }
3837
3954
  function StatusPanel(props) {
3838
3955
  const tone = props.tone ?? "neutral";
3839
3956
  return (
@@ -4442,7 +4559,7 @@ function TokenSelect(props) {
4442
4559
  ] }),
4443
4560
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "sg-tokrow-end", children: [
4444
4561
  bal ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-tokrow-bal sg-mono", children: bal.formatted }) : null,
4445
- disabled && st?.hint ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-tokrow-hint", children: st.hint }) : null,
4562
+ st?.hint ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-tokrow-hint", "data-tone": disabled ? void 0 : "note", children: st.hint }) : null,
4446
4563
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-tokrow-chain", children: CHAIN_LABELS[chainId] || `Chain ${chainId}` })
4447
4564
  ] })
4448
4565
  ]
@@ -5046,7 +5163,40 @@ function PaymentIsland(props) {
5046
5163
  const exToAsset = exTo?.symbol;
5047
5164
  const normEx = normalizeDecimalText(exAmount);
5048
5165
  const exAmountValid = /^\d+(\.\d+)?$/.test(normEx) && Number(normEx) > 0 && Number(normEx) <= 1e9;
5049
- const exQuotable = !rampMode && exAmountValid && Boolean(exFromChainId && exFromAsset && exToChainId && exToAsset);
5166
+ const [catalogue, setCatalogue] = react.useState(null);
5167
+ react.useEffect(() => {
5168
+ if (bankSettlement || !isPay && rampMode) return;
5169
+ let alive = true;
5170
+ engine.fetchCatalogue(isPay ? void 0 : exAllowed, isPay ? "stable" : exProduct).then((next) => {
5171
+ if (alive) setCatalogue(next);
5172
+ });
5173
+ return () => {
5174
+ alive = false;
5175
+ };
5176
+ }, [engine, isPay, rampMode, bankSettlement, exAllowed, exProduct]);
5177
+ const chains = react.useMemo(() => {
5178
+ const order = new Map(SUPPORTED_CHAINS.map((id, i) => [id, i]));
5179
+ return [...catalogue?.chains ?? []].sort((a, b) => (order.get(Number(a.chainId)) ?? 99) - (order.get(Number(b.chainId)) ?? 99) || Number(a.chainId) - Number(b.chainId));
5180
+ }, [catalogue]);
5181
+ const registryTokens = react.useMemo(() => catalogue?.tokens ?? [], [catalogue]);
5182
+ const exchangeTokens = react.useMemo(() => isPay ? [] : registryTokens, [isPay, registryTokens]);
5183
+ const exSourceTokens = react.useMemo(() => isPay ? [] : catalogue?.sources ?? [], [isPay, catalogue]);
5184
+ const exFromToken = react.useMemo(() => exFrom ? findToken(exchangeTokens, exFrom.chainId, exFrom.symbol) : null, [exchangeTokens, exFrom]);
5185
+ const exToToken = react.useMemo(() => exTo ? findToken(exchangeTokens, exTo.chainId, exTo.symbol) : null, [exchangeTokens, exTo]);
5186
+ const exLaneLimit = react.useMemo(
5187
+ () => !isPay && !rampMode && exFromToken && exToToken ? laneLimitFor(exToToken, exFromToken, catalogue?.limitedLanes) : void 0,
5188
+ [isPay, rampMode, catalogue, exFromToken, exToToken]
5189
+ );
5190
+ const exLimitSymbol = exLaneLimit ? laneLimitSymbol(exLaneLimit, exFromToken ? tokenTicker(exFromToken) : void 0) : "";
5191
+ const exOverLimit = react.useMemo(() => {
5192
+ if (!exLaneLimit || !exFromToken || !exAmountValid) return false;
5193
+ try {
5194
+ return exceedsLaneLimit(exLaneLimit, normEx, assetDecimals(exFromToken));
5195
+ } catch {
5196
+ return false;
5197
+ }
5198
+ }, [exLaneLimit, exFromToken, exAmountValid, normEx]);
5199
+ const exQuotable = !rampMode && exAmountValid && !exOverLimit && Boolean(exFromChainId && exFromAsset && exToChainId && exToAsset);
5050
5200
  const payFundingAssets = props.fundingAssets?.length ? props.fundingAssets : ["USDC", "USDT", "USDE"];
5051
5201
  const payParamsKey = `pay|${props.recipient}|${props.toChainId}|${props.toAsset}|${props.amount}|${payFundingAssets.join(",")}`;
5052
5202
  const exParamsKey = `${kind}|${mode}|${exFromChainId}|${exFromAsset}|${exToChainId}|${exToAsset}|${normEx}|${props.recipient ?? ""}`;
@@ -5130,24 +5280,6 @@ function PaymentIsland(props) {
5130
5280
  }
5131
5281
  return map;
5132
5282
  }, [annotated, holdings.loading]);
5133
- const [catalogue, setCatalogue] = react.useState(null);
5134
- react.useEffect(() => {
5135
- if (bankSettlement || !isPay && rampMode) return;
5136
- let alive = true;
5137
- engine.fetchCatalogue(isPay ? void 0 : exAllowed, isPay ? "stable" : exProduct).then((next) => {
5138
- if (alive) setCatalogue(next);
5139
- });
5140
- return () => {
5141
- alive = false;
5142
- };
5143
- }, [engine, isPay, rampMode, bankSettlement, exAllowed, exProduct]);
5144
- const chains = react.useMemo(() => {
5145
- const order = new Map(SUPPORTED_CHAINS.map((id, i) => [id, i]));
5146
- return [...catalogue?.chains ?? []].sort((a, b) => (order.get(Number(a.chainId)) ?? 99) - (order.get(Number(b.chainId)) ?? 99) || Number(a.chainId) - Number(b.chainId));
5147
- }, [catalogue]);
5148
- const registryTokens = react.useMemo(() => catalogue?.tokens ?? [], [catalogue]);
5149
- const exchangeTokens = react.useMemo(() => isPay ? [] : registryTokens, [isPay, registryTokens]);
5150
- const exSourceTokens = react.useMemo(() => isPay ? [] : catalogue?.sources ?? [], [isPay, catalogue]);
5151
5283
  const [exBalances, setExBalances] = react.useState({});
5152
5284
  const exBalReq = react.useRef(0);
5153
5285
  react.useEffect(() => {
@@ -5167,8 +5299,6 @@ function PaymentIsland(props) {
5167
5299
  if (id === exBalReq.current) setExBalances(res);
5168
5300
  });
5169
5301
  }, [engine, isPay, wallet.account, exchangeTokens]);
5170
- const exFromToken = react.useMemo(() => exFrom ? findToken(exchangeTokens, exFrom.chainId, exFrom.symbol) : null, [exchangeTokens, exFrom]);
5171
- const exToToken = react.useMemo(() => exTo ? findToken(exchangeTokens, exTo.chainId, exTo.symbol) : null, [exchangeTokens, exTo]);
5172
5302
  const exFromPicker = react.useMemo(() => exProduct === "rwa" ? counterpartTokens(exSourceTokens, exToToken) : exSourceTokens, [exProduct, exSourceTokens, exToToken]);
5173
5303
  const exToPicker = react.useMemo(() => exProduct === "rwa" ? counterpartTokens(exchangeTokens, exFromToken) : exchangeTokens, [exProduct, exchangeTokens, exFromToken]);
5174
5304
  const exRwaSeeded = react.useRef(false);
@@ -5193,7 +5323,11 @@ function PaymentIsland(props) {
5193
5323
  continue;
5194
5324
  }
5195
5325
  const verdict = destinationAvailability(token, catalogue, exFromToken);
5196
- if (verdict === "available") continue;
5326
+ if (verdict === "available") {
5327
+ const limit = laneLimitFor(token, exFromToken, catalogue.limitedLanes);
5328
+ if (limit) states[key] = { disabled: false, hint: laneLimitHint(limit, laneLimitSymbol(limit, exFromToken ? tokenTicker(exFromToken) : void 0)) };
5329
+ continue;
5330
+ }
5197
5331
  states[key] = {
5198
5332
  disabled: true,
5199
5333
  reason: verdict === "hub-only" ? `${tokenTicker(token)} cannot be delivered on this chain.` : "ZeroDelta cannot deliver this asset here.",
@@ -5309,6 +5443,7 @@ function PaymentIsland(props) {
5309
5443
  const exToTileRef = react.useRef(null);
5310
5444
  const regionRef = react.useRef(null);
5311
5445
  const panelId = react.useId();
5446
+ const exAmountNoteId = react.useId();
5312
5447
  react.useEffect(() => setView("main"), [wallet.account, payParamsKey]);
5313
5448
  react.useEffect(() => setHist(null), [wallet.account]);
5314
5449
  const firstRender = react.useRef(true);
@@ -5412,6 +5547,9 @@ function PaymentIsland(props) {
5412
5547
  const raw = BigInt(exFromBal.raw);
5413
5548
  setExAmount(formatUnits(p === 100 ? raw : raw * BigInt(p) / 100n, assetDecimals(exFromToken)));
5414
5549
  };
5550
+ const exGatewayAmountError = !isPay && exQuotable && flow.status === "error" && flow.steps.length === 0 ? flow.fieldError : null;
5551
+ const exAmountError = exOverLimit && exLaneLimit ? laneLimitError(exLaneLimit, exLimitSymbol) : exGatewayAmountError;
5552
+ const exAmountNote = exAmountError || (exLaneLimit ? laneLimitHint(exLaneLimit, exLimitSymbol) : null);
5415
5553
  const exchangeControls = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5416
5554
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-ft", style: { marginTop: 12 }, children: [
5417
5555
  /* @__PURE__ */ jsxRuntime.jsx(TokenTile, { label: "From", pick: exFrom, token: exFromToken, disabled: submitting, btnRef: exFromTileRef, onClick: () => setView("from") }),
@@ -5422,8 +5560,18 @@ function PaymentIsland(props) {
5422
5560
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-label", children: "Send" }),
5423
5561
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-send-row", children: [
5424
5562
  exFrom ? /* @__PURE__ */ jsxRuntime.jsx(TokenGlyph, { symbol: exFrom.symbol, logoUrl: exFromToken?.logoUrl, chainId: exFrom.chainId, size: "sm" }) : null,
5425
- /* @__PURE__ */ jsxRuntime.jsx(AmountInput, { value: exAmount, onChange: setExAmount, disabled: submitting })
5563
+ /* @__PURE__ */ jsxRuntime.jsx(
5564
+ AmountInput,
5565
+ {
5566
+ value: exAmount,
5567
+ onChange: setExAmount,
5568
+ disabled: submitting,
5569
+ invalid: !!exAmountError,
5570
+ describedBy: exAmountNote ? exAmountNoteId : void 0
5571
+ }
5572
+ )
5426
5573
  ] }),
5574
+ exAmountNote ? /* @__PURE__ */ jsxRuntime.jsx(AmountNote, { id: exAmountNoteId, tone: exAmountError ? "error" : "neutral", children: exAmountNote }) : null,
5427
5575
  exFromBal ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-send-bal sg-mono", children: [
5428
5576
  "Balance: ",
5429
5577
  exFromBal.formatted,
@@ -5555,7 +5703,7 @@ function PaymentIsland(props) {
5555
5703
  lastTxOwned ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-cta-wrap", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", onClick: () => setHist({ entry: flow.lastTxEntry }), children: "View transaction" }) }) : null
5556
5704
  ] });
5557
5705
  } else {
5558
- const quoteError = flow.status === "error" && flow.steps.length === 0;
5706
+ const quoteError = flow.status === "error" && flow.steps.length === 0 && !exGatewayAmountError;
5559
5707
  const walletError = flow.status === "error" && flow.steps.length > 0;
5560
5708
  body = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5561
5709
  /* @__PURE__ */ jsxRuntime.jsx(IdentityLine, { account: wallet.account, email: identity?.email }),
@@ -6226,7 +6374,11 @@ function StableGenieExchange(props) {
6226
6374
  continue;
6227
6375
  }
6228
6376
  const verdict = destinationAvailability(token, catalogue, fromToken);
6229
- if (verdict === "available") continue;
6377
+ if (verdict === "available") {
6378
+ const limit = laneLimitFor(token, fromToken, catalogue.limitedLanes);
6379
+ if (limit) states[key] = { disabled: false, hint: laneLimitHint(limit, laneLimitSymbol(limit, fromToken ? tokenTicker(fromToken) : void 0)) };
6380
+ continue;
6381
+ }
6230
6382
  states[key] = {
6231
6383
  disabled: true,
6232
6384
  reason: verdict === "hub-only" ? `${tokenTicker(token)} cannot be delivered on this chain \u2014 choose an execution chain.` : "ZeroDelta cannot deliver this asset here.",
@@ -6238,9 +6390,23 @@ function StableGenieExchange(props) {
6238
6390
  const normalizedAmount = normalizeDecimalText(amount);
6239
6391
  const amountValid = /^\d+(\.\d+)?$/.test(normalizedAmount) && Number(normalizedAmount) > 0 && Number(normalizedAmount) <= 1e9;
6240
6392
  const rampMode = mode !== "exchange";
6393
+ const laneLimit = react.useMemo(
6394
+ () => mode === "exchange" && fromToken && toToken ? laneLimitFor(toToken, fromToken, catalogue?.limitedLanes) : void 0,
6395
+ [mode, catalogue, fromToken, toToken]
6396
+ );
6397
+ const limitSymbol = laneLimit ? laneLimitSymbol(laneLimit, fromTicker) : "";
6398
+ const overLimit = react.useMemo(() => {
6399
+ if (!laneLimit || !fromToken || !amountValid) return false;
6400
+ try {
6401
+ return exceedsLaneLimit(laneLimit, normalizedAmount, assetDecimals(fromToken));
6402
+ } catch {
6403
+ return false;
6404
+ }
6405
+ }, [laneLimit, fromToken, amountValid, normalizedAmount]);
6406
+ const amountNoteId = react.useId();
6241
6407
  const inUniverse = (p) => Boolean(p && tokens.some((t) => Number(t.chainId) === p.chainId && symbolKey(t.symbol) === p.symbol));
6242
6408
  const cryptoReady = rampMode ? inUniverse(mode === "onramp" ? to : from) : inUniverse(from) && inUniverse(to);
6243
- const quotable = mode === "exchange" && inUniverse(from) && inUniverse(to) && amountValid;
6409
+ const quotable = mode === "exchange" && inUniverse(from) && inUniverse(to) && amountValid && !overLimit;
6244
6410
  const [balances, setBalances] = react.useState({});
6245
6411
  const balReq = react.useRef(0);
6246
6412
  react.useEffect(() => {
@@ -6288,7 +6454,7 @@ function StableGenieExchange(props) {
6288
6454
  engine.quoteSwapPreview({ fromChainId: from.chainId, toChainId: to.chainId, fromToken: from.symbol, toToken: to.symbol, amountIn: normalizedAmount, recipient: props.recipient }).then((data) => {
6289
6455
  if (id === prevReq.current) setPreview({ status: "ready", data });
6290
6456
  }).catch((e) => {
6291
- if (id === prevReq.current) setPreview({ status: "error", error: e instanceof Error ? e.message : String(e) });
6457
+ if (id === prevReq.current) setPreview({ status: "error", error: e instanceof Error ? e.message : String(e), fieldError: amountFieldError(e) });
6292
6458
  });
6293
6459
  }, 350);
6294
6460
  return () => clearTimeout(timer);
@@ -6298,6 +6464,9 @@ function StableGenieExchange(props) {
6298
6464
  const lastTxOwned = Boolean(flow.lastTxEntry?.hash && wallet.account && flow.lastTxEntry.account === wallet.account.toLowerCase());
6299
6465
  const quoting = connected ? flow.status === "loading" : preview.status === "loading";
6300
6466
  const quoteError = !quotable ? null : connected ? flow.status === "error" ? flow.error : null : preview.status === "error" ? preview.error ?? "No route." : null;
6467
+ const gatewayAmountError = !quoteError ? null : connected ? flow.fieldError : preview.fieldError ?? null;
6468
+ const amountError = overLimit && laneLimit ? laneLimitError(laneLimit, limitSymbol) : gatewayAmountError;
6469
+ const amountNote = mode === "exchange" ? amountError || (laneLimit ? laneLimitHint(laneLimit, limitSymbol) : null) : null;
6301
6470
  const receive = connected ? flow.selected?.receive.amount : preview.data?.receive;
6302
6471
  const meta = connected ? flow.selected ? { bridge: flow.selected.quote.bridge || "ZeroDelta", feeBps: Number(flow.selected.quote.feeBps || 0), duration: Number(flow.selected.quote.estimatedDuration || 0) } : null : preview.data ? { bridge: preview.data.bridge || "ZeroDelta", feeBps: preview.data.feeBps, duration: preview.data.estimatedDuration } : null;
6303
6472
  const pct = (p) => {
@@ -6374,8 +6543,18 @@ function StableGenieExchange(props) {
6374
6543
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-label", children: mode === "onramp" ? `You pay (${fiatCurrency})` : "Send" }),
6375
6544
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-send-row", children: [
6376
6545
  mode === "onramp" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-fiat", children: FIAT.find((f) => f.code === fiatCurrency)?.glyph ?? "$" }) : from ? /* @__PURE__ */ jsxRuntime.jsx(TokenGlyph, { symbol: from.symbol, logoUrl: fromToken?.logoUrl, chainId: from.chainId, size: "sm" }) : null,
6377
- /* @__PURE__ */ jsxRuntime.jsx(AmountInput, { value: amount, onChange: setAmount, disabled: submitting })
6546
+ /* @__PURE__ */ jsxRuntime.jsx(
6547
+ AmountInput,
6548
+ {
6549
+ value: amount,
6550
+ onChange: setAmount,
6551
+ disabled: submitting,
6552
+ invalid: !!amountError,
6553
+ describedBy: amountNote ? amountNoteId : void 0
6554
+ }
6555
+ )
6378
6556
  ] }),
6557
+ amountNote ? /* @__PURE__ */ jsxRuntime.jsx(AmountNote, { id: amountNoteId, tone: amountError ? "error" : "neutral", children: amountNote }) : null,
6379
6558
  mode !== "onramp" && fromBal ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-send-bal sg-mono", children: [
6380
6559
  "Balance: ",
6381
6560
  fromBal.formatted,
@@ -6389,7 +6568,7 @@ function StableGenieExchange(props) {
6389
6568
  ) : null
6390
6569
  ] }),
6391
6570
  rampMode ? /* @__PURE__ */ jsxRuntime.jsx(StatusPanel, { children: mode === "onramp" ? "Buy supported stablecoins with card or bank transfer \u2014 coming soon. Today the widget settles crypto-to-crypto." : "Cash out supported stablecoins to your bank \u2014 coming soon. Today the widget settles crypto-to-crypto." }) : null,
6392
- !rampMode && quoteError && !wide ? /* @__PURE__ */ jsxRuntime.jsx(StatusPanel, { tone: "error", children: quoteError }) : null,
6571
+ !rampMode && quoteError && !gatewayAmountError && !wide ? /* @__PURE__ */ jsxRuntime.jsx(StatusPanel, { tone: "error", children: quoteError }) : null,
6393
6572
  !rampMode && !wide && quotable && !quoteError ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-panel", style: { marginTop: 12 }, children: [
6394
6573
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-label", children: "You receive (estimated)" }),
6395
6574
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-anchor sg-mono", children: quoting ? "\u2026" : receive ? `${receive} ${toTicker}` : "\u2014" }),
@@ -6421,6 +6600,12 @@ function StableGenieExchange(props) {
6421
6600
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-noroutes-title", children: soonLabel }),
6422
6601
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-noroutes-sub", children: "Fiat rails are on the roadmap. Crypto-to-crypto exchange is live today." })
6423
6602
  ] });
6603
+ } else if (amountError) {
6604
+ side = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-noroutes", children: [
6605
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-noroutes-icon", children: /* @__PURE__ */ jsxRuntime.jsx(RouteGlyph, {}) }),
6606
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-noroutes-title", children: "Change the amount" }),
6607
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-noroutes-sub", children: amountError })
6608
+ ] });
6424
6609
  } else if (quoting) {
6425
6610
  side = /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
6426
6611
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-skel" }),
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- export { B as BankPayoutAccount, E as Eip1193Provider, a as ExchangeMode, L as LinkIdentity, M as MountConfig, P as PaymentIsland, b as PaymentIslandKind, c as PaymentIslandProps, S as SettlementMethod, d as StableGenieConfig, e as StableGenieExchange, f as StableGenieExchangeProps, g as StableGeniePay, h as StableGeniePayProps, i as StableGenieProvider, j as StableGenieRwaExchange, k as StableGenieSwap, l as StableGenieSwapProps, m as StableGenieTheme, n as SuccessInfo, o as SupportedAsset, p as darkTheme, q as lightTheme, r as mount, s as resolveTheme } from './mount-Dtbtdry1.cjs';
1
+ export { B as BankPayoutAccount, E as Eip1193Provider, a as ExchangeMode, L as LinkIdentity, M as MountConfig, P as PaymentIsland, b as PaymentIslandKind, c as PaymentIslandProps, S as SettlementMethod, d as StableGenieConfig, e as StableGenieExchange, f as StableGenieExchangeProps, g as StableGeniePay, h as StableGeniePayProps, i as StableGenieProvider, j as StableGenieRwaExchange, k as StableGenieSwap, l as StableGenieSwapProps, m as StableGenieTheme, n as SuccessInfo, o as SupportedAsset, p as darkTheme, q as lightTheme, r as mount, s as resolveTheme } from './mount-D8hY-a-s.cjs';
2
2
  import * as react from 'react';
3
- import { C as Compliance } from './verify-57gjg_dM.cjs';
4
- export { A as Availability, B as BrokenLane, a as Catalogue, b as Chain, c as ComplianceCheck, d as ComplianceTone, e as ComplianceView, E as EngineConfig, f as ExchangeProduct, P as Plan, R as Route, g as RouteLeg, h as RouteResult, S as SanitizedTxEntry, T as Token, i as TxHistoryEntry, V as VerifyResult, W as WalletScreen, j as assetClassOf, k as brokenLaneReason, l as complianceChecks, m as complianceControlsLine, n as complianceView, o as counterpartTokens, p as destinationAvailability, q as humanizeComplianceReason } from './verify-57gjg_dM.cjs';
3
+ import { C as Compliance } from './verify-C1VaWfiy.cjs';
4
+ export { A as Availability, B as BrokenLane, a as Catalogue, b as Chain, c as ComplianceCheck, d as ComplianceTone, e as ComplianceView, E as EngineConfig, f as ExchangeProduct, L as LaneLimit, P as Plan, R as Route, g as RouteLeg, h as RouteResult, S as SanitizedTxEntry, T as Token, i as TxHistoryEntry, V as VerifyResult, W as WalletScreen, j as assetClassOf, k as brokenLaneReason, l as complianceChecks, m as complianceControlsLine, n as complianceView, o as counterpartTokens, p as destinationAvailability, q as humanizeComplianceReason } from './verify-C1VaWfiy.cjs';
5
5
  export { EXECUTABLE_STABLE_ASSETS, Engine, STABLE_ASSETS, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, createEngine, symbolKey } from './core/index.cjs';
6
6
 
7
7
  declare function CompliancePanel(props: {
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { B as BankPayoutAccount, E as Eip1193Provider, a as ExchangeMode, L as LinkIdentity, M as MountConfig, P as PaymentIsland, b as PaymentIslandKind, c as PaymentIslandProps, S as SettlementMethod, d as StableGenieConfig, e as StableGenieExchange, f as StableGenieExchangeProps, g as StableGeniePay, h as StableGeniePayProps, i as StableGenieProvider, j as StableGenieRwaExchange, k as StableGenieSwap, l as StableGenieSwapProps, m as StableGenieTheme, n as SuccessInfo, o as SupportedAsset, p as darkTheme, q as lightTheme, r as mount, s as resolveTheme } from './mount-Bver3O2z.js';
1
+ export { B as BankPayoutAccount, E as Eip1193Provider, a as ExchangeMode, L as LinkIdentity, M as MountConfig, P as PaymentIsland, b as PaymentIslandKind, c as PaymentIslandProps, S as SettlementMethod, d as StableGenieConfig, e as StableGenieExchange, f as StableGenieExchangeProps, g as StableGeniePay, h as StableGeniePayProps, i as StableGenieProvider, j as StableGenieRwaExchange, k as StableGenieSwap, l as StableGenieSwapProps, m as StableGenieTheme, n as SuccessInfo, o as SupportedAsset, p as darkTheme, q as lightTheme, r as mount, s as resolveTheme } from './mount-Blg-caPn.js';
2
2
  import * as react from 'react';
3
- import { C as Compliance } from './verify-57gjg_dM.js';
4
- export { A as Availability, B as BrokenLane, a as Catalogue, b as Chain, c as ComplianceCheck, d as ComplianceTone, e as ComplianceView, E as EngineConfig, f as ExchangeProduct, P as Plan, R as Route, g as RouteLeg, h as RouteResult, S as SanitizedTxEntry, T as Token, i as TxHistoryEntry, V as VerifyResult, W as WalletScreen, j as assetClassOf, k as brokenLaneReason, l as complianceChecks, m as complianceControlsLine, n as complianceView, o as counterpartTokens, p as destinationAvailability, q as humanizeComplianceReason } from './verify-57gjg_dM.js';
3
+ import { C as Compliance } from './verify-C1VaWfiy.js';
4
+ export { A as Availability, B as BrokenLane, a as Catalogue, b as Chain, c as ComplianceCheck, d as ComplianceTone, e as ComplianceView, E as EngineConfig, f as ExchangeProduct, L as LaneLimit, P as Plan, R as Route, g as RouteLeg, h as RouteResult, S as SanitizedTxEntry, T as Token, i as TxHistoryEntry, V as VerifyResult, W as WalletScreen, j as assetClassOf, k as brokenLaneReason, l as complianceChecks, m as complianceControlsLine, n as complianceView, o as counterpartTokens, p as destinationAvailability, q as humanizeComplianceReason } from './verify-C1VaWfiy.js';
5
5
  export { EXECUTABLE_STABLE_ASSETS, Engine, STABLE_ASSETS, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, createEngine, symbolKey } from './core/index.js';
6
6
 
7
7
  declare function CompliancePanel(props: {
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { CompliancePanel, PaymentIsland, StableGenieExchange, StableGeniePay, StableGenieProvider, StableGenieRwaExchange, StableGenieSwap, darkTheme, lightTheme, mount, resolveTheme } from './chunk-OOESQYM3.js';
2
- export { EXECUTABLE_STABLE_ASSETS, STABLE_ASSETS, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, assetClassOf, brokenLaneReason, complianceChecks, complianceControlsLine, complianceView, counterpartTokens, createEngine, destinationAvailability, humanizeComplianceReason, symbolKey } from './chunk-FDCSZ3OY.js';
1
+ export { CompliancePanel, PaymentIsland, StableGenieExchange, StableGeniePay, StableGenieProvider, StableGenieRwaExchange, StableGenieSwap, darkTheme, lightTheme, mount, resolveTheme } from './chunk-NYIORRFU.js';
2
+ export { EXECUTABLE_STABLE_ASSETS, STABLE_ASSETS, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, assetClassOf, brokenLaneReason, complianceChecks, complianceControlsLine, complianceView, counterpartTokens, createEngine, destinationAvailability, humanizeComplianceReason, symbolKey } from './chunk-53K3BXT5.js';
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { P as Plan, V as VerifyResult, h as RouteResult, S as SanitizedTxEntry, f as ExchangeProduct } from './verify-57gjg_dM.js';
3
+ import { P as Plan, V as VerifyResult, h as RouteResult, S as SanitizedTxEntry, f as ExchangeProduct } from './verify-C1VaWfiy.js';
4
4
 
5
5
  interface Eip1193Provider {
6
6
  request(args: {
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { P as Plan, V as VerifyResult, h as RouteResult, S as SanitizedTxEntry, f as ExchangeProduct } from './verify-57gjg_dM.cjs';
3
+ import { P as Plan, V as VerifyResult, h as RouteResult, S as SanitizedTxEntry, f as ExchangeProduct } from './verify-C1VaWfiy.cjs';
4
4
 
5
5
  interface Eip1193Provider {
6
6
  request(args: {