@glacislabs/stablegenie-zerodelta 4.5.0 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-447DEZ5S.js → chunk-CEBEMZHZ.js} +41 -3
- package/dist/{chunk-COBXR362.js → chunk-GBV2QVCH.js} +1170 -623
- package/dist/core/index.cjs +41 -3
- package/dist/core/index.d.cts +13 -2
- package/dist/core/index.d.ts +13 -2
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +1202 -617
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/{mount-BnAD7hWX.d.cts → mount-DjeyxZcy.d.cts} +27 -8
- package/dist/{mount-DcbU1gqd.d.ts → mount-qV6l3ZuG.d.ts} +27 -8
- package/dist/mount.cjs +1202 -617
- package/dist/mount.d.cts +2 -2
- package/dist/mount.d.ts +2 -2
- package/dist/mount.js +2 -2
- package/dist/standalone.global.js +198 -46
- package/dist/{verify-D722uRwZ.d.cts → verify-DSCljQtK.d.cts} +6 -0
- package/dist/{verify-D722uRwZ.d.ts → verify-DSCljQtK.d.ts} +6 -0
- package/package.json +1 -1
package/dist/core/index.cjs
CHANGED
|
@@ -1702,7 +1702,7 @@ var CHANNEL_HEADER = "x-zd-channel";
|
|
|
1702
1702
|
var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
|
|
1703
1703
|
var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
|
|
1704
1704
|
var WIDGET_CHANNEL = "widget";
|
|
1705
|
-
var WIDGET_VERSION = "4.
|
|
1705
|
+
var WIDGET_VERSION = "4.6.0" ;
|
|
1706
1706
|
var MAX_CHANNEL_VERSION_LEN = 32;
|
|
1707
1707
|
function sanitizeVersion(raw) {
|
|
1708
1708
|
const v = String(raw).trim();
|
|
@@ -1940,6 +1940,33 @@ function createApiClient(cfg) {
|
|
|
1940
1940
|
cache.vaults = { at: Date.now(), value };
|
|
1941
1941
|
return value;
|
|
1942
1942
|
}
|
|
1943
|
+
const priceCache = /* @__PURE__ */ new Map();
|
|
1944
|
+
async function fetchPrices(symbols) {
|
|
1945
|
+
const wanted = [...new Set(symbols.map((s) => String(s || "").toUpperCase()).filter((s) => /^[A-Z0-9]{1,16}$/.test(s)))];
|
|
1946
|
+
const missing = wanted.filter((s) => !nowFresh(priceCache.get(s) ?? null));
|
|
1947
|
+
if (missing.length) {
|
|
1948
|
+
let prices = {};
|
|
1949
|
+
try {
|
|
1950
|
+
const snapshot = await apiRequest(`/prices?symbols=${encodeURIComponent(missing.join(","))}`, {
|
|
1951
|
+
timeoutMs: 8e3
|
|
1952
|
+
});
|
|
1953
|
+
prices = snapshot && typeof snapshot === "object" && !snapshot.stale && snapshot.prices && typeof snapshot.prices === "object" ? snapshot.prices : {};
|
|
1954
|
+
} catch {
|
|
1955
|
+
prices = {};
|
|
1956
|
+
}
|
|
1957
|
+
const at = Date.now();
|
|
1958
|
+
for (const s of missing) {
|
|
1959
|
+
const n = Number(prices[s]);
|
|
1960
|
+
priceCache.set(s, { at, value: Number.isFinite(n) && n > 0 ? n : null });
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
const out = {};
|
|
1964
|
+
for (const s of wanted) {
|
|
1965
|
+
const value = priceCache.get(s)?.value;
|
|
1966
|
+
if (value != null) out[s] = value;
|
|
1967
|
+
}
|
|
1968
|
+
return out;
|
|
1969
|
+
}
|
|
1943
1970
|
async function fetchQuote(body, retries = 1) {
|
|
1944
1971
|
let lastError;
|
|
1945
1972
|
for (let attempt = 0; attempt <= retries; attempt += 1) {
|
|
@@ -1999,7 +2026,7 @@ function createApiClient(cfg) {
|
|
|
1999
2026
|
return false;
|
|
2000
2027
|
}
|
|
2001
2028
|
}
|
|
2002
|
-
return { apiRequest, fetchChains, fetchTokens, fetchRoutes, fetchRouteHealth, fetchRwaVaults, fetchQuote, screenWallet, reportSubmission, apiBase };
|
|
2029
|
+
return { apiRequest, fetchChains, fetchTokens, fetchRoutes, fetchRouteHealth, fetchRwaVaults, fetchPrices, fetchQuote, screenWallet, reportSubmission, apiBase };
|
|
2003
2030
|
}
|
|
2004
2031
|
|
|
2005
2032
|
// src/core/plan.ts
|
|
@@ -2182,6 +2209,14 @@ function validateSwap(swap = {}) {
|
|
|
2182
2209
|
if (!/^\d+(\.\d+)?$/.test(amountIn) || Number(amountIn) <= 0 || Number(amountIn) > 1e9) throw new Error("Enter a valid swap amount.");
|
|
2183
2210
|
return { fromChainId, toChainId, fromToken, toToken, amountIn };
|
|
2184
2211
|
}
|
|
2212
|
+
function viaOf(quote, tokens) {
|
|
2213
|
+
const orders = Array.isArray(quote.orderRequests) ? quote.orderRequests : [];
|
|
2214
|
+
if (orders.length < 2) return null;
|
|
2215
|
+
const first = orders[0];
|
|
2216
|
+
const wanted = normalizeAddress(first?.askToken);
|
|
2217
|
+
const token = wanted ? tokens.find((t) => Number(t.chainId) === Number(first?.destinationChainId) && normalizeAddress(t.address) === wanted) : void 0;
|
|
2218
|
+
return token ? tokenTicker(token) : "";
|
|
2219
|
+
}
|
|
2185
2220
|
async function quoteSwapPreview(api, swap, owner) {
|
|
2186
2221
|
const v = validateSwap(swap);
|
|
2187
2222
|
const tokens = await api.fetchTokens();
|
|
@@ -2210,7 +2245,9 @@ async function quoteSwapPreview(api, swap, owner) {
|
|
|
2210
2245
|
toToken: destToken.symbol,
|
|
2211
2246
|
bridge: quote.bridge || "",
|
|
2212
2247
|
feeBps: Number(quote.feeBps || 0),
|
|
2213
|
-
estimatedDuration: Number(quote.estimatedDuration || 0)
|
|
2248
|
+
estimatedDuration: Number(quote.estimatedDuration || 0),
|
|
2249
|
+
via: viaOf(quote, tokens),
|
|
2250
|
+
nativeFeeRaw: /^\d+$/.test(String(quote.gasCostSource ?? "")) ? String(quote.gasCostSource) : "0"
|
|
2214
2251
|
};
|
|
2215
2252
|
}
|
|
2216
2253
|
async function buildSwapPlan(api, swap, payer, wallet = {}) {
|
|
@@ -2704,6 +2741,7 @@ function createEngine(config = {}) {
|
|
|
2704
2741
|
fetchRoutes: api.fetchRoutes,
|
|
2705
2742
|
fetchRouteHealth: api.fetchRouteHealth,
|
|
2706
2743
|
fetchQuote: api.fetchQuote,
|
|
2744
|
+
fetchPrices: (symbols) => api.fetchPrices ? api.fetchPrices(symbols) : Promise.resolve({}),
|
|
2707
2745
|
fetchCatalogue: async (allowedAssets, product) => {
|
|
2708
2746
|
const [chains, registryTokens, routes, health, vaults] = await Promise.all([
|
|
2709
2747
|
api.fetchChains().catch(() => []),
|
package/dist/core/index.d.cts
CHANGED
|
@@ -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-
|
|
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-
|
|
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-DSCljQtK.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-DSCljQtK.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. */
|
|
@@ -383,6 +383,15 @@ interface SwapPreview {
|
|
|
383
383
|
bridge: string;
|
|
384
384
|
feeBps: number;
|
|
385
385
|
estimatedDuration: number;
|
|
386
|
+
/**
|
|
387
|
+
* What a CHAINED order passes through — leg 1's ask, named from the registry (the USDC a vault
|
|
388
|
+
* purchase is routed via) — or null for a single-order route. Display only: the executed plan
|
|
389
|
+
* re-derives every leg and asserts them continuous before anything is signed.
|
|
390
|
+
*/
|
|
391
|
+
via: string | null;
|
|
392
|
+
/** The quote's `gasCostSource` in wei — the native fee a LayerZero leg attaches, before the
|
|
393
|
+
* widget's buffer. "0" when the route charges none. Display only. */
|
|
394
|
+
nativeFeeRaw: string;
|
|
386
395
|
}
|
|
387
396
|
declare function quoteSwapPreview(api: ApiClient, swap: SwapInput, owner?: string): Promise<SwapPreview>;
|
|
388
397
|
declare function buildSwapPlan(api: ApiClient, swap: SwapInput, payer: string, wallet?: {
|
|
@@ -541,6 +550,8 @@ interface Engine {
|
|
|
541
550
|
fetchRoutes: ApiClient["fetchRoutes"];
|
|
542
551
|
fetchRouteHealth: ApiClient["fetchRouteHealth"];
|
|
543
552
|
fetchQuote: ApiClient["fetchQuote"];
|
|
553
|
+
/** USD prices by upper-cased symbol, for display only. Never rejects; an unpriced symbol is absent. */
|
|
554
|
+
fetchPrices: (symbols: readonly string[]) => Promise<Record<string, number>>;
|
|
544
555
|
/**
|
|
545
556
|
* The selectable catalogue, derived from the LIVE registry — `/chains`, `/tokens`, `/routes` and
|
|
546
557
|
* the gateway's measured `/route-health`, resolved with the same rules the ZeroDelta dapp uses.
|
package/dist/core/index.d.ts
CHANGED
|
@@ -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-
|
|
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-
|
|
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-DSCljQtK.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-DSCljQtK.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. */
|
|
@@ -383,6 +383,15 @@ interface SwapPreview {
|
|
|
383
383
|
bridge: string;
|
|
384
384
|
feeBps: number;
|
|
385
385
|
estimatedDuration: number;
|
|
386
|
+
/**
|
|
387
|
+
* What a CHAINED order passes through — leg 1's ask, named from the registry (the USDC a vault
|
|
388
|
+
* purchase is routed via) — or null for a single-order route. Display only: the executed plan
|
|
389
|
+
* re-derives every leg and asserts them continuous before anything is signed.
|
|
390
|
+
*/
|
|
391
|
+
via: string | null;
|
|
392
|
+
/** The quote's `gasCostSource` in wei — the native fee a LayerZero leg attaches, before the
|
|
393
|
+
* widget's buffer. "0" when the route charges none. Display only. */
|
|
394
|
+
nativeFeeRaw: string;
|
|
386
395
|
}
|
|
387
396
|
declare function quoteSwapPreview(api: ApiClient, swap: SwapInput, owner?: string): Promise<SwapPreview>;
|
|
388
397
|
declare function buildSwapPlan(api: ApiClient, swap: SwapInput, payer: string, wallet?: {
|
|
@@ -541,6 +550,8 @@ interface Engine {
|
|
|
541
550
|
fetchRoutes: ApiClient["fetchRoutes"];
|
|
542
551
|
fetchRouteHealth: ApiClient["fetchRouteHealth"];
|
|
543
552
|
fetchQuote: ApiClient["fetchQuote"];
|
|
553
|
+
/** USD prices by upper-cased symbol, for display only. Never rejects; an unpriced symbol is absent. */
|
|
554
|
+
fetchPrices: (symbols: readonly string[]) => Promise<Record<string, number>>;
|
|
544
555
|
/**
|
|
545
556
|
* The selectable catalogue, derived from the LIVE registry — `/chains`, `/tokens`, `/routes` and
|
|
546
557
|
* the gateway's measured `/route-health`, resolved with the same rules the ZeroDelta dapp uses.
|
package/dist/core/index.js
CHANGED
|
@@ -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, 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-
|
|
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-CEBEMZHZ.js';
|