@glacislabs/stablegenie-zerodelta 4.8.0 → 4.10.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.
@@ -179,13 +179,16 @@ var CHAIN_DISPLAY_NAMES = Object.freeze({
179
179
  1088: "Metis",
180
180
  1135: "Lisk",
181
181
  1329: "Sei",
182
+ 1672: "Pharos",
182
183
  1776: "Injective EVM",
183
184
  1868: "Soneium",
184
185
  1923: "Swellchain",
185
186
  2222: "Kava",
186
187
  2818: "Morph",
187
188
  3343: "EDGE",
189
+ 4217: "Tempo",
188
190
  4326: "MegaETH",
191
+ 4663: "Robinhood Chain",
189
192
  5e3: "Mantle",
190
193
  8453: "Base",
191
194
  9745: "Plasma",
@@ -202,7 +205,8 @@ var CHAIN_DISPLAY_NAMES = Object.freeze({
202
205
  534352: "Scroll",
203
206
  747474: "Katana",
204
207
  7777777: "Zora",
205
- 21e6: "Corn"
208
+ 21e6: "Corn",
209
+ 1151111081099710: "Solana"
206
210
  });
207
211
 
208
212
  // src/core/address.ts
@@ -886,6 +890,20 @@ function withVaultArtwork(tokens, icons) {
886
890
  }
887
891
 
888
892
  // src/core/compliance.ts
893
+ function formatJurisdiction(jurisdiction, country) {
894
+ const region = jurisdiction?.trim() ?? "";
895
+ const explicitCountry = country?.trim() ?? "";
896
+ const countryCode = (explicitCountry || (/^[a-z]{2}$/i.test(region) && region.toUpperCase() !== "EU" ? region : "")).toUpperCase();
897
+ if (!countryCode) return region;
898
+ let countryLabel = countryCode;
899
+ try {
900
+ countryLabel = new Intl.DisplayNames(["en"], { type: "region" }).of(countryCode) ?? countryCode;
901
+ } catch {
902
+ }
903
+ const namedCountry = countryLabel === countryCode ? countryCode : `${countryLabel} (${countryCode})`;
904
+ if (!region || region.toUpperCase() === countryCode) return namedCountry;
905
+ return `${region} \xB7 ${namedCountry}`;
906
+ }
889
907
  var COMPLIANCE_DENY_LABEL = "Compliance check failed";
890
908
  function complianceView(compliance, hasQuote = true) {
891
909
  if (!hasQuote) {
@@ -1706,7 +1724,7 @@ var CHANNEL_HEADER = "x-zd-channel";
1706
1724
  var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
1707
1725
  var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
1708
1726
  var WIDGET_CHANNEL = "widget";
1709
- var WIDGET_VERSION = "4.8.0" ;
1727
+ var WIDGET_VERSION = "4.10.0" ;
1710
1728
  var MAX_CHANNEL_VERSION_LEN = 32;
1711
1729
  function sanitizeVersion(raw) {
1712
1730
  const v = String(raw).trim();
@@ -1814,14 +1832,31 @@ function wait(ms) {
1814
1832
  }
1815
1833
  var PAGE_LIMIT = 500;
1816
1834
  var MAX_PAGES = 10;
1835
+ var newRegistryCache = () => ({ chains: null, tokens: null, routes: null, health: null, vaults: null, inflight: /* @__PURE__ */ new Map() });
1836
+ var SHARED_REGISTRY = /* @__PURE__ */ new WeakMap();
1837
+ function registryCacheFor(scope) {
1838
+ if (!scope) return newRegistryCache();
1839
+ let byKey = SHARED_REGISTRY.get(scope.fetch);
1840
+ if (!byKey) {
1841
+ byKey = /* @__PURE__ */ new Map();
1842
+ SHARED_REGISTRY.set(scope.fetch, byKey);
1843
+ }
1844
+ let cache = byKey.get(scope.key);
1845
+ if (!cache) {
1846
+ cache = newRegistryCache();
1847
+ byKey.set(scope.key, cache);
1848
+ }
1849
+ return cache;
1850
+ }
1817
1851
  function createApiClient(cfg) {
1818
- const cache = {
1819
- chains: null,
1820
- tokens: null,
1821
- routes: null,
1822
- health: null,
1823
- vaults: null
1824
- };
1852
+ const cache = registryCacheFor(cfg.registryScope);
1853
+ function once(name, read) {
1854
+ const pending = cache.inflight.get(name);
1855
+ if (pending) return pending;
1856
+ const p = read().finally(() => cache.inflight.delete(name));
1857
+ cache.inflight.set(name, p);
1858
+ return p;
1859
+ }
1825
1860
  const screenCache = /* @__PURE__ */ new Map();
1826
1861
  const screenInflight = /* @__PURE__ */ new Map();
1827
1862
  const apiBase = cfg.apiBase.replace(/\/$/, "");
@@ -1891,58 +1926,68 @@ function createApiClient(cfg) {
1891
1926
  }
1892
1927
  throw apiError(`ZeroDelta still had rows after ${MAX_PAGES} pages (${path}).`, { code: "bad_response" });
1893
1928
  }
1894
- async function fetchChains() {
1895
- if (nowFresh(cache.chains)) return cache.chains.value;
1896
- const chains = await apiRequest(`/chains${toQuery({ enabledOnly: true, limit: 500 })}`);
1897
- const normalized = (Array.isArray(chains) ? chains : []).map((chain) => ({ ...chain, chainId: Number(chain.chainId) })).map((chain) => {
1898
- const escrow = normalizeAddress(chain.escrowContract);
1899
- return escrow ? { ...chain, escrowContract: escrow } : { ...chain, escrowContract: void 0 };
1929
+ function fetchChains() {
1930
+ if (nowFresh(cache.chains)) return Promise.resolve(cache.chains.value);
1931
+ return once("chains", async () => {
1932
+ const chains = await apiRequest(`/chains${toQuery({ enabledOnly: true, limit: 500 })}`);
1933
+ const normalized = (Array.isArray(chains) ? chains : []).map((chain) => ({ ...chain, chainId: Number(chain.chainId) })).map((chain) => {
1934
+ const escrow = normalizeAddress(chain.escrowContract);
1935
+ return escrow ? { ...chain, escrowContract: escrow } : { ...chain, escrowContract: void 0 };
1936
+ });
1937
+ cache.chains = { at: Date.now(), value: normalized };
1938
+ return normalized;
1900
1939
  });
1901
- cache.chains = { at: Date.now(), value: normalized };
1902
- return normalized;
1903
- }
1904
- async function fetchTokens() {
1905
- if (nowFresh(cache.tokens)) return cache.tokens.value;
1906
- const tokens = await requestAllPages("/tokens");
1907
- const normalized = tokens.map((token) => ({ ...token, chainId: Number(token.chainId) }));
1908
- cache.tokens = { at: Date.now(), value: normalized };
1909
- return normalized;
1910
- }
1911
- async function fetchRoutes() {
1912
- if (nowFresh(cache.routes)) return cache.routes.value;
1913
- try {
1914
- const normalized = await requestAllPages("/routes");
1915
- cache.routes = { at: Date.now(), value: normalized };
1940
+ }
1941
+ function fetchTokens() {
1942
+ if (nowFresh(cache.tokens)) return Promise.resolve(cache.tokens.value);
1943
+ return once("tokens", async () => {
1944
+ const tokens = await requestAllPages("/tokens");
1945
+ const normalized = tokens.map((token) => ({ ...token, chainId: Number(token.chainId) }));
1946
+ cache.tokens = { at: Date.now(), value: normalized };
1916
1947
  return normalized;
1917
- } catch {
1918
- cache.routes = { at: Date.now(), value: [] };
1919
- return [];
1920
- }
1948
+ });
1921
1949
  }
1922
- async function fetchRouteHealth() {
1923
- if (nowFresh(cache.health)) return cache.health.value;
1924
- let value = null;
1925
- try {
1926
- const health = await apiRequest("/route-health", { timeoutMs: 8e3 });
1927
- value = health && typeof health === "object" && !Array.isArray(health) ? health : null;
1928
- } catch {
1929
- value = null;
1930
- }
1931
- cache.health = { at: Date.now(), value };
1932
- return value;
1950
+ function fetchRoutes() {
1951
+ if (nowFresh(cache.routes)) return Promise.resolve(cache.routes.value);
1952
+ return once("routes", async () => {
1953
+ try {
1954
+ const normalized = await requestAllPages("/routes");
1955
+ cache.routes = { at: Date.now(), value: normalized };
1956
+ return normalized;
1957
+ } catch {
1958
+ cache.routes = { at: Date.now(), value: [] };
1959
+ return [];
1960
+ }
1961
+ });
1933
1962
  }
1934
- async function fetchRwaVaults() {
1935
- if (nowFresh(cache.vaults)) return cache.vaults.value;
1936
- let value = [];
1937
- try {
1938
- const payload = await apiRequest("/rwa/vaults?status=active,coming_soon", { timeoutMs: 8e3 });
1939
- const rows = Array.isArray(payload) ? payload : payload?.vaults;
1940
- value = Array.isArray(rows) ? rows.filter((v) => !!v && typeof v === "object") : [];
1941
- } catch {
1942
- value = [];
1943
- }
1944
- cache.vaults = { at: Date.now(), value };
1945
- return value;
1963
+ function fetchRouteHealth() {
1964
+ if (nowFresh(cache.health)) return Promise.resolve(cache.health.value);
1965
+ return once("health", async () => {
1966
+ let value = null;
1967
+ try {
1968
+ const health = await apiRequest("/route-health", { timeoutMs: 8e3 });
1969
+ value = health && typeof health === "object" && !Array.isArray(health) ? health : null;
1970
+ } catch {
1971
+ value = null;
1972
+ }
1973
+ cache.health = { at: Date.now(), value };
1974
+ return value;
1975
+ });
1976
+ }
1977
+ function fetchRwaVaults() {
1978
+ if (nowFresh(cache.vaults)) return Promise.resolve(cache.vaults.value);
1979
+ return once("vaults", async () => {
1980
+ let value = [];
1981
+ try {
1982
+ const payload = await apiRequest("/rwa/vaults?status=active,coming_soon", { timeoutMs: 8e3 });
1983
+ const rows = Array.isArray(payload) ? payload : payload?.vaults;
1984
+ value = Array.isArray(rows) ? rows.filter((v) => !!v && typeof v === "object") : [];
1985
+ } catch {
1986
+ value = [];
1987
+ }
1988
+ cache.vaults = { at: Date.now(), value };
1989
+ return value;
1990
+ });
1946
1991
  }
1947
1992
  const priceCache = /* @__PURE__ */ new Map();
1948
1993
  async function fetchPrices(symbols) {
@@ -2680,12 +2725,16 @@ function resolveConfig(config = {}) {
2680
2725
  if (config.getApiKey) return String(await config.getApiKey() || "");
2681
2726
  return String(config.apiKey || "");
2682
2727
  };
2728
+ const shareable = !config.fetchImpl && !config.getApiKey;
2683
2729
  return {
2684
2730
  apiBase,
2685
2731
  getApiKey,
2686
2732
  fetchImpl,
2687
2733
  rpcOverrides: config.rpcOverrides ?? {},
2688
- onTransaction: config.onTransaction
2734
+ onTransaction: config.onTransaction,
2735
+ // The key is part of the scope: two keys can see two registries, and never each other's answers.
2736
+ registryScope: shareable ? { fetch: globalThis.fetch, key: `${apiBase}
2737
+ ${canAttachApiKey(apiBase, config.trustedApiOrigin) ? String(config.apiKey || "") : ""}` } : void 0
2689
2738
  };
2690
2739
  }
2691
2740
 
@@ -2789,4 +2838,4 @@ function createEngine(config = {}) {
2789
2838
  };
2790
2839
  }
2791
2840
 
2792
- 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, quotePartnerId, 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 };
2841
+ 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, formatJurisdiction, 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, quotePartnerId, 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 };
@@ -181,13 +181,16 @@ var CHAIN_DISPLAY_NAMES = Object.freeze({
181
181
  1088: "Metis",
182
182
  1135: "Lisk",
183
183
  1329: "Sei",
184
+ 1672: "Pharos",
184
185
  1776: "Injective EVM",
185
186
  1868: "Soneium",
186
187
  1923: "Swellchain",
187
188
  2222: "Kava",
188
189
  2818: "Morph",
189
190
  3343: "EDGE",
191
+ 4217: "Tempo",
190
192
  4326: "MegaETH",
193
+ 4663: "Robinhood Chain",
191
194
  5e3: "Mantle",
192
195
  8453: "Base",
193
196
  9745: "Plasma",
@@ -204,7 +207,8 @@ var CHAIN_DISPLAY_NAMES = Object.freeze({
204
207
  534352: "Scroll",
205
208
  747474: "Katana",
206
209
  7777777: "Zora",
207
- 21e6: "Corn"
210
+ 21e6: "Corn",
211
+ 1151111081099710: "Solana"
208
212
  });
209
213
 
210
214
  // src/core/address.ts
@@ -888,6 +892,20 @@ function withVaultArtwork(tokens, icons) {
888
892
  }
889
893
 
890
894
  // src/core/compliance.ts
895
+ function formatJurisdiction(jurisdiction, country) {
896
+ const region = jurisdiction?.trim() ?? "";
897
+ const explicitCountry = country?.trim() ?? "";
898
+ const countryCode = (explicitCountry || (/^[a-z]{2}$/i.test(region) && region.toUpperCase() !== "EU" ? region : "")).toUpperCase();
899
+ if (!countryCode) return region;
900
+ let countryLabel = countryCode;
901
+ try {
902
+ countryLabel = new Intl.DisplayNames(["en"], { type: "region" }).of(countryCode) ?? countryCode;
903
+ } catch {
904
+ }
905
+ const namedCountry = countryLabel === countryCode ? countryCode : `${countryLabel} (${countryCode})`;
906
+ if (!region || region.toUpperCase() === countryCode) return namedCountry;
907
+ return `${region} \xB7 ${namedCountry}`;
908
+ }
891
909
  var COMPLIANCE_DENY_LABEL = "Compliance check failed";
892
910
  function complianceView(compliance, hasQuote = true) {
893
911
  if (!hasQuote) {
@@ -1708,7 +1726,7 @@ var CHANNEL_HEADER = "x-zd-channel";
1708
1726
  var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
1709
1727
  var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
1710
1728
  var WIDGET_CHANNEL = "widget";
1711
- var WIDGET_VERSION = "4.8.0" ;
1729
+ var WIDGET_VERSION = "4.10.0" ;
1712
1730
  var MAX_CHANNEL_VERSION_LEN = 32;
1713
1731
  function sanitizeVersion(raw) {
1714
1732
  const v = String(raw).trim();
@@ -1816,14 +1834,31 @@ function wait(ms) {
1816
1834
  }
1817
1835
  var PAGE_LIMIT = 500;
1818
1836
  var MAX_PAGES = 10;
1837
+ var newRegistryCache = () => ({ chains: null, tokens: null, routes: null, health: null, vaults: null, inflight: /* @__PURE__ */ new Map() });
1838
+ var SHARED_REGISTRY = /* @__PURE__ */ new WeakMap();
1839
+ function registryCacheFor(scope) {
1840
+ if (!scope) return newRegistryCache();
1841
+ let byKey = SHARED_REGISTRY.get(scope.fetch);
1842
+ if (!byKey) {
1843
+ byKey = /* @__PURE__ */ new Map();
1844
+ SHARED_REGISTRY.set(scope.fetch, byKey);
1845
+ }
1846
+ let cache = byKey.get(scope.key);
1847
+ if (!cache) {
1848
+ cache = newRegistryCache();
1849
+ byKey.set(scope.key, cache);
1850
+ }
1851
+ return cache;
1852
+ }
1819
1853
  function createApiClient(cfg) {
1820
- const cache = {
1821
- chains: null,
1822
- tokens: null,
1823
- routes: null,
1824
- health: null,
1825
- vaults: null
1826
- };
1854
+ const cache = registryCacheFor(cfg.registryScope);
1855
+ function once(name, read) {
1856
+ const pending = cache.inflight.get(name);
1857
+ if (pending) return pending;
1858
+ const p = read().finally(() => cache.inflight.delete(name));
1859
+ cache.inflight.set(name, p);
1860
+ return p;
1861
+ }
1827
1862
  const screenCache = /* @__PURE__ */ new Map();
1828
1863
  const screenInflight = /* @__PURE__ */ new Map();
1829
1864
  const apiBase = cfg.apiBase.replace(/\/$/, "");
@@ -1893,58 +1928,68 @@ function createApiClient(cfg) {
1893
1928
  }
1894
1929
  throw apiError(`ZeroDelta still had rows after ${MAX_PAGES} pages (${path}).`, { code: "bad_response" });
1895
1930
  }
1896
- async function fetchChains() {
1897
- if (nowFresh(cache.chains)) return cache.chains.value;
1898
- const chains = await apiRequest(`/chains${toQuery({ enabledOnly: true, limit: 500 })}`);
1899
- const normalized = (Array.isArray(chains) ? chains : []).map((chain) => ({ ...chain, chainId: Number(chain.chainId) })).map((chain) => {
1900
- const escrow = normalizeAddress(chain.escrowContract);
1901
- return escrow ? { ...chain, escrowContract: escrow } : { ...chain, escrowContract: void 0 };
1931
+ function fetchChains() {
1932
+ if (nowFresh(cache.chains)) return Promise.resolve(cache.chains.value);
1933
+ return once("chains", async () => {
1934
+ const chains = await apiRequest(`/chains${toQuery({ enabledOnly: true, limit: 500 })}`);
1935
+ const normalized = (Array.isArray(chains) ? chains : []).map((chain) => ({ ...chain, chainId: Number(chain.chainId) })).map((chain) => {
1936
+ const escrow = normalizeAddress(chain.escrowContract);
1937
+ return escrow ? { ...chain, escrowContract: escrow } : { ...chain, escrowContract: void 0 };
1938
+ });
1939
+ cache.chains = { at: Date.now(), value: normalized };
1940
+ return normalized;
1902
1941
  });
1903
- cache.chains = { at: Date.now(), value: normalized };
1904
- return normalized;
1905
- }
1906
- async function fetchTokens() {
1907
- if (nowFresh(cache.tokens)) return cache.tokens.value;
1908
- const tokens = await requestAllPages("/tokens");
1909
- const normalized = tokens.map((token) => ({ ...token, chainId: Number(token.chainId) }));
1910
- cache.tokens = { at: Date.now(), value: normalized };
1911
- return normalized;
1912
- }
1913
- async function fetchRoutes() {
1914
- if (nowFresh(cache.routes)) return cache.routes.value;
1915
- try {
1916
- const normalized = await requestAllPages("/routes");
1917
- cache.routes = { at: Date.now(), value: normalized };
1942
+ }
1943
+ function fetchTokens() {
1944
+ if (nowFresh(cache.tokens)) return Promise.resolve(cache.tokens.value);
1945
+ return once("tokens", async () => {
1946
+ const tokens = await requestAllPages("/tokens");
1947
+ const normalized = tokens.map((token) => ({ ...token, chainId: Number(token.chainId) }));
1948
+ cache.tokens = { at: Date.now(), value: normalized };
1918
1949
  return normalized;
1919
- } catch {
1920
- cache.routes = { at: Date.now(), value: [] };
1921
- return [];
1922
- }
1950
+ });
1923
1951
  }
1924
- async function fetchRouteHealth() {
1925
- if (nowFresh(cache.health)) return cache.health.value;
1926
- let value = null;
1927
- try {
1928
- const health = await apiRequest("/route-health", { timeoutMs: 8e3 });
1929
- value = health && typeof health === "object" && !Array.isArray(health) ? health : null;
1930
- } catch {
1931
- value = null;
1932
- }
1933
- cache.health = { at: Date.now(), value };
1934
- return value;
1952
+ function fetchRoutes() {
1953
+ if (nowFresh(cache.routes)) return Promise.resolve(cache.routes.value);
1954
+ return once("routes", async () => {
1955
+ try {
1956
+ const normalized = await requestAllPages("/routes");
1957
+ cache.routes = { at: Date.now(), value: normalized };
1958
+ return normalized;
1959
+ } catch {
1960
+ cache.routes = { at: Date.now(), value: [] };
1961
+ return [];
1962
+ }
1963
+ });
1935
1964
  }
1936
- async function fetchRwaVaults() {
1937
- if (nowFresh(cache.vaults)) return cache.vaults.value;
1938
- let value = [];
1939
- try {
1940
- const payload = await apiRequest("/rwa/vaults?status=active,coming_soon", { timeoutMs: 8e3 });
1941
- const rows = Array.isArray(payload) ? payload : payload?.vaults;
1942
- value = Array.isArray(rows) ? rows.filter((v) => !!v && typeof v === "object") : [];
1943
- } catch {
1944
- value = [];
1945
- }
1946
- cache.vaults = { at: Date.now(), value };
1947
- return value;
1965
+ function fetchRouteHealth() {
1966
+ if (nowFresh(cache.health)) return Promise.resolve(cache.health.value);
1967
+ return once("health", async () => {
1968
+ let value = null;
1969
+ try {
1970
+ const health = await apiRequest("/route-health", { timeoutMs: 8e3 });
1971
+ value = health && typeof health === "object" && !Array.isArray(health) ? health : null;
1972
+ } catch {
1973
+ value = null;
1974
+ }
1975
+ cache.health = { at: Date.now(), value };
1976
+ return value;
1977
+ });
1978
+ }
1979
+ function fetchRwaVaults() {
1980
+ if (nowFresh(cache.vaults)) return Promise.resolve(cache.vaults.value);
1981
+ return once("vaults", async () => {
1982
+ let value = [];
1983
+ try {
1984
+ const payload = await apiRequest("/rwa/vaults?status=active,coming_soon", { timeoutMs: 8e3 });
1985
+ const rows = Array.isArray(payload) ? payload : payload?.vaults;
1986
+ value = Array.isArray(rows) ? rows.filter((v) => !!v && typeof v === "object") : [];
1987
+ } catch {
1988
+ value = [];
1989
+ }
1990
+ cache.vaults = { at: Date.now(), value };
1991
+ return value;
1992
+ });
1948
1993
  }
1949
1994
  const priceCache = /* @__PURE__ */ new Map();
1950
1995
  async function fetchPrices(symbols) {
@@ -2682,12 +2727,16 @@ function resolveConfig(config = {}) {
2682
2727
  if (config.getApiKey) return String(await config.getApiKey() || "");
2683
2728
  return String(config.apiKey || "");
2684
2729
  };
2730
+ const shareable = !config.fetchImpl && !config.getApiKey;
2685
2731
  return {
2686
2732
  apiBase,
2687
2733
  getApiKey,
2688
2734
  fetchImpl,
2689
2735
  rpcOverrides: config.rpcOverrides ?? {},
2690
- onTransaction: config.onTransaction
2736
+ onTransaction: config.onTransaction,
2737
+ // The key is part of the scope: two keys can see two registries, and never each other's answers.
2738
+ registryScope: shareable ? { fetch: globalThis.fetch, key: `${apiBase}
2739
+ ${canAttachApiKey(apiBase, config.trustedApiOrigin) ? String(config.apiKey || "") : ""}` } : void 0
2691
2740
  };
2692
2741
  }
2693
2742
 
@@ -2887,6 +2936,7 @@ exports.fetchPaymentPlan = fetchPaymentPlan;
2887
2936
  exports.finalOf = finalOf;
2888
2937
  exports.findToken = findToken;
2889
2938
  exports.foldTicker = foldTicker;
2939
+ exports.formatJurisdiction = formatJurisdiction;
2890
2940
  exports.formatNative = formatNative;
2891
2941
  exports.formatUnits = formatUnits;
2892
2942
  exports.hasReachableDestination = hasReachableDestination;
@@ -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-BEQ8DMvJ.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-BEQ8DMvJ.cjs';
1
+ import { T as Token, Q as Quote, N as NormalizedOrder, s as PayOption, h as RouteResult, b as Chain, R as Route, a as Catalogue, t as RwaVault, F as FetchQuoteFn, u as SolveResult, O as OrderRequest, C as Compliance, v as BalanceTarget, w as BalanceEntry, x as ApiClient, P as Plan, y as SwapInput, z as PlannedTx, D as Verifier, f as ExchangeProduct, i as TxHistoryEntry, S as SanitizedTxEntry, E as EngineConfig } from '../verify-QEs-XHri.cjs';
2
+ export { G as Address, H as ApiError, A as Availability, I as BLOCK_LABEL_DEFAULT, B as BrokenLane, J as COMPLIANCE_CHECK_ORDER, K as COMPLIANCE_DENY_LABEL, M as CatalogueContext, U as CatalogueInput, c as ComplianceCheck, X as ComplianceCheckId, Y as ComplianceDecision, d as ComplianceTone, e as ComplianceView, Z as DIRECT_CHECK_IDS, _ as DIRECT_SCOPE_NOTE, $ as Destination, a0 as FLOOR_CATEGORIES, a1 as Hex, a2 as LaneAvailabilityState, L as LaneLimit, a3 as PlannedTxKind, a4 as QuoteBlock, a5 as ResolvedConfig, a6 as RouteHealth, a7 as RouteHealthAvailability, a8 as RouteHealthLane, g as RouteLeg, a9 as SCREENING_BUCKETS, aa as ScreenProvider, ab as ScreeningBucket, ac as ScreeningOutcome, ad as TUNABLE_CATEGORIES, ae as TxPlan, V as VerifyResult, W as WalletScreen, af as amountFieldError, ag as apiError, j as assetClassOf, ah as blockLabelFor, ai as brokenLaneFor, k as brokenLaneReason, aj as buildCatalogue, ak as canAttachApiKey, al as categoryLabel, am as classifyQuoteError, l as complianceChecks, an as complianceControlsEvaluated, m as complianceControlsLine, ao as complianceReasonHead, ap as complianceReasonTag, aq as complianceTagOf, n as complianceView, o as counterpartTokens, ar as createApiClient, as as createVerifier, p as destinationAvailability, at as destinationKeys, au as directComplianceFromScreens, av as distinctScreenedWallets, aw as exceedsLaneLimit, ax as executableRoutes, ay as executionChainIds, q as formatJurisdiction, az as hasReachableDestination, aA as hubDeliverableSymbols, r as humanizeComplianceReason, aB as isExecutableBridge, aC as isKnownUnbridgeable, aD as isSourceToken, aE as laneAvailabilityState, aF as laneKey, aG as laneKeys, aH as laneLimitAmount, aI as laneLimitError, aJ as laneLimitFor, aK as laneLimitHint, aL as laneLimitSymbol, aM as limitedLanes, aN as parseAllowedApiBase, aO as productAssets, aP as registryRpc, aQ as resolveApiBase, aR as resolveConfig, aS as screeningOutcomeOf, aT as sourceKeys, aU as suppressedLanes, aV as tokenKey, aW as txMatchesPlan, aX as unattributedComplianceReasons } from '../verify-QEs-XHri.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. */
@@ -601,7 +601,7 @@ interface Engine {
601
601
  */
602
602
  reportSubmission?: ApiClient["reportSubmission"];
603
603
  }
604
- /** Create an engine bound to a config. The 60s resource cache is per-engine. */
604
+ /** Create an engine bound to a config. Its 60s registry cache is shared with every engine of the same base and key (api.ts › registryCacheFor). */
605
605
  declare function createEngine(config?: EngineConfig): Engine;
606
606
 
607
607
  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, quotePartnerId, 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-BEQ8DMvJ.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-BEQ8DMvJ.js';
1
+ import { T as Token, Q as Quote, N as NormalizedOrder, s as PayOption, h as RouteResult, b as Chain, R as Route, a as Catalogue, t as RwaVault, F as FetchQuoteFn, u as SolveResult, O as OrderRequest, C as Compliance, v as BalanceTarget, w as BalanceEntry, x as ApiClient, P as Plan, y as SwapInput, z as PlannedTx, D as Verifier, f as ExchangeProduct, i as TxHistoryEntry, S as SanitizedTxEntry, E as EngineConfig } from '../verify-QEs-XHri.js';
2
+ export { G as Address, H as ApiError, A as Availability, I as BLOCK_LABEL_DEFAULT, B as BrokenLane, J as COMPLIANCE_CHECK_ORDER, K as COMPLIANCE_DENY_LABEL, M as CatalogueContext, U as CatalogueInput, c as ComplianceCheck, X as ComplianceCheckId, Y as ComplianceDecision, d as ComplianceTone, e as ComplianceView, Z as DIRECT_CHECK_IDS, _ as DIRECT_SCOPE_NOTE, $ as Destination, a0 as FLOOR_CATEGORIES, a1 as Hex, a2 as LaneAvailabilityState, L as LaneLimit, a3 as PlannedTxKind, a4 as QuoteBlock, a5 as ResolvedConfig, a6 as RouteHealth, a7 as RouteHealthAvailability, a8 as RouteHealthLane, g as RouteLeg, a9 as SCREENING_BUCKETS, aa as ScreenProvider, ab as ScreeningBucket, ac as ScreeningOutcome, ad as TUNABLE_CATEGORIES, ae as TxPlan, V as VerifyResult, W as WalletScreen, af as amountFieldError, ag as apiError, j as assetClassOf, ah as blockLabelFor, ai as brokenLaneFor, k as brokenLaneReason, aj as buildCatalogue, ak as canAttachApiKey, al as categoryLabel, am as classifyQuoteError, l as complianceChecks, an as complianceControlsEvaluated, m as complianceControlsLine, ao as complianceReasonHead, ap as complianceReasonTag, aq as complianceTagOf, n as complianceView, o as counterpartTokens, ar as createApiClient, as as createVerifier, p as destinationAvailability, at as destinationKeys, au as directComplianceFromScreens, av as distinctScreenedWallets, aw as exceedsLaneLimit, ax as executableRoutes, ay as executionChainIds, q as formatJurisdiction, az as hasReachableDestination, aA as hubDeliverableSymbols, r as humanizeComplianceReason, aB as isExecutableBridge, aC as isKnownUnbridgeable, aD as isSourceToken, aE as laneAvailabilityState, aF as laneKey, aG as laneKeys, aH as laneLimitAmount, aI as laneLimitError, aJ as laneLimitFor, aK as laneLimitHint, aL as laneLimitSymbol, aM as limitedLanes, aN as parseAllowedApiBase, aO as productAssets, aP as registryRpc, aQ as resolveApiBase, aR as resolveConfig, aS as screeningOutcomeOf, aT as sourceKeys, aU as suppressedLanes, aV as tokenKey, aW as txMatchesPlan, aX as unattributedComplianceReasons } from '../verify-QEs-XHri.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. */
@@ -601,7 +601,7 @@ interface Engine {
601
601
  */
602
602
  reportSubmission?: ApiClient["reportSubmission"];
603
603
  }
604
- /** Create an engine bound to a config. The 60s resource cache is per-engine. */
604
+ /** Create an engine bound to a config. Its 60s registry cache is shared with every engine of the same base and key (api.ts › registryCacheFor). */
605
605
  declare function createEngine(config?: EngineConfig): Engine;
606
606
 
607
607
  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, quotePartnerId, 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, maxDeadlineSeconds, maxNativeFeeWei, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeOrderRequest, normalizeOrderRequests, parseAllowedApiBase, parseUnitsDecimal, planErrorSummary, planMsgValueHex, productAssets, quotePartnerId, 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-F46VMTTL.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, formatJurisdiction, 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, quotePartnerId, 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-BOEY6DG5.js';