@glacislabs/stablegenie-zerodelta 4.3.0 → 4.5.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.
@@ -1351,9 +1351,18 @@ async function solveExactIn({ option, destination, destinationToken, payer, fetc
1351
1351
  // src/core/order.ts
1352
1352
  var DEFAULT_DEADLINE_SECONDS = 1800;
1353
1353
  var MAX_DEADLINE_SECONDS = 60 * 60;
1354
- function normalizeOrderRequest(order, payer, destination, fallbackExecutionChainId, deadlineOverride) {
1354
+ var ABSOLUTE_MAX_DEADLINE_SECONDS = 24 * 60 * 60;
1355
+ function recommendedDeadlineSeconds(quote) {
1356
+ const recommended = Number(quote?.recommendedDeadlineSeconds);
1357
+ if (!Number.isFinite(recommended) || recommended <= 0) return DEFAULT_DEADLINE_SECONDS;
1358
+ return Math.min(Math.floor(recommended), ABSOLUTE_MAX_DEADLINE_SECONDS);
1359
+ }
1360
+ function maxDeadlineSeconds(quote) {
1361
+ return Math.min(Math.max(MAX_DEADLINE_SECONDS, recommendedDeadlineSeconds(quote)), ABSOLUTE_MAX_DEADLINE_SECONDS);
1362
+ }
1363
+ function normalizeOrderRequest(order, payer, destination, fallbackExecutionChainId, deadlineOverride, lifetimeSeconds = DEFAULT_DEADLINE_SECONDS) {
1355
1364
  const apiDeadline = Number(order.deadline);
1356
- const deadline = deadlineOverride ?? (Number.isFinite(apiDeadline) && apiDeadline > 0 ? String(order.deadline) : String(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE_SECONDS));
1365
+ const deadline = deadlineOverride ?? (Number.isFinite(apiDeadline) && apiDeadline > 0 ? String(order.deadline) : String(Math.floor(Date.now() / 1e3) + lifetimeSeconds));
1357
1366
  const executionChainId = String(order.executionChainId || fallbackExecutionChainId || "0");
1358
1367
  if (!/^\d+$/.test(executionChainId) || BigInt(executionChainId) <= 0n) throw new Error("ZeroDelta quote did not include an execution chain.");
1359
1368
  return {
@@ -1368,10 +1377,10 @@ function normalizeOrderRequest(order, payer, destination, fallbackExecutionChain
1368
1377
  deadline
1369
1378
  };
1370
1379
  }
1371
- function normalizeOrderRequests(requests, payer, destination, fallbackExecutionChainId) {
1380
+ function normalizeOrderRequests(requests, payer, destination, fallbackExecutionChainId, lifetimeSeconds = DEFAULT_DEADLINE_SECONDS) {
1372
1381
  if (!requests.length) throw new Error("ZeroDelta quote did not include any order requests.");
1373
1382
  return requests.map(
1374
- (request, index) => index === 0 ? normalizeOrderRequest(request, payer, destination, fallbackExecutionChainId) : normalizeOrderRequest(request, payer, destination, fallbackExecutionChainId, String(request.deadline || "0"))
1383
+ (request, index) => index === 0 ? normalizeOrderRequest(request, payer, destination, fallbackExecutionChainId, void 0, lifetimeSeconds) : normalizeOrderRequest(request, payer, destination, fallbackExecutionChainId, String(request.deadline || "0"))
1375
1384
  );
1376
1385
  }
1377
1386
  function assertQuoteMatchesSelection({ quote, order, orders, option, destinationToken, destination, payer, result }) {
@@ -1421,7 +1430,8 @@ function assertQuoteMatchesSelection({ quote, order, orders, option, destination
1421
1430
  if (BigInt(finalOrder.askTokenAmount || "0") < BigInt(result.recipientReceivesRaw || "0")) {
1422
1431
  throw new Error("ZeroDelta order guarantees less than the displayed receive amount.");
1423
1432
  }
1424
- if (!Number.isFinite(deadline) || deadline <= now || deadline > now + MAX_DEADLINE_SECONDS) {
1433
+ const maxDeadline = maxDeadlineSeconds(quote);
1434
+ if (!Number.isFinite(deadline) || deadline <= now || deadline > now + maxDeadline) {
1425
1435
  throw new Error("ZeroDelta quote deadline is invalid or too far in the future.");
1426
1436
  }
1427
1437
  for (let index = 1; index < list.length; index += 1) {
@@ -1434,7 +1444,7 @@ function assertQuoteMatchesSelection({ quote, order, orders, option, destination
1434
1444
  throw new Error("ZeroDelta chained quote returned disconnected execution chains.");
1435
1445
  }
1436
1446
  const followupDeadline = Number(current.deadline || 0);
1437
- if (followupDeadline !== 0 && (!Number.isFinite(followupDeadline) || followupDeadline <= now || followupDeadline > now + MAX_DEADLINE_SECONDS)) {
1447
+ if (followupDeadline !== 0 && (!Number.isFinite(followupDeadline) || followupDeadline <= now || followupDeadline > now + maxDeadline)) {
1438
1448
  throw new Error("ZeroDelta chained quote returned an invalid follow-up deadline.");
1439
1449
  }
1440
1450
  }
@@ -1597,7 +1607,7 @@ async function buildRoute({
1597
1607
  if (!requestList.length) throw new Error("ZeroDelta quote did not include an order request.");
1598
1608
  const sourceChain = chainById(chains, option.chainId);
1599
1609
  const escrow = checkEscrow(option.chainId, quote.escrowAddress, sourceChain?.escrowContract);
1600
- const orders = normalizeOrderRequests(requestList, payer, destination, quote.executionChainId);
1610
+ const orders = normalizeOrderRequests(requestList, payer, destination, quote.executionChainId, recommendedDeadlineSeconds(quote));
1601
1611
  const order = orders[0];
1602
1612
  assertQuoteMatchesSelection({ quote, order, orders, option, destinationToken, destination, payer, result });
1603
1613
  const needsNativeFee = requiresNativeBridgeFee(quote, option);
@@ -1685,6 +1695,48 @@ async function buildRoute({
1685
1695
  };
1686
1696
  }
1687
1697
 
1698
+ // src/core/channel.ts
1699
+ var CHANNEL_HEADER = "x-zd-channel";
1700
+ var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
1701
+ var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
1702
+ var WIDGET_CHANNEL = "widget";
1703
+ var WIDGET_VERSION = "4.5.0" ;
1704
+ var MAX_CHANNEL_VERSION_LEN = 32;
1705
+ function sanitizeVersion(raw) {
1706
+ const v = String(raw).trim();
1707
+ if (!v) return "";
1708
+ const capped = v.length > MAX_CHANNEL_VERSION_LEN ? v.slice(0, MAX_CHANNEL_VERSION_LEN) : v;
1709
+ return /^[\x20-\x7e]+$/.test(capped) ? capped : "";
1710
+ }
1711
+ function embeddingOrigin(loc) {
1712
+ const origin = ((typeof location !== "undefined" ? location : void 0))?.origin;
1713
+ const v = String(origin ?? "").trim();
1714
+ if (!v || v === "null") return "";
1715
+ try {
1716
+ const url = new URL(v);
1717
+ if (url.protocol !== "https:" && url.protocol !== "http:") return "";
1718
+ return url.origin;
1719
+ } catch {
1720
+ return "";
1721
+ }
1722
+ }
1723
+ function channelHeaders(version, loc) {
1724
+ const headers = { [CHANNEL_HEADER]: WIDGET_CHANNEL };
1725
+ const v = sanitizeVersion(version);
1726
+ if (v) headers[CHANNEL_VERSION_HEADER] = v;
1727
+ const origin = embeddingOrigin();
1728
+ if (origin) headers[CHANNEL_ORIGIN_HEADER] = origin;
1729
+ return headers;
1730
+ }
1731
+ function isReportableSubmission(report) {
1732
+ if (!report) return false;
1733
+ const { txHash, chainId, wallet } = report;
1734
+ if (typeof txHash !== "string") return false;
1735
+ if (!/^0x[0-9a-fA-F]{64}$/.test(txHash) && !/^[1-9A-HJ-NP-Za-km-z]{64,90}$/.test(txHash)) return false;
1736
+ if (typeof chainId !== "number" || !Number.isFinite(chainId) || chainId <= 0) return false;
1737
+ return typeof wallet === "string" && /^0x[0-9a-fA-F]{40}$/.test(wallet);
1738
+ }
1739
+
1688
1740
  // src/core/api.ts
1689
1741
  function apiError(message, props = {}) {
1690
1742
  const err = new Error(message);
@@ -1767,9 +1819,14 @@ function createApiClient(cfg) {
1767
1819
  const screenCache = /* @__PURE__ */ new Map();
1768
1820
  const screenInflight = /* @__PURE__ */ new Map();
1769
1821
  const apiBase = cfg.apiBase.replace(/\/$/, "");
1822
+ const channel = channelHeaders(WIDGET_VERSION);
1770
1823
  async function requestJson(path, init = {}) {
1771
1824
  const apiKey = await cfg.getApiKey();
1772
- const headers = { "Content-Type": "application/json", ...init.headers || {} };
1825
+ const headers = {
1826
+ "Content-Type": "application/json",
1827
+ ...channel,
1828
+ ...init.headers || {}
1829
+ };
1773
1830
  if (apiKey) headers["x-api-key"] = apiKey;
1774
1831
  const controller = new AbortController();
1775
1832
  const timeoutId = setTimeout(() => controller.abort(), init.timeoutMs || 15e3);
@@ -1920,7 +1977,27 @@ function createApiClient(cfg) {
1920
1977
  screenInflight.set(key, request);
1921
1978
  return request;
1922
1979
  }
1923
- return { apiRequest, fetchChains, fetchTokens, fetchRoutes, fetchRouteHealth, fetchRwaVaults, fetchQuote, screenWallet, apiBase };
1980
+ async function reportSubmission(report) {
1981
+ if (!isReportableSubmission(report)) return false;
1982
+ try {
1983
+ await apiRequest("/submissions", {
1984
+ method: "POST",
1985
+ body: JSON.stringify({
1986
+ txHash: report.txHash,
1987
+ chainId: report.chainId,
1988
+ wallet: report.wallet,
1989
+ // Absent reads as "submitted" at the gateway too; sent explicitly so
1990
+ // a reader of the wire does not have to know that.
1991
+ stage: report.stage ?? "submitted"
1992
+ }),
1993
+ timeoutMs: 5e3
1994
+ });
1995
+ return true;
1996
+ } catch {
1997
+ return false;
1998
+ }
1999
+ }
2000
+ return { apiRequest, fetchChains, fetchTokens, fetchRoutes, fetchRouteHealth, fetchRwaVaults, fetchQuote, screenWallet, reportSubmission, apiBase };
1924
2001
  }
1925
2002
 
1926
2003
  // src/core/plan.ts
@@ -2656,6 +2733,7 @@ function createEngine(config = {}) {
2656
2733
  verifySubmittedTx: verifier.verifySubmittedTx,
2657
2734
  readBalances: verifier.readBalances,
2658
2735
  readNativeBalance: verifier.readNativeBalance,
2736
+ reportSubmission: api.reportSubmission,
2659
2737
  recordTransaction: (entry) => {
2660
2738
  const clean = sanitizeTxEntry(entry);
2661
2739
  try {
@@ -2667,4 +2745,4 @@ function createEngine(config = {}) {
2667
2745
  };
2668
2746
  }
2669
2747
 
2670
- export { API_CACHE_TTL_MS, BLOCK_LABEL_DEFAULT, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, 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, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, TUNABLE_CATEGORIES, ZERO_ADDRESS, addressWord, allowanceCovers, amountFieldError, apiError, applyLayerZeroBuffer, assertAddress, assertQuoteMatchesSelection, assetClassOf, assetDecimals, blockLabelFor, brokenLaneFor, brokenLaneReason, buildCatalogue, buildPayOptions, buildRoute, buildSwapPlan, bytes32Word, bytesPayload, canAttachApiKey, categoryLabel, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, classifyQuoteError, complianceChecks, complianceControlsEvaluated, complianceControlsLine, complianceReasonHead, complianceReasonTag, complianceTagOf, complianceView, counterpartTokens, createApiClient, createEngine, createVerifier, decodeSubmitOrderCalldata, destinationAvailability, destinationKeys, directComplianceFromScreens, distinctScreenedWallets, encodeAllowance, encodeApprove, encodeBalanceOf, encodeSubmitOrder, encodeTransfer, exceedsLaneLimit, executableRoutes, executionChainIds, fetchPaymentPlan, finalOf, findToken, foldTicker, formatNative, formatUnits, hasReachableDestination, hubDeliverableSymbols, humanizeComplianceReason, isAddress, isDeliverable, isExecutableBridge, isHexAddress, isHexData, isHexQuantity, isKnownUnbridgeable, isLayerZeroRoute, isSourceToken, laneAvailabilityState, laneKey, laneKeys, laneLimitAmount, laneLimitError, laneLimitFor, laneLimitHint, laneLimitSymbol, limitedLanes, maxNativeFeeWei, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeOrderRequest, normalizeOrderRequests, parseAllowedApiBase, parseUnitsDecimal, planErrorSummary, planMsgValueHex, productAssets, quoteSwapPreview, registryRpc, requiresNativeBridgeFee, resolveApiBase, resolveConfig, resolveSwapReceiver, resolveVaultIcon, routeNativeValue, safeTicker, scaleDecimals, screeningOutcomeOf, solveExactIn, solveExactOut, sourceKeys, stableGenieIntentSchema, strip0x, suppressedLanes, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenKey, tokenTicker, txMatchesPlan, uint64Word, uintWord, unattributedComplianceReasons, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, withVaultArtwork };
2748
+ export { API_CACHE_TTL_MS, BLOCK_LABEL_DEFAULT, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, 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, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, TUNABLE_CATEGORIES, ZERO_ADDRESS, addressWord, allowanceCovers, amountFieldError, apiError, applyLayerZeroBuffer, assertAddress, assertQuoteMatchesSelection, assetClassOf, assetDecimals, blockLabelFor, brokenLaneFor, brokenLaneReason, buildCatalogue, buildPayOptions, buildRoute, buildSwapPlan, bytes32Word, bytesPayload, canAttachApiKey, categoryLabel, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, classifyQuoteError, complianceChecks, complianceControlsEvaluated, complianceControlsLine, complianceReasonHead, complianceReasonTag, complianceTagOf, complianceView, counterpartTokens, createApiClient, createEngine, createVerifier, decodeSubmitOrderCalldata, destinationAvailability, destinationKeys, directComplianceFromScreens, distinctScreenedWallets, encodeAllowance, encodeApprove, encodeBalanceOf, encodeSubmitOrder, encodeTransfer, exceedsLaneLimit, executableRoutes, executionChainIds, fetchPaymentPlan, finalOf, findToken, foldTicker, formatNative, formatUnits, hasReachableDestination, hubDeliverableSymbols, humanizeComplianceReason, isAddress, isDeliverable, isExecutableBridge, isHexAddress, isHexData, isHexQuantity, isKnownUnbridgeable, isLayerZeroRoute, isSourceToken, laneAvailabilityState, laneKey, laneKeys, laneLimitAmount, laneLimitError, laneLimitFor, laneLimitHint, laneLimitSymbol, limitedLanes, maxDeadlineSeconds, maxNativeFeeWei, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeOrderRequest, normalizeOrderRequests, parseAllowedApiBase, parseUnitsDecimal, planErrorSummary, planMsgValueHex, productAssets, quoteSwapPreview, recommendedDeadlineSeconds, registryRpc, requiresNativeBridgeFee, resolveApiBase, resolveConfig, resolveSwapReceiver, resolveVaultIcon, routeNativeValue, safeTicker, scaleDecimals, screeningOutcomeOf, solveExactIn, solveExactOut, sourceKeys, stableGenieIntentSchema, strip0x, suppressedLanes, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenKey, tokenTicker, txMatchesPlan, uint64Word, uintWord, unattributedComplianceReasons, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, withVaultArtwork };
@@ -1,4 +1,4 @@
1
- import { CHAIN_DISPLAY_NAMES, EXECUTABLE_STABLE_ASSETS, STABLE_ASSETS, SUPPORTED_ASSETS, complianceView, complianceChecks, DIRECT_CHECK_IDS, complianceTagOf, symbolKey, normalizeDecimalText, findToken, laneLimitFor, laneLimitSymbol, tokenTicker, exceedsLaneLimit, assetDecimals, parseUnitsDecimal, counterpartTokens, assetClassOf, brokenLaneFor, brokenLaneReason, destinationAvailability, laneLimitHint, tickerOn, laneLimitError, amountFieldError, SUPPORTED_CHAIN_IDS, formatUnits, unattributedComplianceReasons, distinctScreenedWallets, humanizeComplianceReason, DIRECT_SCOPE_NOTE, categoryLabel, SCREENING_BUCKETS, createEngine, routeNativeValue, checkNativeFee, nativeFeeShortLabel, nativeSymbol, nativeFeeShortMessage, allowanceCovers, validatePlannedTransaction, foldTicker, BUNDLED_RPC } from './chunk-PMVF6A2D.js';
1
+ import { CHAIN_DISPLAY_NAMES, EXECUTABLE_STABLE_ASSETS, STABLE_ASSETS, SUPPORTED_ASSETS, complianceView, complianceChecks, DIRECT_CHECK_IDS, complianceTagOf, symbolKey, normalizeDecimalText, findToken, laneLimitFor, laneLimitSymbol, tokenTicker, exceedsLaneLimit, assetDecimals, parseUnitsDecimal, counterpartTokens, assetClassOf, brokenLaneFor, brokenLaneReason, destinationAvailability, laneLimitHint, tickerOn, laneLimitError, amountFieldError, SUPPORTED_CHAIN_IDS, formatUnits, unattributedComplianceReasons, distinctScreenedWallets, humanizeComplianceReason, DIRECT_SCOPE_NOTE, categoryLabel, SCREENING_BUCKETS, createEngine, routeNativeValue, checkNativeFee, nativeFeeShortLabel, nativeSymbol, nativeFeeShortMessage, allowanceCovers, validatePlannedTransaction, foldTicker, BUNDLED_RPC } from './chunk-447DEZ5S.js';
2
2
  import { createContext, useState, useRef, useEffect, useMemo, useCallback, useId, createElement, useContext } from 'react';
3
3
  import { createRoot } from 'react-dom/client';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -284,6 +284,13 @@ function appendTxHistory(account, entry, storage2 = defaultStorage()) {
284
284
  }
285
285
 
286
286
  // src/react/hooks/useFlow.ts
287
+ function reportQuietly(engine, report, stage) {
288
+ try {
289
+ void engine.reportSubmission?.({ ...report, stage })?.catch?.(() => {
290
+ });
291
+ } catch {
292
+ }
293
+ }
287
294
  function useFlow(args) {
288
295
  const { engine, wallet, kind, enabled, paramsKey, loadPlan, recipientFor, onQuote, onSuccess, onError } = args;
289
296
  const [status, setStatus] = useState("idle");
@@ -438,11 +445,17 @@ function useFlow(args) {
438
445
  settleTx = tx;
439
446
  }
440
447
  }
448
+ if (settleHash) {
449
+ reportQuietly(engine, { txHash: settleHash, chainId: Number(sourceChainId), wallet: account }, "submitted");
450
+ }
441
451
  patch("verify", "active");
442
452
  const v = settleHash ? await engine.verifySubmittedTx({ chainId: Number(sourceChainId), hash: settleHash, from: account, to: settleTx.to, data: settleTx.data, value: settleTx.value, minNonce: minNonce ?? void 0 }) : { status: "unconfirmed" };
443
453
  setVerdict(v);
444
454
  setTxHash(settleHash || null);
445
455
  patch("verify", v.status === "confirmed" ? "done" : v.status === "mismatch" || v.status === "reverted" ? "error" : "active");
456
+ if (settleHash && v.status === "confirmed") {
457
+ reportQuietly(engine, { txHash: settleHash, chainId: Number(sourceChainId), wallet: account }, "confirmed");
458
+ }
446
459
  const entry = engine.recordTransaction({
447
460
  kind,
448
461
  hash: settleHash,
@@ -1353,9 +1353,18 @@ async function solveExactIn({ option, destination, destinationToken, payer, fetc
1353
1353
  // src/core/order.ts
1354
1354
  var DEFAULT_DEADLINE_SECONDS = 1800;
1355
1355
  var MAX_DEADLINE_SECONDS = 60 * 60;
1356
- function normalizeOrderRequest(order, payer, destination, fallbackExecutionChainId, deadlineOverride) {
1356
+ var ABSOLUTE_MAX_DEADLINE_SECONDS = 24 * 60 * 60;
1357
+ function recommendedDeadlineSeconds(quote) {
1358
+ const recommended = Number(quote?.recommendedDeadlineSeconds);
1359
+ if (!Number.isFinite(recommended) || recommended <= 0) return DEFAULT_DEADLINE_SECONDS;
1360
+ return Math.min(Math.floor(recommended), ABSOLUTE_MAX_DEADLINE_SECONDS);
1361
+ }
1362
+ function maxDeadlineSeconds(quote) {
1363
+ return Math.min(Math.max(MAX_DEADLINE_SECONDS, recommendedDeadlineSeconds(quote)), ABSOLUTE_MAX_DEADLINE_SECONDS);
1364
+ }
1365
+ function normalizeOrderRequest(order, payer, destination, fallbackExecutionChainId, deadlineOverride, lifetimeSeconds = DEFAULT_DEADLINE_SECONDS) {
1357
1366
  const apiDeadline = Number(order.deadline);
1358
- const deadline = deadlineOverride ?? (Number.isFinite(apiDeadline) && apiDeadline > 0 ? String(order.deadline) : String(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE_SECONDS));
1367
+ const deadline = deadlineOverride ?? (Number.isFinite(apiDeadline) && apiDeadline > 0 ? String(order.deadline) : String(Math.floor(Date.now() / 1e3) + lifetimeSeconds));
1359
1368
  const executionChainId = String(order.executionChainId || fallbackExecutionChainId || "0");
1360
1369
  if (!/^\d+$/.test(executionChainId) || BigInt(executionChainId) <= 0n) throw new Error("ZeroDelta quote did not include an execution chain.");
1361
1370
  return {
@@ -1370,10 +1379,10 @@ function normalizeOrderRequest(order, payer, destination, fallbackExecutionChain
1370
1379
  deadline
1371
1380
  };
1372
1381
  }
1373
- function normalizeOrderRequests(requests, payer, destination, fallbackExecutionChainId) {
1382
+ function normalizeOrderRequests(requests, payer, destination, fallbackExecutionChainId, lifetimeSeconds = DEFAULT_DEADLINE_SECONDS) {
1374
1383
  if (!requests.length) throw new Error("ZeroDelta quote did not include any order requests.");
1375
1384
  return requests.map(
1376
- (request, index) => index === 0 ? normalizeOrderRequest(request, payer, destination, fallbackExecutionChainId) : normalizeOrderRequest(request, payer, destination, fallbackExecutionChainId, String(request.deadline || "0"))
1385
+ (request, index) => index === 0 ? normalizeOrderRequest(request, payer, destination, fallbackExecutionChainId, void 0, lifetimeSeconds) : normalizeOrderRequest(request, payer, destination, fallbackExecutionChainId, String(request.deadline || "0"))
1377
1386
  );
1378
1387
  }
1379
1388
  function assertQuoteMatchesSelection({ quote, order, orders, option, destinationToken, destination, payer, result }) {
@@ -1423,7 +1432,8 @@ function assertQuoteMatchesSelection({ quote, order, orders, option, destination
1423
1432
  if (BigInt(finalOrder.askTokenAmount || "0") < BigInt(result.recipientReceivesRaw || "0")) {
1424
1433
  throw new Error("ZeroDelta order guarantees less than the displayed receive amount.");
1425
1434
  }
1426
- if (!Number.isFinite(deadline) || deadline <= now || deadline > now + MAX_DEADLINE_SECONDS) {
1435
+ const maxDeadline = maxDeadlineSeconds(quote);
1436
+ if (!Number.isFinite(deadline) || deadline <= now || deadline > now + maxDeadline) {
1427
1437
  throw new Error("ZeroDelta quote deadline is invalid or too far in the future.");
1428
1438
  }
1429
1439
  for (let index = 1; index < list.length; index += 1) {
@@ -1436,7 +1446,7 @@ function assertQuoteMatchesSelection({ quote, order, orders, option, destination
1436
1446
  throw new Error("ZeroDelta chained quote returned disconnected execution chains.");
1437
1447
  }
1438
1448
  const followupDeadline = Number(current.deadline || 0);
1439
- if (followupDeadline !== 0 && (!Number.isFinite(followupDeadline) || followupDeadline <= now || followupDeadline > now + MAX_DEADLINE_SECONDS)) {
1449
+ if (followupDeadline !== 0 && (!Number.isFinite(followupDeadline) || followupDeadline <= now || followupDeadline > now + maxDeadline)) {
1440
1450
  throw new Error("ZeroDelta chained quote returned an invalid follow-up deadline.");
1441
1451
  }
1442
1452
  }
@@ -1599,7 +1609,7 @@ async function buildRoute({
1599
1609
  if (!requestList.length) throw new Error("ZeroDelta quote did not include an order request.");
1600
1610
  const sourceChain = chainById(chains, option.chainId);
1601
1611
  const escrow = checkEscrow(option.chainId, quote.escrowAddress, sourceChain?.escrowContract);
1602
- const orders = normalizeOrderRequests(requestList, payer, destination, quote.executionChainId);
1612
+ const orders = normalizeOrderRequests(requestList, payer, destination, quote.executionChainId, recommendedDeadlineSeconds(quote));
1603
1613
  const order = orders[0];
1604
1614
  assertQuoteMatchesSelection({ quote, order, orders, option, destinationToken, destination, payer, result });
1605
1615
  const needsNativeFee = requiresNativeBridgeFee(quote, option);
@@ -1687,6 +1697,48 @@ async function buildRoute({
1687
1697
  };
1688
1698
  }
1689
1699
 
1700
+ // src/core/channel.ts
1701
+ var CHANNEL_HEADER = "x-zd-channel";
1702
+ var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
1703
+ var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
1704
+ var WIDGET_CHANNEL = "widget";
1705
+ var WIDGET_VERSION = "4.5.0" ;
1706
+ var MAX_CHANNEL_VERSION_LEN = 32;
1707
+ function sanitizeVersion(raw) {
1708
+ const v = String(raw).trim();
1709
+ if (!v) return "";
1710
+ const capped = v.length > MAX_CHANNEL_VERSION_LEN ? v.slice(0, MAX_CHANNEL_VERSION_LEN) : v;
1711
+ return /^[\x20-\x7e]+$/.test(capped) ? capped : "";
1712
+ }
1713
+ function embeddingOrigin(loc) {
1714
+ const origin = ((typeof location !== "undefined" ? location : void 0))?.origin;
1715
+ const v = String(origin ?? "").trim();
1716
+ if (!v || v === "null") return "";
1717
+ try {
1718
+ const url = new URL(v);
1719
+ if (url.protocol !== "https:" && url.protocol !== "http:") return "";
1720
+ return url.origin;
1721
+ } catch {
1722
+ return "";
1723
+ }
1724
+ }
1725
+ function channelHeaders(version, loc) {
1726
+ const headers = { [CHANNEL_HEADER]: WIDGET_CHANNEL };
1727
+ const v = sanitizeVersion(version);
1728
+ if (v) headers[CHANNEL_VERSION_HEADER] = v;
1729
+ const origin = embeddingOrigin();
1730
+ if (origin) headers[CHANNEL_ORIGIN_HEADER] = origin;
1731
+ return headers;
1732
+ }
1733
+ function isReportableSubmission(report) {
1734
+ if (!report) return false;
1735
+ const { txHash, chainId, wallet } = report;
1736
+ if (typeof txHash !== "string") return false;
1737
+ if (!/^0x[0-9a-fA-F]{64}$/.test(txHash) && !/^[1-9A-HJ-NP-Za-km-z]{64,90}$/.test(txHash)) return false;
1738
+ if (typeof chainId !== "number" || !Number.isFinite(chainId) || chainId <= 0) return false;
1739
+ return typeof wallet === "string" && /^0x[0-9a-fA-F]{40}$/.test(wallet);
1740
+ }
1741
+
1690
1742
  // src/core/api.ts
1691
1743
  function apiError(message, props = {}) {
1692
1744
  const err = new Error(message);
@@ -1769,9 +1821,14 @@ function createApiClient(cfg) {
1769
1821
  const screenCache = /* @__PURE__ */ new Map();
1770
1822
  const screenInflight = /* @__PURE__ */ new Map();
1771
1823
  const apiBase = cfg.apiBase.replace(/\/$/, "");
1824
+ const channel = channelHeaders(WIDGET_VERSION);
1772
1825
  async function requestJson(path, init = {}) {
1773
1826
  const apiKey = await cfg.getApiKey();
1774
- const headers = { "Content-Type": "application/json", ...init.headers || {} };
1827
+ const headers = {
1828
+ "Content-Type": "application/json",
1829
+ ...channel,
1830
+ ...init.headers || {}
1831
+ };
1775
1832
  if (apiKey) headers["x-api-key"] = apiKey;
1776
1833
  const controller = new AbortController();
1777
1834
  const timeoutId = setTimeout(() => controller.abort(), init.timeoutMs || 15e3);
@@ -1922,7 +1979,27 @@ function createApiClient(cfg) {
1922
1979
  screenInflight.set(key, request);
1923
1980
  return request;
1924
1981
  }
1925
- return { apiRequest, fetchChains, fetchTokens, fetchRoutes, fetchRouteHealth, fetchRwaVaults, fetchQuote, screenWallet, apiBase };
1982
+ async function reportSubmission(report) {
1983
+ if (!isReportableSubmission(report)) return false;
1984
+ try {
1985
+ await apiRequest("/submissions", {
1986
+ method: "POST",
1987
+ body: JSON.stringify({
1988
+ txHash: report.txHash,
1989
+ chainId: report.chainId,
1990
+ wallet: report.wallet,
1991
+ // Absent reads as "submitted" at the gateway too; sent explicitly so
1992
+ // a reader of the wire does not have to know that.
1993
+ stage: report.stage ?? "submitted"
1994
+ }),
1995
+ timeoutMs: 5e3
1996
+ });
1997
+ return true;
1998
+ } catch {
1999
+ return false;
2000
+ }
2001
+ }
2002
+ return { apiRequest, fetchChains, fetchTokens, fetchRoutes, fetchRouteHealth, fetchRwaVaults, fetchQuote, screenWallet, reportSubmission, apiBase };
1926
2003
  }
1927
2004
 
1928
2005
  // src/core/plan.ts
@@ -2658,6 +2735,7 @@ function createEngine(config = {}) {
2658
2735
  verifySubmittedTx: verifier.verifySubmittedTx,
2659
2736
  readBalances: verifier.readBalances,
2660
2737
  readNativeBalance: verifier.readNativeBalance,
2738
+ reportSubmission: api.reportSubmission,
2661
2739
  recordTransaction: (entry) => {
2662
2740
  const clean = sanitizeTxEntry(entry);
2663
2741
  try {
@@ -2788,6 +2866,7 @@ exports.laneLimitFor = laneLimitFor;
2788
2866
  exports.laneLimitHint = laneLimitHint;
2789
2867
  exports.laneLimitSymbol = laneLimitSymbol;
2790
2868
  exports.limitedLanes = limitedLanes;
2869
+ exports.maxDeadlineSeconds = maxDeadlineSeconds;
2791
2870
  exports.maxNativeFeeWei = maxNativeFeeWei;
2792
2871
  exports.nativeFeeShortLabel = nativeFeeShortLabel;
2793
2872
  exports.nativeFeeShortMessage = nativeFeeShortMessage;
@@ -2802,6 +2881,7 @@ exports.planErrorSummary = planErrorSummary;
2802
2881
  exports.planMsgValueHex = planMsgValueHex;
2803
2882
  exports.productAssets = productAssets;
2804
2883
  exports.quoteSwapPreview = quoteSwapPreview;
2884
+ exports.recommendedDeadlineSeconds = recommendedDeadlineSeconds;
2805
2885
  exports.registryRpc = registryRpc;
2806
2886
  exports.requiresNativeBridgeFee = requiresNativeBridgeFee;
2807
2887
  exports.resolveApiBase = resolveApiBase;
@@ -1,5 +1,5 @@
1
- import { T as Token, Q as Quote, N as NormalizedOrder, r as PayOption, h as RouteResult, b as Chain, R as Route, a as Catalogue, s as RwaVault, F as FetchQuoteFn, t as SolveResult, O as OrderRequest, C as Compliance, u as BalanceTarget, v as BalanceEntry, w as ApiClient, P as Plan, x as SwapInput, y as PlannedTx, z as Verifier, f as ExchangeProduct, i as TxHistoryEntry, S as SanitizedTxEntry, E as EngineConfig } from '../verify-CPaT8Upe.cjs';
2
- export { D as Address, G as ApiError, A as Availability, H as BLOCK_LABEL_DEFAULT, B as BrokenLane, I as COMPLIANCE_CHECK_ORDER, J as COMPLIANCE_DENY_LABEL, K as CatalogueContext, M as CatalogueInput, c as ComplianceCheck, U as ComplianceCheckId, X as ComplianceDecision, d as ComplianceTone, e as ComplianceView, Y as DIRECT_CHECK_IDS, Z as DIRECT_SCOPE_NOTE, _ as Destination, $ as FLOOR_CATEGORIES, a0 as Hex, a1 as LaneAvailabilityState, L as LaneLimit, a2 as PlannedTxKind, a3 as QuoteBlock, a4 as ResolvedConfig, a5 as RouteHealth, a6 as RouteHealthAvailability, a7 as RouteHealthLane, g as RouteLeg, a8 as SCREENING_BUCKETS, a9 as ScreenProvider, aa as ScreeningBucket, ab as ScreeningOutcome, ac as TUNABLE_CATEGORIES, ad as TxPlan, V as VerifyResult, W as WalletScreen, ae as amountFieldError, af as apiError, j as assetClassOf, ag as blockLabelFor, ah as brokenLaneFor, k as brokenLaneReason, ai as buildCatalogue, aj as canAttachApiKey, ak as categoryLabel, al as classifyQuoteError, l as complianceChecks, am as complianceControlsEvaluated, m as complianceControlsLine, an as complianceReasonHead, ao as complianceReasonTag, ap as complianceTagOf, n as complianceView, o as counterpartTokens, aq as createApiClient, ar as createVerifier, p as destinationAvailability, as as destinationKeys, at as directComplianceFromScreens, au as distinctScreenedWallets, av as exceedsLaneLimit, aw as executableRoutes, ax as executionChainIds, ay as hasReachableDestination, az as hubDeliverableSymbols, q as humanizeComplianceReason, aA as isExecutableBridge, aB as isKnownUnbridgeable, aC as isSourceToken, aD as laneAvailabilityState, aE as laneKey, aF as laneKeys, aG as laneLimitAmount, aH as laneLimitError, aI as laneLimitFor, aJ as laneLimitHint, aK as laneLimitSymbol, aL as limitedLanes, aM as parseAllowedApiBase, aN as productAssets, aO as registryRpc, aP as resolveApiBase, aQ as resolveConfig, aR as screeningOutcomeOf, aS as sourceKeys, aT as suppressedLanes, aU as tokenKey, aV as txMatchesPlan, aW as unattributedComplianceReasons } from '../verify-CPaT8Upe.cjs';
1
+ import { T as Token, Q as Quote, N as NormalizedOrder, r as PayOption, h as RouteResult, b as Chain, R as Route, a as Catalogue, s as RwaVault, F as FetchQuoteFn, t as SolveResult, O as OrderRequest, C as Compliance, u as BalanceTarget, v as BalanceEntry, w as ApiClient, P as Plan, x as SwapInput, y as PlannedTx, z as Verifier, f as ExchangeProduct, i as TxHistoryEntry, S as SanitizedTxEntry, E as EngineConfig } from '../verify-D722uRwZ.cjs';
2
+ export { D as Address, G as ApiError, A as Availability, H as BLOCK_LABEL_DEFAULT, B as BrokenLane, I as COMPLIANCE_CHECK_ORDER, J as COMPLIANCE_DENY_LABEL, K as CatalogueContext, M as CatalogueInput, c as ComplianceCheck, U as ComplianceCheckId, X as ComplianceDecision, d as ComplianceTone, e as ComplianceView, Y as DIRECT_CHECK_IDS, Z as DIRECT_SCOPE_NOTE, _ as Destination, $ as FLOOR_CATEGORIES, a0 as Hex, a1 as LaneAvailabilityState, L as LaneLimit, a2 as PlannedTxKind, a3 as QuoteBlock, a4 as ResolvedConfig, a5 as RouteHealth, a6 as RouteHealthAvailability, a7 as RouteHealthLane, g as RouteLeg, a8 as SCREENING_BUCKETS, a9 as ScreenProvider, aa as ScreeningBucket, ab as ScreeningOutcome, ac as TUNABLE_CATEGORIES, ad as TxPlan, V as VerifyResult, W as WalletScreen, ae as amountFieldError, af as apiError, j as assetClassOf, ag as blockLabelFor, ah as brokenLaneFor, k as brokenLaneReason, ai as buildCatalogue, aj as canAttachApiKey, ak as categoryLabel, al as classifyQuoteError, l as complianceChecks, am as complianceControlsEvaluated, m as complianceControlsLine, an as complianceReasonHead, ao as complianceReasonTag, ap as complianceTagOf, n as complianceView, o as counterpartTokens, aq as createApiClient, ar as createVerifier, p as destinationAvailability, as as destinationKeys, at as directComplianceFromScreens, au as distinctScreenedWallets, av as exceedsLaneLimit, aw as executableRoutes, ax as executionChainIds, ay as hasReachableDestination, az as hubDeliverableSymbols, q as humanizeComplianceReason, aA as isExecutableBridge, aB as isKnownUnbridgeable, aC as isSourceToken, aD as laneAvailabilityState, aE as laneKey, aF as laneKeys, aG as laneLimitAmount, aH as laneLimitError, aI as laneLimitFor, aJ as laneLimitHint, aK as laneLimitSymbol, aL as limitedLanes, aM as parseAllowedApiBase, aN as productAssets, aO as registryRpc, aP as resolveApiBase, aQ as resolveConfig, aR as screeningOutcomeOf, aS as sourceKeys, aT as suppressedLanes, aU as tokenKey, aV as txMatchesPlan, aW as unattributedComplianceReasons } from '../verify-D722uRwZ.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. */
@@ -268,20 +268,44 @@ interface SolveArgs {
268
268
  declare function solveExactOut({ option, destination, destinationToken, payer, fetchQuote }: SolveArgs): Promise<SolveResult>;
269
269
  declare function solveExactIn({ option, destination, destinationToken, payer, fetchQuote, amountInRaw }: SolveArgs): Promise<SolveResult>;
270
270
 
271
+ /**
272
+ * How long the order should live, per the gateway, for the lane it just priced.
273
+ *
274
+ * Derived server-side from THAT lane's `estimatedDuration`, so a slow pathway asks for more than a
275
+ * fast one. It exists because the escrow refuses to fill past the deadline
276
+ * (`fillOrderWithFlashloan` reverts `ZDLite__OrderExpired`) and this widget used to pick one blind:
277
+ * a flat 30 minutes for a lane the gateway knew took forty.
278
+ *
279
+ * Absent (an older gateway), unparseable or non-positive falls back to that flat 30 minutes, so
280
+ * nothing changes where there is nothing to read.
281
+ *
282
+ * ⚠️ Read from the QUOTE, never from `orderRequests[].deadline` — the gateway returns that as "0"
283
+ * on purpose (see normalizeOrderRequest).
284
+ */
285
+ declare function recommendedDeadlineSeconds(quote: Pick<Quote, "recommendedDeadlineSeconds"> | undefined): number;
286
+ /**
287
+ * The widest deadline `assertQuoteMatchesSelection` accepts for this quote.
288
+ *
289
+ * Never below the historical hour, so a gateway that recommends nothing behaves exactly as before;
290
+ * never above the absolute cap. ⚠️ The ceiling has to admit the gateway's own recommendation,
291
+ * because that is the number this module is about to sign — a ceiling below it would reject the
292
+ * deadline we just built, turning a merely slow lane into an unsignable one.
293
+ */
294
+ declare function maxDeadlineSeconds(quote: Pick<Quote, "recommendedDeadlineSeconds"> | undefined): number;
271
295
  declare function normalizeOrderRequest(order: OrderRequest, payer: string, destination: {
272
296
  address: string;
273
297
  chainId: number | string;
274
- }, fallbackExecutionChainId?: number | string, deadlineOverride?: string): NormalizedOrder;
298
+ }, fallbackExecutionChainId?: number | string, deadlineOverride?: string, lifetimeSeconds?: number): NormalizedOrder;
275
299
  /**
276
300
  * Normalize the whole `orderRequests` list of a quote. A chained (RWA) quote is one signature and
277
301
  * several legs: leg 1 is the user's order and gets the client-side fills (owner, receiver, a fresh
278
- * deadline); follow-up legs keep whatever deadline the gateway issued — `0` is its "no separate
279
- * deadline" marker and must be forwarded verbatim, not replaced.
302
+ * deadline sized by `lifetimeSeconds`); follow-up legs keep whatever deadline the gateway issued —
303
+ * `0` is its "no separate deadline" marker and must be forwarded verbatim, not replaced.
280
304
  */
281
305
  declare function normalizeOrderRequests(requests: OrderRequest[], payer: string, destination: {
282
306
  address: string;
283
307
  chainId: number | string;
284
- }, fallbackExecutionChainId?: number | string): NormalizedOrder[];
308
+ }, fallbackExecutionChainId?: number | string, lifetimeSeconds?: number): NormalizedOrder[];
285
309
  interface AssertQuoteArgs {
286
310
  quote: Quote;
287
311
  /** The first (user-signed) leg. Kept as a separate argument so single-leg callers stay simple. */
@@ -544,8 +568,13 @@ interface Engine {
544
568
  readBalances: Verifier["readBalances"];
545
569
  readNativeBalance: Verifier["readNativeBalance"];
546
570
  recordTransaction: (entry: TxHistoryEntry) => SanitizedTxEntry;
571
+ /**
572
+ * Tell the gateway this widget submitted a transaction. Called on the HASH,
573
+ * never on the click; never throws and never blocks. See `api.ts`.
574
+ */
575
+ reportSubmission?: ApiClient["reportSubmission"];
547
576
  }
548
577
  /** Create an engine bound to a config. The 60s resource cache is per-engine. */
549
578
  declare function createEngine(config?: EngineConfig): Engine;
550
579
 
551
- export { API_CACHE_TTL_MS, ApiClient, type AssertQuoteArgs, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, BalanceEntry, type BalanceReader, BalanceTarget, type BuildPayOptionsArgs, type BuildRouteArgs, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CHAIN_DISPLAY_NAMES, Catalogue, Chain, Compliance, DEFAULT_WIDGET_API_BASE, type DecodedOrderRequest, type DecodedSubmitOrder, ERC20_ALLOWANCE_SELECTOR, ERC20_APPROVE_SELECTOR, ERC20_BALANCEOF_SELECTOR, ERC20_TRANSFER_SELECTOR, EXECUTABLE_STABLE_ASSETS, type Engine, EngineConfig, ExchangeProduct, FetchQuoteFn, 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, type NativeFeeCheck, NormalizedOrder, OrderRequest, PREVIEW_OWNER, PayOption, type PayRequest, type PaymentWalletContext, Plan, PlannedTx, QUOTE_BUFFER_BPS, Quote, Route, RouteResult, RwaVault, SAME_CLASS_STABLE, SCREEN_CACHE_TTL_MS, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, SanitizedTxEntry, type SolveArgs, SolveResult, SwapInput, type SwapPreview, TRADEABLE_RWA_ASSETS, Token, TxHistoryEntry, type ValidatedSwap, Verifier, ZERO_ADDRESS, addressWord, allowanceCovers, applyLayerZeroBuffer, assertAddress, assertQuoteMatchesSelection, assetDecimals, buildPayOptions, buildRoute, buildSwapPlan, bytes32Word, bytesPayload, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, createEngine, decodeSubmitOrderCalldata, encodeAllowance, encodeApprove, encodeBalanceOf, encodeSubmitOrder, encodeTransfer, fetchPaymentPlan, finalOf, findToken, foldTicker, formatNative, formatUnits, isAddress, isDeliverable, isHexAddress, isHexData, isHexQuantity, isLayerZeroRoute, maxNativeFeeWei, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeOrderRequest, normalizeOrderRequests, parseUnitsDecimal, planErrorSummary, planMsgValueHex, quoteSwapPreview, requiresNativeBridgeFee, resolveSwapReceiver, resolveVaultIcon, routeNativeValue, safeTicker, scaleDecimals, solveExactIn, solveExactOut, stableGenieIntentSchema, strip0x, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenTicker, uint64Word, uintWord, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, withVaultArtwork };
580
+ export { API_CACHE_TTL_MS, ApiClient, type AssertQuoteArgs, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, BalanceEntry, type BalanceReader, BalanceTarget, type BuildPayOptionsArgs, type BuildRouteArgs, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CHAIN_DISPLAY_NAMES, Catalogue, Chain, Compliance, DEFAULT_WIDGET_API_BASE, type DecodedOrderRequest, type DecodedSubmitOrder, ERC20_ALLOWANCE_SELECTOR, ERC20_APPROVE_SELECTOR, ERC20_BALANCEOF_SELECTOR, ERC20_TRANSFER_SELECTOR, EXECUTABLE_STABLE_ASSETS, type Engine, EngineConfig, ExchangeProduct, FetchQuoteFn, 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, type NativeFeeCheck, NormalizedOrder, OrderRequest, PREVIEW_OWNER, PayOption, type PayRequest, type PaymentWalletContext, Plan, PlannedTx, QUOTE_BUFFER_BPS, Quote, Route, RouteResult, RwaVault, SAME_CLASS_STABLE, SCREEN_CACHE_TTL_MS, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, SanitizedTxEntry, type SolveArgs, SolveResult, SwapInput, type SwapPreview, TRADEABLE_RWA_ASSETS, Token, TxHistoryEntry, type ValidatedSwap, Verifier, ZERO_ADDRESS, addressWord, allowanceCovers, applyLayerZeroBuffer, assertAddress, assertQuoteMatchesSelection, assetDecimals, buildPayOptions, buildRoute, buildSwapPlan, bytes32Word, bytesPayload, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, createEngine, decodeSubmitOrderCalldata, encodeAllowance, encodeApprove, encodeBalanceOf, encodeSubmitOrder, encodeTransfer, fetchPaymentPlan, finalOf, findToken, foldTicker, formatNative, formatUnits, isAddress, isDeliverable, isHexAddress, isHexData, isHexQuantity, isLayerZeroRoute, maxDeadlineSeconds, maxNativeFeeWei, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeOrderRequest, normalizeOrderRequests, parseUnitsDecimal, planErrorSummary, planMsgValueHex, quoteSwapPreview, recommendedDeadlineSeconds, requiresNativeBridgeFee, resolveSwapReceiver, resolveVaultIcon, routeNativeValue, safeTicker, scaleDecimals, solveExactIn, solveExactOut, stableGenieIntentSchema, strip0x, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenTicker, uint64Word, uintWord, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, withVaultArtwork };
@@ -1,5 +1,5 @@
1
- import { T as Token, Q as Quote, N as NormalizedOrder, r as PayOption, h as RouteResult, b as Chain, R as Route, a as Catalogue, s as RwaVault, F as FetchQuoteFn, t as SolveResult, O as OrderRequest, C as Compliance, u as BalanceTarget, v as BalanceEntry, w as ApiClient, P as Plan, x as SwapInput, y as PlannedTx, z as Verifier, f as ExchangeProduct, i as TxHistoryEntry, S as SanitizedTxEntry, E as EngineConfig } from '../verify-CPaT8Upe.js';
2
- export { D as Address, G as ApiError, A as Availability, H as BLOCK_LABEL_DEFAULT, B as BrokenLane, I as COMPLIANCE_CHECK_ORDER, J as COMPLIANCE_DENY_LABEL, K as CatalogueContext, M as CatalogueInput, c as ComplianceCheck, U as ComplianceCheckId, X as ComplianceDecision, d as ComplianceTone, e as ComplianceView, Y as DIRECT_CHECK_IDS, Z as DIRECT_SCOPE_NOTE, _ as Destination, $ as FLOOR_CATEGORIES, a0 as Hex, a1 as LaneAvailabilityState, L as LaneLimit, a2 as PlannedTxKind, a3 as QuoteBlock, a4 as ResolvedConfig, a5 as RouteHealth, a6 as RouteHealthAvailability, a7 as RouteHealthLane, g as RouteLeg, a8 as SCREENING_BUCKETS, a9 as ScreenProvider, aa as ScreeningBucket, ab as ScreeningOutcome, ac as TUNABLE_CATEGORIES, ad as TxPlan, V as VerifyResult, W as WalletScreen, ae as amountFieldError, af as apiError, j as assetClassOf, ag as blockLabelFor, ah as brokenLaneFor, k as brokenLaneReason, ai as buildCatalogue, aj as canAttachApiKey, ak as categoryLabel, al as classifyQuoteError, l as complianceChecks, am as complianceControlsEvaluated, m as complianceControlsLine, an as complianceReasonHead, ao as complianceReasonTag, ap as complianceTagOf, n as complianceView, o as counterpartTokens, aq as createApiClient, ar as createVerifier, p as destinationAvailability, as as destinationKeys, at as directComplianceFromScreens, au as distinctScreenedWallets, av as exceedsLaneLimit, aw as executableRoutes, ax as executionChainIds, ay as hasReachableDestination, az as hubDeliverableSymbols, q as humanizeComplianceReason, aA as isExecutableBridge, aB as isKnownUnbridgeable, aC as isSourceToken, aD as laneAvailabilityState, aE as laneKey, aF as laneKeys, aG as laneLimitAmount, aH as laneLimitError, aI as laneLimitFor, aJ as laneLimitHint, aK as laneLimitSymbol, aL as limitedLanes, aM as parseAllowedApiBase, aN as productAssets, aO as registryRpc, aP as resolveApiBase, aQ as resolveConfig, aR as screeningOutcomeOf, aS as sourceKeys, aT as suppressedLanes, aU as tokenKey, aV as txMatchesPlan, aW as unattributedComplianceReasons } from '../verify-CPaT8Upe.js';
1
+ import { T as Token, Q as Quote, N as NormalizedOrder, r as PayOption, h as RouteResult, b as Chain, R as Route, a as Catalogue, s as RwaVault, F as FetchQuoteFn, t as SolveResult, O as OrderRequest, C as Compliance, u as BalanceTarget, v as BalanceEntry, w as ApiClient, P as Plan, x as SwapInput, y as PlannedTx, z as Verifier, f as ExchangeProduct, i as TxHistoryEntry, S as SanitizedTxEntry, E as EngineConfig } from '../verify-D722uRwZ.js';
2
+ export { D as Address, G as ApiError, A as Availability, H as BLOCK_LABEL_DEFAULT, B as BrokenLane, I as COMPLIANCE_CHECK_ORDER, J as COMPLIANCE_DENY_LABEL, K as CatalogueContext, M as CatalogueInput, c as ComplianceCheck, U as ComplianceCheckId, X as ComplianceDecision, d as ComplianceTone, e as ComplianceView, Y as DIRECT_CHECK_IDS, Z as DIRECT_SCOPE_NOTE, _ as Destination, $ as FLOOR_CATEGORIES, a0 as Hex, a1 as LaneAvailabilityState, L as LaneLimit, a2 as PlannedTxKind, a3 as QuoteBlock, a4 as ResolvedConfig, a5 as RouteHealth, a6 as RouteHealthAvailability, a7 as RouteHealthLane, g as RouteLeg, a8 as SCREENING_BUCKETS, a9 as ScreenProvider, aa as ScreeningBucket, ab as ScreeningOutcome, ac as TUNABLE_CATEGORIES, ad as TxPlan, V as VerifyResult, W as WalletScreen, ae as amountFieldError, af as apiError, j as assetClassOf, ag as blockLabelFor, ah as brokenLaneFor, k as brokenLaneReason, ai as buildCatalogue, aj as canAttachApiKey, ak as categoryLabel, al as classifyQuoteError, l as complianceChecks, am as complianceControlsEvaluated, m as complianceControlsLine, an as complianceReasonHead, ao as complianceReasonTag, ap as complianceTagOf, n as complianceView, o as counterpartTokens, aq as createApiClient, ar as createVerifier, p as destinationAvailability, as as destinationKeys, at as directComplianceFromScreens, au as distinctScreenedWallets, av as exceedsLaneLimit, aw as executableRoutes, ax as executionChainIds, ay as hasReachableDestination, az as hubDeliverableSymbols, q as humanizeComplianceReason, aA as isExecutableBridge, aB as isKnownUnbridgeable, aC as isSourceToken, aD as laneAvailabilityState, aE as laneKey, aF as laneKeys, aG as laneLimitAmount, aH as laneLimitError, aI as laneLimitFor, aJ as laneLimitHint, aK as laneLimitSymbol, aL as limitedLanes, aM as parseAllowedApiBase, aN as productAssets, aO as registryRpc, aP as resolveApiBase, aQ as resolveConfig, aR as screeningOutcomeOf, aS as sourceKeys, aT as suppressedLanes, aU as tokenKey, aV as txMatchesPlan, aW as unattributedComplianceReasons } from '../verify-D722uRwZ.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. */
@@ -268,20 +268,44 @@ interface SolveArgs {
268
268
  declare function solveExactOut({ option, destination, destinationToken, payer, fetchQuote }: SolveArgs): Promise<SolveResult>;
269
269
  declare function solveExactIn({ option, destination, destinationToken, payer, fetchQuote, amountInRaw }: SolveArgs): Promise<SolveResult>;
270
270
 
271
+ /**
272
+ * How long the order should live, per the gateway, for the lane it just priced.
273
+ *
274
+ * Derived server-side from THAT lane's `estimatedDuration`, so a slow pathway asks for more than a
275
+ * fast one. It exists because the escrow refuses to fill past the deadline
276
+ * (`fillOrderWithFlashloan` reverts `ZDLite__OrderExpired`) and this widget used to pick one blind:
277
+ * a flat 30 minutes for a lane the gateway knew took forty.
278
+ *
279
+ * Absent (an older gateway), unparseable or non-positive falls back to that flat 30 minutes, so
280
+ * nothing changes where there is nothing to read.
281
+ *
282
+ * ⚠️ Read from the QUOTE, never from `orderRequests[].deadline` — the gateway returns that as "0"
283
+ * on purpose (see normalizeOrderRequest).
284
+ */
285
+ declare function recommendedDeadlineSeconds(quote: Pick<Quote, "recommendedDeadlineSeconds"> | undefined): number;
286
+ /**
287
+ * The widest deadline `assertQuoteMatchesSelection` accepts for this quote.
288
+ *
289
+ * Never below the historical hour, so a gateway that recommends nothing behaves exactly as before;
290
+ * never above the absolute cap. ⚠️ The ceiling has to admit the gateway's own recommendation,
291
+ * because that is the number this module is about to sign — a ceiling below it would reject the
292
+ * deadline we just built, turning a merely slow lane into an unsignable one.
293
+ */
294
+ declare function maxDeadlineSeconds(quote: Pick<Quote, "recommendedDeadlineSeconds"> | undefined): number;
271
295
  declare function normalizeOrderRequest(order: OrderRequest, payer: string, destination: {
272
296
  address: string;
273
297
  chainId: number | string;
274
- }, fallbackExecutionChainId?: number | string, deadlineOverride?: string): NormalizedOrder;
298
+ }, fallbackExecutionChainId?: number | string, deadlineOverride?: string, lifetimeSeconds?: number): NormalizedOrder;
275
299
  /**
276
300
  * Normalize the whole `orderRequests` list of a quote. A chained (RWA) quote is one signature and
277
301
  * several legs: leg 1 is the user's order and gets the client-side fills (owner, receiver, a fresh
278
- * deadline); follow-up legs keep whatever deadline the gateway issued — `0` is its "no separate
279
- * deadline" marker and must be forwarded verbatim, not replaced.
302
+ * deadline sized by `lifetimeSeconds`); follow-up legs keep whatever deadline the gateway issued —
303
+ * `0` is its "no separate deadline" marker and must be forwarded verbatim, not replaced.
280
304
  */
281
305
  declare function normalizeOrderRequests(requests: OrderRequest[], payer: string, destination: {
282
306
  address: string;
283
307
  chainId: number | string;
284
- }, fallbackExecutionChainId?: number | string): NormalizedOrder[];
308
+ }, fallbackExecutionChainId?: number | string, lifetimeSeconds?: number): NormalizedOrder[];
285
309
  interface AssertQuoteArgs {
286
310
  quote: Quote;
287
311
  /** The first (user-signed) leg. Kept as a separate argument so single-leg callers stay simple. */
@@ -544,8 +568,13 @@ interface Engine {
544
568
  readBalances: Verifier["readBalances"];
545
569
  readNativeBalance: Verifier["readNativeBalance"];
546
570
  recordTransaction: (entry: TxHistoryEntry) => SanitizedTxEntry;
571
+ /**
572
+ * Tell the gateway this widget submitted a transaction. Called on the HASH,
573
+ * never on the click; never throws and never blocks. See `api.ts`.
574
+ */
575
+ reportSubmission?: ApiClient["reportSubmission"];
547
576
  }
548
577
  /** Create an engine bound to a config. The 60s resource cache is per-engine. */
549
578
  declare function createEngine(config?: EngineConfig): Engine;
550
579
 
551
- export { API_CACHE_TTL_MS, ApiClient, type AssertQuoteArgs, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, BalanceEntry, type BalanceReader, BalanceTarget, type BuildPayOptionsArgs, type BuildRouteArgs, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CHAIN_DISPLAY_NAMES, Catalogue, Chain, Compliance, DEFAULT_WIDGET_API_BASE, type DecodedOrderRequest, type DecodedSubmitOrder, ERC20_ALLOWANCE_SELECTOR, ERC20_APPROVE_SELECTOR, ERC20_BALANCEOF_SELECTOR, ERC20_TRANSFER_SELECTOR, EXECUTABLE_STABLE_ASSETS, type Engine, EngineConfig, ExchangeProduct, FetchQuoteFn, 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, type NativeFeeCheck, NormalizedOrder, OrderRequest, PREVIEW_OWNER, PayOption, type PayRequest, type PaymentWalletContext, Plan, PlannedTx, QUOTE_BUFFER_BPS, Quote, Route, RouteResult, RwaVault, SAME_CLASS_STABLE, SCREEN_CACHE_TTL_MS, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, SanitizedTxEntry, type SolveArgs, SolveResult, SwapInput, type SwapPreview, TRADEABLE_RWA_ASSETS, Token, TxHistoryEntry, type ValidatedSwap, Verifier, ZERO_ADDRESS, addressWord, allowanceCovers, applyLayerZeroBuffer, assertAddress, assertQuoteMatchesSelection, assetDecimals, buildPayOptions, buildRoute, buildSwapPlan, bytes32Word, bytesPayload, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, createEngine, decodeSubmitOrderCalldata, encodeAllowance, encodeApprove, encodeBalanceOf, encodeSubmitOrder, encodeTransfer, fetchPaymentPlan, finalOf, findToken, foldTicker, formatNative, formatUnits, isAddress, isDeliverable, isHexAddress, isHexData, isHexQuantity, isLayerZeroRoute, maxNativeFeeWei, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeOrderRequest, normalizeOrderRequests, parseUnitsDecimal, planErrorSummary, planMsgValueHex, quoteSwapPreview, requiresNativeBridgeFee, resolveSwapReceiver, resolveVaultIcon, routeNativeValue, safeTicker, scaleDecimals, solveExactIn, solveExactOut, stableGenieIntentSchema, strip0x, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenTicker, uint64Word, uintWord, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, withVaultArtwork };
580
+ export { API_CACHE_TTL_MS, ApiClient, type AssertQuoteArgs, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, BalanceEntry, type BalanceReader, BalanceTarget, type BuildPayOptionsArgs, type BuildRouteArgs, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CHAIN_DISPLAY_NAMES, Catalogue, Chain, Compliance, DEFAULT_WIDGET_API_BASE, type DecodedOrderRequest, type DecodedSubmitOrder, ERC20_ALLOWANCE_SELECTOR, ERC20_APPROVE_SELECTOR, ERC20_BALANCEOF_SELECTOR, ERC20_TRANSFER_SELECTOR, EXECUTABLE_STABLE_ASSETS, type Engine, EngineConfig, ExchangeProduct, FetchQuoteFn, 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, type NativeFeeCheck, NormalizedOrder, OrderRequest, PREVIEW_OWNER, PayOption, type PayRequest, type PaymentWalletContext, Plan, PlannedTx, QUOTE_BUFFER_BPS, Quote, Route, RouteResult, RwaVault, SAME_CLASS_STABLE, SCREEN_CACHE_TTL_MS, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, SanitizedTxEntry, type SolveArgs, SolveResult, SwapInput, type SwapPreview, TRADEABLE_RWA_ASSETS, Token, TxHistoryEntry, type ValidatedSwap, Verifier, ZERO_ADDRESS, addressWord, allowanceCovers, applyLayerZeroBuffer, assertAddress, assertQuoteMatchesSelection, assetDecimals, buildPayOptions, buildRoute, buildSwapPlan, bytes32Word, bytesPayload, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, createEngine, decodeSubmitOrderCalldata, encodeAllowance, encodeApprove, encodeBalanceOf, encodeSubmitOrder, encodeTransfer, fetchPaymentPlan, finalOf, findToken, foldTicker, formatNative, formatUnits, isAddress, isDeliverable, isHexAddress, isHexData, isHexQuantity, isLayerZeroRoute, maxDeadlineSeconds, maxNativeFeeWei, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeOrderRequest, normalizeOrderRequests, parseUnitsDecimal, planErrorSummary, planMsgValueHex, quoteSwapPreview, recommendedDeadlineSeconds, requiresNativeBridgeFee, resolveSwapReceiver, resolveVaultIcon, routeNativeValue, safeTicker, scaleDecimals, solveExactIn, solveExactOut, stableGenieIntentSchema, strip0x, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenTicker, uint64Word, uintWord, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, withVaultArtwork };
@@ -1 +1 @@
1
- export { API_CACHE_TTL_MS, BLOCK_LABEL_DEFAULT, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, 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, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, TUNABLE_CATEGORIES, ZERO_ADDRESS, addressWord, allowanceCovers, amountFieldError, apiError, applyLayerZeroBuffer, assertAddress, assertQuoteMatchesSelection, assetClassOf, assetDecimals, blockLabelFor, brokenLaneFor, brokenLaneReason, buildCatalogue, buildPayOptions, buildRoute, buildSwapPlan, bytes32Word, bytesPayload, canAttachApiKey, categoryLabel, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, classifyQuoteError, complianceChecks, complianceControlsEvaluated, complianceControlsLine, complianceReasonHead, complianceReasonTag, complianceTagOf, complianceView, counterpartTokens, createApiClient, createEngine, createVerifier, decodeSubmitOrderCalldata, destinationAvailability, destinationKeys, directComplianceFromScreens, distinctScreenedWallets, encodeAllowance, encodeApprove, encodeBalanceOf, encodeSubmitOrder, encodeTransfer, exceedsLaneLimit, executableRoutes, executionChainIds, fetchPaymentPlan, finalOf, findToken, foldTicker, formatNative, formatUnits, hasReachableDestination, hubDeliverableSymbols, humanizeComplianceReason, isAddress, isDeliverable, isExecutableBridge, isHexAddress, isHexData, isHexQuantity, isKnownUnbridgeable, isLayerZeroRoute, isSourceToken, laneAvailabilityState, laneKey, laneKeys, laneLimitAmount, laneLimitError, laneLimitFor, laneLimitHint, laneLimitSymbol, limitedLanes, maxNativeFeeWei, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeOrderRequest, normalizeOrderRequests, parseAllowedApiBase, parseUnitsDecimal, planErrorSummary, planMsgValueHex, productAssets, quoteSwapPreview, registryRpc, requiresNativeBridgeFee, resolveApiBase, resolveConfig, resolveSwapReceiver, resolveVaultIcon, routeNativeValue, safeTicker, scaleDecimals, screeningOutcomeOf, solveExactIn, solveExactOut, sourceKeys, stableGenieIntentSchema, strip0x, suppressedLanes, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenKey, tokenTicker, txMatchesPlan, uint64Word, uintWord, unattributedComplianceReasons, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, withVaultArtwork } from '../chunk-PMVF6A2D.js';
1
+ export { API_CACHE_TTL_MS, BLOCK_LABEL_DEFAULT, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, 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, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, TUNABLE_CATEGORIES, ZERO_ADDRESS, addressWord, allowanceCovers, amountFieldError, apiError, applyLayerZeroBuffer, assertAddress, assertQuoteMatchesSelection, assetClassOf, assetDecimals, blockLabelFor, brokenLaneFor, brokenLaneReason, buildCatalogue, buildPayOptions, buildRoute, buildSwapPlan, bytes32Word, bytesPayload, canAttachApiKey, categoryLabel, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, classifyQuoteError, complianceChecks, complianceControlsEvaluated, complianceControlsLine, complianceReasonHead, complianceReasonTag, complianceTagOf, complianceView, counterpartTokens, createApiClient, createEngine, createVerifier, decodeSubmitOrderCalldata, destinationAvailability, destinationKeys, directComplianceFromScreens, distinctScreenedWallets, encodeAllowance, encodeApprove, encodeBalanceOf, encodeSubmitOrder, encodeTransfer, exceedsLaneLimit, executableRoutes, executionChainIds, fetchPaymentPlan, finalOf, findToken, foldTicker, formatNative, formatUnits, hasReachableDestination, hubDeliverableSymbols, humanizeComplianceReason, isAddress, isDeliverable, isExecutableBridge, isHexAddress, isHexData, isHexQuantity, isKnownUnbridgeable, isLayerZeroRoute, isSourceToken, laneAvailabilityState, laneKey, laneKeys, laneLimitAmount, laneLimitError, laneLimitFor, laneLimitHint, laneLimitSymbol, limitedLanes, maxDeadlineSeconds, maxNativeFeeWei, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeOrderRequest, normalizeOrderRequests, parseAllowedApiBase, parseUnitsDecimal, planErrorSummary, planMsgValueHex, productAssets, quoteSwapPreview, recommendedDeadlineSeconds, registryRpc, requiresNativeBridgeFee, resolveApiBase, resolveConfig, resolveSwapReceiver, resolveVaultIcon, routeNativeValue, safeTicker, scaleDecimals, screeningOutcomeOf, solveExactIn, solveExactOut, sourceKeys, stableGenieIntentSchema, strip0x, suppressedLanes, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenKey, tokenTicker, txMatchesPlan, uint64Word, uintWord, unattributedComplianceReasons, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, withVaultArtwork } from '../chunk-447DEZ5S.js';