@glacislabs/stablegenie-zerodelta 4.2.1 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-FDCSZ3OY.js → chunk-53K3BXT5.js} +114 -13
- package/dist/{chunk-OOESQYM3.js → chunk-NYIORRFU.js} +115 -31
- package/dist/core/index.cjs +124 -12
- package/dist/core/index.d.cts +31 -7
- package/dist/core/index.d.ts +31 -7
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +227 -42
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/{mount-Bver3O2z.d.ts → mount-Blg-caPn.d.ts} +1 -1
- package/dist/{mount-Dtbtdry1.d.cts → mount-D8hY-a-s.d.cts} +1 -1
- package/dist/mount.cjs +227 -42
- 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 +12 -6
- package/dist/{verify-57gjg_dM.d.cts → verify-C1VaWfiy.d.cts} +155 -9
- package/dist/{verify-57gjg_dM.d.ts → verify-C1VaWfiy.d.ts} +155 -9
- package/package.json +1 -1
package/dist/core/index.cjs
CHANGED
|
@@ -554,6 +554,10 @@ function brokenLaneFor(token, source, brokenLanes) {
|
|
|
554
554
|
if (!source || !brokenLanes) return void 0;
|
|
555
555
|
return brokenLanes.get(laneKey(source.chainId, source.address, token.chainId, token.address));
|
|
556
556
|
}
|
|
557
|
+
function laneLimitFor(token, source, limitedLanes2) {
|
|
558
|
+
if (!source || !limitedLanes2) return void 0;
|
|
559
|
+
return limitedLanes2.get(laneKey(source.chainId, source.address, token.chainId, token.address));
|
|
560
|
+
}
|
|
557
561
|
function destinationAvailability(token, ctx, source) {
|
|
558
562
|
if (brokenLaneFor(token, source ?? void 0, ctx.brokenLanes)) return "unreachable";
|
|
559
563
|
if (directLaneOK(token, source ?? void 0, ctx.lanes)) {
|
|
@@ -609,7 +613,17 @@ function buildCatalogue(input) {
|
|
|
609
613
|
);
|
|
610
614
|
const byId = new Map(enabledChains.map((c) => [Number(c.chainId), c]));
|
|
611
615
|
for (const id of chainIds) if (!byId.has(id)) byId.set(id, { chainId: id, isEnabled: true });
|
|
612
|
-
return {
|
|
616
|
+
return {
|
|
617
|
+
...ctx,
|
|
618
|
+
product,
|
|
619
|
+
tokens: catalogue,
|
|
620
|
+
sources,
|
|
621
|
+
chainIds,
|
|
622
|
+
chains: [...byId.values()],
|
|
623
|
+
ready,
|
|
624
|
+
vaultIcons: input.vaultIcons ?? /* @__PURE__ */ new Map(),
|
|
625
|
+
limitedLanes: input.limitedLanes ?? /* @__PURE__ */ new Map()
|
|
626
|
+
};
|
|
613
627
|
}
|
|
614
628
|
|
|
615
629
|
// src/core/options.ts
|
|
@@ -748,23 +762,89 @@ function nativeFeeShortMessage(check, symbol, chainName) {
|
|
|
748
762
|
|
|
749
763
|
// src/core/route-health.ts
|
|
750
764
|
var EMPTY = /* @__PURE__ */ new Map();
|
|
765
|
+
var NO_LIMITS = /* @__PURE__ */ new Map();
|
|
766
|
+
function laneAvailabilityState(lane) {
|
|
767
|
+
const availability = lane?.availability;
|
|
768
|
+
if (!availability || typeof availability !== "object") return null;
|
|
769
|
+
const state = availability.state;
|
|
770
|
+
return state === "available" || state === "limited" || state === "unavailable" ? state : null;
|
|
771
|
+
}
|
|
772
|
+
function isSuppressed(lane) {
|
|
773
|
+
const state = laneAvailabilityState(lane);
|
|
774
|
+
if (state) return state === "unavailable";
|
|
775
|
+
const firewalled = lane.status === "unknown" && lane.kind === "firewalled";
|
|
776
|
+
return lane.status === "broken" || firewalled;
|
|
777
|
+
}
|
|
751
778
|
function suppressedLanes(health) {
|
|
752
779
|
if (health?.mode !== "enforce" || !Array.isArray(health.lanes)) return EMPTY;
|
|
753
780
|
const out = /* @__PURE__ */ new Map();
|
|
754
781
|
for (const lane of health.lanes) {
|
|
755
|
-
|
|
756
|
-
if (lane?.status !== "broken" && !firewalled) continue;
|
|
782
|
+
if (!lane || typeof lane !== "object" || !isSuppressed(lane)) continue;
|
|
757
783
|
const key = typeof lane.laneKey === "string" ? lane.laneKey.toLowerCase() : "";
|
|
758
784
|
if (!key) continue;
|
|
785
|
+
const availability = laneAvailabilityState(lane) ? lane.availability : void 0;
|
|
786
|
+
const code = typeof availability?.code === "string" && availability.code ? availability.code : lane.code;
|
|
787
|
+
const message = typeof availability?.message === "string" && availability.message ? availability.message : lane.message;
|
|
759
788
|
out.set(key, {
|
|
760
789
|
route: typeof lane.route === "string" ? lane.route : "",
|
|
761
|
-
code: typeof
|
|
762
|
-
message: typeof
|
|
790
|
+
code: typeof code === "string" ? code : "",
|
|
791
|
+
message: typeof message === "string" ? message : "",
|
|
763
792
|
...typeof lane.kind === "string" ? { kind: lane.kind } : {}
|
|
764
793
|
});
|
|
765
794
|
}
|
|
766
795
|
return out;
|
|
767
796
|
}
|
|
797
|
+
var BASE_UNITS = /^\d{1,78}$/;
|
|
798
|
+
function limitedLanes(health) {
|
|
799
|
+
if (health?.mode !== "enforce" || !Array.isArray(health.lanes)) return NO_LIMITS;
|
|
800
|
+
const out = /* @__PURE__ */ new Map();
|
|
801
|
+
for (const lane of health.lanes) {
|
|
802
|
+
if (!lane || typeof lane !== "object" || laneAvailabilityState(lane) !== "limited") continue;
|
|
803
|
+
const key = typeof lane.laneKey === "string" ? lane.laneKey.toLowerCase() : "";
|
|
804
|
+
const limit = lane.availability?.limit;
|
|
805
|
+
if (!key || !limit || typeof limit !== "object") continue;
|
|
806
|
+
const side = limit.side === "bid" || limit.side === "ask" ? limit.side : null;
|
|
807
|
+
const maxAmount = typeof limit.maxAmount === "string" ? limit.maxAmount.trim() : "";
|
|
808
|
+
const decimals = limit.decimals;
|
|
809
|
+
if (!side || !BASE_UNITS.test(maxAmount) || typeof decimals !== "number" || !Number.isInteger(decimals) || decimals < 0 || decimals > 36) continue;
|
|
810
|
+
const code = lane.availability?.code;
|
|
811
|
+
out.set(key, {
|
|
812
|
+
side,
|
|
813
|
+
token: typeof limit.token === "string" ? limit.token : "",
|
|
814
|
+
fromChainId: Number(limit.fromChainId) || 0,
|
|
815
|
+
toChainId: Number(limit.toChainId) || 0,
|
|
816
|
+
maxAmount,
|
|
817
|
+
decimals,
|
|
818
|
+
code: typeof code === "string" ? code : "",
|
|
819
|
+
...typeof limit.measuredAt === "string" ? { measuredAt: limit.measuredAt } : {}
|
|
820
|
+
});
|
|
821
|
+
}
|
|
822
|
+
return out;
|
|
823
|
+
}
|
|
824
|
+
function exceedsLaneLimit(limit, amount, bidDecimals) {
|
|
825
|
+
if (limit?.side !== "bid" || !BASE_UNITS.test(limit.maxAmount)) return false;
|
|
826
|
+
let raw;
|
|
827
|
+
try {
|
|
828
|
+
raw = parseUnitsDecimal(amount, bidDecimals);
|
|
829
|
+
} catch {
|
|
830
|
+
return false;
|
|
831
|
+
}
|
|
832
|
+
const scale = Math.max(bidDecimals, limit.decimals);
|
|
833
|
+
return scaleDecimals(raw, bidDecimals, scale) > scaleDecimals(BigInt(limit.maxAmount), limit.decimals, scale);
|
|
834
|
+
}
|
|
835
|
+
function laneLimitAmount(limit) {
|
|
836
|
+
return formatUnits(limit.maxAmount, limit.decimals);
|
|
837
|
+
}
|
|
838
|
+
function laneLimitSymbol(limit, bidTicker) {
|
|
839
|
+
if (limit.side === "bid" && bidTicker) return bidTicker;
|
|
840
|
+
return safeTicker(limit.token, limit.token);
|
|
841
|
+
}
|
|
842
|
+
function laneLimitHint(limit, symbol) {
|
|
843
|
+
return `Max ${laneLimitAmount(limit)}${symbol ? ` ${symbol}` : ""} right now`;
|
|
844
|
+
}
|
|
845
|
+
function laneLimitError(limit, symbol) {
|
|
846
|
+
return `Maximum: ${laneLimitAmount(limit)}${symbol ? ` ${symbol}` : ""} right now`;
|
|
847
|
+
}
|
|
768
848
|
function brokenLaneReason(lane) {
|
|
769
849
|
if (!lane) return "";
|
|
770
850
|
switch (lane.kind) {
|
|
@@ -1273,9 +1353,18 @@ async function solveExactIn({ option, destination, destinationToken, payer, fetc
|
|
|
1273
1353
|
// src/core/order.ts
|
|
1274
1354
|
var DEFAULT_DEADLINE_SECONDS = 1800;
|
|
1275
1355
|
var MAX_DEADLINE_SECONDS = 60 * 60;
|
|
1276
|
-
|
|
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) {
|
|
1277
1366
|
const apiDeadline = Number(order.deadline);
|
|
1278
|
-
const deadline = deadlineOverride ?? (Number.isFinite(apiDeadline) && apiDeadline > 0 ? String(order.deadline) : String(Math.floor(Date.now() / 1e3) +
|
|
1367
|
+
const deadline = deadlineOverride ?? (Number.isFinite(apiDeadline) && apiDeadline > 0 ? String(order.deadline) : String(Math.floor(Date.now() / 1e3) + lifetimeSeconds));
|
|
1279
1368
|
const executionChainId = String(order.executionChainId || fallbackExecutionChainId || "0");
|
|
1280
1369
|
if (!/^\d+$/.test(executionChainId) || BigInt(executionChainId) <= 0n) throw new Error("ZeroDelta quote did not include an execution chain.");
|
|
1281
1370
|
return {
|
|
@@ -1290,10 +1379,10 @@ function normalizeOrderRequest(order, payer, destination, fallbackExecutionChain
|
|
|
1290
1379
|
deadline
|
|
1291
1380
|
};
|
|
1292
1381
|
}
|
|
1293
|
-
function normalizeOrderRequests(requests, payer, destination, fallbackExecutionChainId) {
|
|
1382
|
+
function normalizeOrderRequests(requests, payer, destination, fallbackExecutionChainId, lifetimeSeconds = DEFAULT_DEADLINE_SECONDS) {
|
|
1294
1383
|
if (!requests.length) throw new Error("ZeroDelta quote did not include any order requests.");
|
|
1295
1384
|
return requests.map(
|
|
1296
|
-
(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"))
|
|
1297
1386
|
);
|
|
1298
1387
|
}
|
|
1299
1388
|
function assertQuoteMatchesSelection({ quote, order, orders, option, destinationToken, destination, payer, result }) {
|
|
@@ -1343,7 +1432,8 @@ function assertQuoteMatchesSelection({ quote, order, orders, option, destination
|
|
|
1343
1432
|
if (BigInt(finalOrder.askTokenAmount || "0") < BigInt(result.recipientReceivesRaw || "0")) {
|
|
1344
1433
|
throw new Error("ZeroDelta order guarantees less than the displayed receive amount.");
|
|
1345
1434
|
}
|
|
1346
|
-
|
|
1435
|
+
const maxDeadline = maxDeadlineSeconds(quote);
|
|
1436
|
+
if (!Number.isFinite(deadline) || deadline <= now || deadline > now + maxDeadline) {
|
|
1347
1437
|
throw new Error("ZeroDelta quote deadline is invalid or too far in the future.");
|
|
1348
1438
|
}
|
|
1349
1439
|
for (let index = 1; index < list.length; index += 1) {
|
|
@@ -1356,7 +1446,7 @@ function assertQuoteMatchesSelection({ quote, order, orders, option, destination
|
|
|
1356
1446
|
throw new Error("ZeroDelta chained quote returned disconnected execution chains.");
|
|
1357
1447
|
}
|
|
1358
1448
|
const followupDeadline = Number(current.deadline || 0);
|
|
1359
|
-
if (followupDeadline !== 0 && (!Number.isFinite(followupDeadline) || followupDeadline <= now || followupDeadline > now +
|
|
1449
|
+
if (followupDeadline !== 0 && (!Number.isFinite(followupDeadline) || followupDeadline <= now || followupDeadline > now + maxDeadline)) {
|
|
1360
1450
|
throw new Error("ZeroDelta chained quote returned an invalid follow-up deadline.");
|
|
1361
1451
|
}
|
|
1362
1452
|
}
|
|
@@ -1519,7 +1609,7 @@ async function buildRoute({
|
|
|
1519
1609
|
if (!requestList.length) throw new Error("ZeroDelta quote did not include an order request.");
|
|
1520
1610
|
const sourceChain = chainById(chains, option.chainId);
|
|
1521
1611
|
const escrow = checkEscrow(option.chainId, quote.escrowAddress, sourceChain?.escrowContract);
|
|
1522
|
-
const orders = normalizeOrderRequests(requestList, payer, destination, quote.executionChainId);
|
|
1612
|
+
const orders = normalizeOrderRequests(requestList, payer, destination, quote.executionChainId, recommendedDeadlineSeconds(quote));
|
|
1523
1613
|
const order = orders[0];
|
|
1524
1614
|
assertQuoteMatchesSelection({ quote, order, orders, option, destinationToken, destination, payer, result });
|
|
1525
1615
|
const needsNativeFee = requiresNativeBridgeFee(quote, option);
|
|
@@ -1659,10 +1749,18 @@ function classifyQuoteError(error) {
|
|
|
1659
1749
|
message: `This payment was blocked by compliance screening \u2014 the recipient is ${label}. Choose a different recipient or connect a different wallet.`
|
|
1660
1750
|
};
|
|
1661
1751
|
}
|
|
1752
|
+
function amountFieldError(error) {
|
|
1753
|
+
const fieldErrors = error?.fieldErrors;
|
|
1754
|
+
if (!Array.isArray(fieldErrors)) return null;
|
|
1755
|
+
const entry = fieldErrors.find((e) => e && typeof e === "object" && e.field === "fromAmount" && typeof e.message === "string");
|
|
1756
|
+
const message = entry ? sanitizeMessage(entry.message, "") : "";
|
|
1757
|
+
return message || null;
|
|
1758
|
+
}
|
|
1662
1759
|
function nowFresh(entry) {
|
|
1663
1760
|
return !!entry && Date.now() - entry.at < API_CACHE_TTL_MS;
|
|
1664
1761
|
}
|
|
1665
1762
|
function isTransientQuoteError(error) {
|
|
1763
|
+
if (error?.code === "BRIDGE_RATE_LIMITED" || Array.isArray(error?.fieldErrors) && error.fieldErrors.length > 0) return false;
|
|
1666
1764
|
return error?.code === "gateway_timeout" || error?.status === 502 || error?.status === 503 || error?.status === 504 || /failed to get swap quote|timeout|temporar/i.test(error?.message || "");
|
|
1667
1765
|
}
|
|
1668
1766
|
function wait(ms) {
|
|
@@ -1714,6 +1812,7 @@ function createApiClient(cfg) {
|
|
|
1714
1812
|
status: response.status,
|
|
1715
1813
|
code: json?.error?.code || json?.code || (response.status >= 502 ? "gateway_timeout" : "api_error"),
|
|
1716
1814
|
fieldErrors: json?.error?.fieldErrors || json?.fieldErrors,
|
|
1815
|
+
limits: json?.error?.limits || json?.limits,
|
|
1717
1816
|
reasons: json?.error?.reasons || json?.reasons
|
|
1718
1817
|
});
|
|
1719
1818
|
}
|
|
@@ -2557,6 +2656,8 @@ function createEngine(config = {}) {
|
|
|
2557
2656
|
...allowed ? { allowedAssets: allowed } : {},
|
|
2558
2657
|
supportedChainIds: SUPPORTED_CHAIN_IDS,
|
|
2559
2658
|
brokenLanes: suppressedLanes(health),
|
|
2659
|
+
// Same read, same degraded mode: a null health response limits nothing.
|
|
2660
|
+
limitedLanes: limitedLanes(health),
|
|
2560
2661
|
vaultIcons
|
|
2561
2662
|
});
|
|
2562
2663
|
},
|
|
@@ -2622,6 +2723,7 @@ exports.TUNABLE_CATEGORIES = TUNABLE_CATEGORIES;
|
|
|
2622
2723
|
exports.ZERO_ADDRESS = ZERO_ADDRESS;
|
|
2623
2724
|
exports.addressWord = addressWord;
|
|
2624
2725
|
exports.allowanceCovers = allowanceCovers;
|
|
2726
|
+
exports.amountFieldError = amountFieldError;
|
|
2625
2727
|
exports.apiError = apiError;
|
|
2626
2728
|
exports.applyLayerZeroBuffer = applyLayerZeroBuffer;
|
|
2627
2729
|
exports.assertAddress = assertAddress;
|
|
@@ -2666,6 +2768,7 @@ exports.encodeApprove = encodeApprove;
|
|
|
2666
2768
|
exports.encodeBalanceOf = encodeBalanceOf;
|
|
2667
2769
|
exports.encodeSubmitOrder = encodeSubmitOrder;
|
|
2668
2770
|
exports.encodeTransfer = encodeTransfer;
|
|
2771
|
+
exports.exceedsLaneLimit = exceedsLaneLimit;
|
|
2669
2772
|
exports.executableRoutes = executableRoutes;
|
|
2670
2773
|
exports.executionChainIds = executionChainIds;
|
|
2671
2774
|
exports.fetchPaymentPlan = fetchPaymentPlan;
|
|
@@ -2686,8 +2789,16 @@ exports.isHexQuantity = isHexQuantity;
|
|
|
2686
2789
|
exports.isKnownUnbridgeable = isKnownUnbridgeable;
|
|
2687
2790
|
exports.isLayerZeroRoute = isLayerZeroRoute;
|
|
2688
2791
|
exports.isSourceToken = isSourceToken;
|
|
2792
|
+
exports.laneAvailabilityState = laneAvailabilityState;
|
|
2689
2793
|
exports.laneKey = laneKey;
|
|
2690
2794
|
exports.laneKeys = laneKeys;
|
|
2795
|
+
exports.laneLimitAmount = laneLimitAmount;
|
|
2796
|
+
exports.laneLimitError = laneLimitError;
|
|
2797
|
+
exports.laneLimitFor = laneLimitFor;
|
|
2798
|
+
exports.laneLimitHint = laneLimitHint;
|
|
2799
|
+
exports.laneLimitSymbol = laneLimitSymbol;
|
|
2800
|
+
exports.limitedLanes = limitedLanes;
|
|
2801
|
+
exports.maxDeadlineSeconds = maxDeadlineSeconds;
|
|
2691
2802
|
exports.maxNativeFeeWei = maxNativeFeeWei;
|
|
2692
2803
|
exports.nativeFeeShortLabel = nativeFeeShortLabel;
|
|
2693
2804
|
exports.nativeFeeShortMessage = nativeFeeShortMessage;
|
|
@@ -2702,6 +2813,7 @@ exports.planErrorSummary = planErrorSummary;
|
|
|
2702
2813
|
exports.planMsgValueHex = planMsgValueHex;
|
|
2703
2814
|
exports.productAssets = productAssets;
|
|
2704
2815
|
exports.quoteSwapPreview = quoteSwapPreview;
|
|
2816
|
+
exports.recommendedDeadlineSeconds = recommendedDeadlineSeconds;
|
|
2705
2817
|
exports.registryRpc = registryRpc;
|
|
2706
2818
|
exports.requiresNativeBridgeFee = requiresNativeBridgeFee;
|
|
2707
2819
|
exports.resolveApiBase = resolveApiBase;
|
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,
|
|
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-C1VaWfiy.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-C1VaWfiy.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 —
|
|
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. */
|
|
@@ -548,4 +572,4 @@ interface Engine {
|
|
|
548
572
|
/** Create an engine bound to a config. The 60s resource cache is per-engine. */
|
|
549
573
|
declare function createEngine(config?: EngineConfig): Engine;
|
|
550
574
|
|
|
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 };
|
|
575
|
+
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 };
|
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,
|
|
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-C1VaWfiy.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-C1VaWfiy.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 —
|
|
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. */
|
|
@@ -548,4 +572,4 @@ interface Engine {
|
|
|
548
572
|
/** Create an engine bound to a config. The 60s resource cache is per-engine. */
|
|
549
573
|
declare function createEngine(config?: EngineConfig): Engine;
|
|
550
574
|
|
|
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 };
|
|
575
|
+
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 };
|
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, 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, executableRoutes, executionChainIds, fetchPaymentPlan, finalOf, findToken, foldTicker, formatNative, formatUnits, hasReachableDestination, hubDeliverableSymbols, humanizeComplianceReason, isAddress, isDeliverable, isExecutableBridge, isHexAddress, isHexData, isHexQuantity, isKnownUnbridgeable, isLayerZeroRoute, isSourceToken, laneKey, laneKeys, 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-
|
|
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-53K3BXT5.js';
|