@glacislabs/stablegenie-zerodelta 4.6.0 → 4.7.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-GBV2QVCH.js → chunk-L7ZEFAZ4.js} +1 -1
- package/dist/{chunk-CEBEMZHZ.js → chunk-MZCS5TL2.js} +10 -4
- package/dist/core/index.cjs +10 -3
- package/dist/core/index.d.cts +22 -6
- package/dist/core/index.d.ts +22 -6
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +9 -3
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/{mount-DjeyxZcy.d.cts → mount-D4mbJwdc.d.cts} +1 -1
- package/dist/{mount-qV6l3ZuG.d.ts → mount-D5TIOkMe.d.ts} +1 -1
- package/dist/mount.cjs +9 -3
- 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 +4 -4
- package/dist/{verify-DSCljQtK.d.cts → verify-BEQ8DMvJ.d.cts} +8 -0
- package/dist/{verify-DSCljQtK.d.ts → verify-BEQ8DMvJ.d.ts} +8 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CHAIN_DISPLAY_NAMES, EXECUTABLE_STABLE_ASSETS, STABLE_ASSETS, SUPPORTED_ASSETS, complianceView, complianceTagOf, symbolKey, normalizeDecimalText, findToken, laneLimitFor, laneLimitSymbol, tokenTicker, exceedsLaneLimit, assetDecimals, parseUnitsDecimal, counterpartTokens, assetClassOf, brokenLaneFor, brokenLaneReason, destinationAvailability, laneLimitHint, tickerOn, laneLimitError, routeNativeValue, formatNative, nativeSymbol, amountFieldError, SUPPORTED_CHAIN_IDS, formatUnits, complianceChecks, DIRECT_CHECK_IDS, createEngine, checkNativeFee, nativeFeeShortLabel, nativeFeeShortMessage, allowanceCovers, validatePlannedTransaction, foldTicker, unattributedComplianceReasons, distinctScreenedWallets, humanizeComplianceReason, DIRECT_SCOPE_NOTE, categoryLabel, SCREENING_BUCKETS, BUNDLED_RPC } from './chunk-
|
|
1
|
+
import { CHAIN_DISPLAY_NAMES, EXECUTABLE_STABLE_ASSETS, STABLE_ASSETS, SUPPORTED_ASSETS, complianceView, complianceTagOf, symbolKey, normalizeDecimalText, findToken, laneLimitFor, laneLimitSymbol, tokenTicker, exceedsLaneLimit, assetDecimals, parseUnitsDecimal, counterpartTokens, assetClassOf, brokenLaneFor, brokenLaneReason, destinationAvailability, laneLimitHint, tickerOn, laneLimitError, routeNativeValue, formatNative, nativeSymbol, amountFieldError, SUPPORTED_CHAIN_IDS, formatUnits, complianceChecks, DIRECT_CHECK_IDS, createEngine, checkNativeFee, nativeFeeShortLabel, nativeFeeShortMessage, allowanceCovers, validatePlannedTransaction, foldTicker, unattributedComplianceReasons, distinctScreenedWallets, humanizeComplianceReason, DIRECT_SCOPE_NOTE, categoryLabel, SCREENING_BUCKETS, BUNDLED_RPC } from './chunk-MZCS5TL2.js';
|
|
2
2
|
import { createContext, useState, useRef, useMemo, useEffect, useCallback, useId, createElement, useContext } from 'react';
|
|
3
3
|
import { createRoot } from 'react-dom/client';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -1458,6 +1458,10 @@ function routeDeltaLabel(result, quote) {
|
|
|
1458
1458
|
if (quote.feeBps) return `${quote.feeBps} bps fee`;
|
|
1459
1459
|
return "~0";
|
|
1460
1460
|
}
|
|
1461
|
+
function quotePartnerId(quote) {
|
|
1462
|
+
const raw = quote.partnerId;
|
|
1463
|
+
return typeof raw === "string" && /^0x[0-9a-fA-F]{64}$/.test(raw) ? raw.toLowerCase() : NO_PARTNER_ID;
|
|
1464
|
+
}
|
|
1461
1465
|
function optionTicker(option) {
|
|
1462
1466
|
return option.ticker || option.symbol;
|
|
1463
1467
|
}
|
|
@@ -1623,6 +1627,7 @@ async function buildRoute({
|
|
|
1623
1627
|
}
|
|
1624
1628
|
}
|
|
1625
1629
|
const valueRaw = applyLayerZeroBuffer(quote, option);
|
|
1630
|
+
const partnerId = quotePartnerId(quote);
|
|
1626
1631
|
if (!needsNativeFee) {
|
|
1627
1632
|
if (valueRaw !== 0n) throw new Error("Non-LayerZero route requested a non-zero native value; refusing to sign.");
|
|
1628
1633
|
} else if (valueRaw === 0n && Number(quote.executionChainId) > 0) {
|
|
@@ -1673,7 +1678,7 @@ async function buildRoute({
|
|
|
1673
1678
|
label: "Submit ZeroDelta order",
|
|
1674
1679
|
chainId: option.chainId,
|
|
1675
1680
|
to: escrow,
|
|
1676
|
-
data: encodeSubmitOrder(orders),
|
|
1681
|
+
data: encodeSubmitOrder(orders, partnerId),
|
|
1677
1682
|
value: toHexQuantity(valueRaw),
|
|
1678
1683
|
escrow,
|
|
1679
1684
|
amountRaw: order.bidTokenAmount
|
|
@@ -1686,6 +1691,7 @@ async function buildRoute({
|
|
|
1686
1691
|
gasCostSource: quote.gasCostSource,
|
|
1687
1692
|
msgValue: valueRaw.toString(),
|
|
1688
1693
|
deadline: order.deadline,
|
|
1694
|
+
partnerId: partnerId === NO_PARTNER_ID ? void 0 : partnerId,
|
|
1689
1695
|
iterations: result.iterations,
|
|
1690
1696
|
// Carried verbatim from the gateway's decision on THIS wallet pair. The projection used to
|
|
1691
1697
|
// drop it, which is why the widget could show a price with no evidence of the control that
|
|
@@ -1700,7 +1706,7 @@ var CHANNEL_HEADER = "x-zd-channel";
|
|
|
1700
1706
|
var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
|
|
1701
1707
|
var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
|
|
1702
1708
|
var WIDGET_CHANNEL = "widget";
|
|
1703
|
-
var WIDGET_VERSION = "4.
|
|
1709
|
+
var WIDGET_VERSION = "4.7.0" ;
|
|
1704
1710
|
var MAX_CHANNEL_VERSION_LEN = 32;
|
|
1705
1711
|
function sanitizeVersion(raw) {
|
|
1706
1712
|
const v = String(raw).trim();
|
|
@@ -2356,7 +2362,7 @@ function validatePlannedTransaction(tx, route, expectedRecipient) {
|
|
|
2356
2362
|
if (!decoded) return false;
|
|
2357
2363
|
const first = decoded.orders[0];
|
|
2358
2364
|
const last = decoded.orders[decoded.orders.length - 1];
|
|
2359
|
-
return decoded.partnerId === NO_PARTNER_ID && lower(first.bidToken) === lower(route.source.tokenAddress) && rawEquals(first.bidTokenAmount, tx.amountRaw) && lower(last.askToken) === lower(route.receive.tokenAddress) && Number(last.destinationChainId) === Number(route.receive.chainId) && lower(last.destinationReceiver) === lower(expectedRecipient);
|
|
2365
|
+
return decoded.partnerId === lower(route.quote?.partnerId || NO_PARTNER_ID) && lower(first.bidToken) === lower(route.source.tokenAddress) && rawEquals(first.bidTokenAmount, tx.amountRaw) && lower(last.askToken) === lower(route.receive.tokenAddress) && Number(last.destinationChainId) === Number(route.receive.chainId) && lower(last.destinationReceiver) === lower(expectedRecipient);
|
|
2360
2366
|
}
|
|
2361
2367
|
return false;
|
|
2362
2368
|
}
|
|
@@ -2783,4 +2789,4 @@ function createEngine(config = {}) {
|
|
|
2783
2789
|
};
|
|
2784
2790
|
}
|
|
2785
2791
|
|
|
2786
|
-
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 };
|
|
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 };
|
package/dist/core/index.cjs
CHANGED
|
@@ -1460,6 +1460,10 @@ function routeDeltaLabel(result, quote) {
|
|
|
1460
1460
|
if (quote.feeBps) return `${quote.feeBps} bps fee`;
|
|
1461
1461
|
return "~0";
|
|
1462
1462
|
}
|
|
1463
|
+
function quotePartnerId(quote) {
|
|
1464
|
+
const raw = quote.partnerId;
|
|
1465
|
+
return typeof raw === "string" && /^0x[0-9a-fA-F]{64}$/.test(raw) ? raw.toLowerCase() : NO_PARTNER_ID;
|
|
1466
|
+
}
|
|
1463
1467
|
function optionTicker(option) {
|
|
1464
1468
|
return option.ticker || option.symbol;
|
|
1465
1469
|
}
|
|
@@ -1625,6 +1629,7 @@ async function buildRoute({
|
|
|
1625
1629
|
}
|
|
1626
1630
|
}
|
|
1627
1631
|
const valueRaw = applyLayerZeroBuffer(quote, option);
|
|
1632
|
+
const partnerId = quotePartnerId(quote);
|
|
1628
1633
|
if (!needsNativeFee) {
|
|
1629
1634
|
if (valueRaw !== 0n) throw new Error("Non-LayerZero route requested a non-zero native value; refusing to sign.");
|
|
1630
1635
|
} else if (valueRaw === 0n && Number(quote.executionChainId) > 0) {
|
|
@@ -1675,7 +1680,7 @@ async function buildRoute({
|
|
|
1675
1680
|
label: "Submit ZeroDelta order",
|
|
1676
1681
|
chainId: option.chainId,
|
|
1677
1682
|
to: escrow,
|
|
1678
|
-
data: encodeSubmitOrder(orders),
|
|
1683
|
+
data: encodeSubmitOrder(orders, partnerId),
|
|
1679
1684
|
value: toHexQuantity(valueRaw),
|
|
1680
1685
|
escrow,
|
|
1681
1686
|
amountRaw: order.bidTokenAmount
|
|
@@ -1688,6 +1693,7 @@ async function buildRoute({
|
|
|
1688
1693
|
gasCostSource: quote.gasCostSource,
|
|
1689
1694
|
msgValue: valueRaw.toString(),
|
|
1690
1695
|
deadline: order.deadline,
|
|
1696
|
+
partnerId: partnerId === NO_PARTNER_ID ? void 0 : partnerId,
|
|
1691
1697
|
iterations: result.iterations,
|
|
1692
1698
|
// Carried verbatim from the gateway's decision on THIS wallet pair. The projection used to
|
|
1693
1699
|
// drop it, which is why the widget could show a price with no evidence of the control that
|
|
@@ -1702,7 +1708,7 @@ var CHANNEL_HEADER = "x-zd-channel";
|
|
|
1702
1708
|
var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
|
|
1703
1709
|
var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
|
|
1704
1710
|
var WIDGET_CHANNEL = "widget";
|
|
1705
|
-
var WIDGET_VERSION = "4.
|
|
1711
|
+
var WIDGET_VERSION = "4.7.0" ;
|
|
1706
1712
|
var MAX_CHANNEL_VERSION_LEN = 32;
|
|
1707
1713
|
function sanitizeVersion(raw) {
|
|
1708
1714
|
const v = String(raw).trim();
|
|
@@ -2358,7 +2364,7 @@ function validatePlannedTransaction(tx, route, expectedRecipient) {
|
|
|
2358
2364
|
if (!decoded) return false;
|
|
2359
2365
|
const first = decoded.orders[0];
|
|
2360
2366
|
const last = decoded.orders[decoded.orders.length - 1];
|
|
2361
|
-
return decoded.partnerId === NO_PARTNER_ID && lower(first.bidToken) === lower(route.source.tokenAddress) && rawEquals(first.bidTokenAmount, tx.amountRaw) && lower(last.askToken) === lower(route.receive.tokenAddress) && Number(last.destinationChainId) === Number(route.receive.chainId) && lower(last.destinationReceiver) === lower(expectedRecipient);
|
|
2367
|
+
return decoded.partnerId === lower(route.quote?.partnerId || NO_PARTNER_ID) && lower(first.bidToken) === lower(route.source.tokenAddress) && rawEquals(first.bidTokenAmount, tx.amountRaw) && lower(last.askToken) === lower(route.receive.tokenAddress) && Number(last.destinationChainId) === Number(route.receive.chainId) && lower(last.destinationReceiver) === lower(expectedRecipient);
|
|
2362
2368
|
}
|
|
2363
2369
|
return false;
|
|
2364
2370
|
}
|
|
@@ -2918,6 +2924,7 @@ exports.parseUnitsDecimal = parseUnitsDecimal;
|
|
|
2918
2924
|
exports.planErrorSummary = planErrorSummary;
|
|
2919
2925
|
exports.planMsgValueHex = planMsgValueHex;
|
|
2920
2926
|
exports.productAssets = productAssets;
|
|
2927
|
+
exports.quotePartnerId = quotePartnerId;
|
|
2921
2928
|
exports.quoteSwapPreview = quoteSwapPreview;
|
|
2922
2929
|
exports.recommendedDeadlineSeconds = recommendedDeadlineSeconds;
|
|
2923
2930
|
exports.registryRpc = registryRpc;
|
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-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';
|
|
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. */
|
|
@@ -24,10 +24,11 @@ declare const MAX_QUOTE_CANDIDATES = 8;
|
|
|
24
24
|
declare const QUOTE_BUFFER_BPS = 50;
|
|
25
25
|
declare const LZ_FEE_BUFFER_BPS = 1500n;
|
|
26
26
|
declare const SUBMIT_ORDER_SELECTOR = "0xaf439ecd";
|
|
27
|
-
/** `partnerId` for
|
|
27
|
+
/** `partnerId` for an order whose quote carried none. The escrow's only use of the argument is
|
|
28
28
|
* `if (partnerId != bytes32(0)) emit PartnerOrder(partnerId)`; there is no on-chain logic behind
|
|
29
|
-
* it
|
|
30
|
-
*
|
|
29
|
+
* it, so zero is the value that MEANS "no attribution", not a placeholder. A quote priced at a
|
|
30
|
+
* key's special rate does carry one — see `quotePartnerId` in route.ts — and the pre-sign
|
|
31
|
+
* validator binds the encoded word to whichever of the two the plan declared. */
|
|
31
32
|
declare const NO_PARTNER_ID: string;
|
|
32
33
|
declare const ERC20_APPROVE_SELECTOR = "0x095ea7b3";
|
|
33
34
|
declare const ERC20_TRANSFER_SELECTOR = "0xa9059cbb";
|
|
@@ -323,6 +324,21 @@ interface AssertQuoteArgs {
|
|
|
323
324
|
}
|
|
324
325
|
declare function assertQuoteMatchesSelection({ quote, order, orders, option, destinationToken, destination, payer, result }: AssertQuoteArgs): void;
|
|
325
326
|
|
|
327
|
+
/**
|
|
328
|
+
* The `partnerId` word for this quote's `submitOrder`.
|
|
329
|
+
*
|
|
330
|
+
* A key with special rates gets its quote priced at them, and the gateway hands back a marker that
|
|
331
|
+
* binds that price to this exact order (wallets, tokens, chains, amounts). The solver only honours
|
|
332
|
+
* the price for an order that EMITS the marker, so dropping it — which this engine did until
|
|
333
|
+
* 2026-10-05, encoding zero unconditionally — submits an order asking for the special rate with
|
|
334
|
+
* nothing behind it, and it sits unfilled.
|
|
335
|
+
*
|
|
336
|
+
* Only a 32-byte hex string is a marker. Anything else is the zero word: absent (an ordinary key),
|
|
337
|
+
* or the `{ error }` object the gateway returns for a quote priced without both wallets. The API
|
|
338
|
+
* is untrusted, but this word buys it nothing: the escrow's whole use of it is one event, and a
|
|
339
|
+
* marker that does not match the order it rides on is simply not honoured.
|
|
340
|
+
*/
|
|
341
|
+
declare function quotePartnerId(quote: Pick<Quote, "partnerId">): string;
|
|
326
342
|
interface BuildRouteArgs {
|
|
327
343
|
option: PayOption;
|
|
328
344
|
destination: {
|
|
@@ -588,4 +604,4 @@ interface Engine {
|
|
|
588
604
|
/** Create an engine bound to a config. The 60s resource cache is per-engine. */
|
|
589
605
|
declare function createEngine(config?: EngineConfig): Engine;
|
|
590
606
|
|
|
591
|
-
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 };
|
|
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 };
|
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-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';
|
|
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. */
|
|
@@ -24,10 +24,11 @@ declare const MAX_QUOTE_CANDIDATES = 8;
|
|
|
24
24
|
declare const QUOTE_BUFFER_BPS = 50;
|
|
25
25
|
declare const LZ_FEE_BUFFER_BPS = 1500n;
|
|
26
26
|
declare const SUBMIT_ORDER_SELECTOR = "0xaf439ecd";
|
|
27
|
-
/** `partnerId` for
|
|
27
|
+
/** `partnerId` for an order whose quote carried none. The escrow's only use of the argument is
|
|
28
28
|
* `if (partnerId != bytes32(0)) emit PartnerOrder(partnerId)`; there is no on-chain logic behind
|
|
29
|
-
* it
|
|
30
|
-
*
|
|
29
|
+
* it, so zero is the value that MEANS "no attribution", not a placeholder. A quote priced at a
|
|
30
|
+
* key's special rate does carry one — see `quotePartnerId` in route.ts — and the pre-sign
|
|
31
|
+
* validator binds the encoded word to whichever of the two the plan declared. */
|
|
31
32
|
declare const NO_PARTNER_ID: string;
|
|
32
33
|
declare const ERC20_APPROVE_SELECTOR = "0x095ea7b3";
|
|
33
34
|
declare const ERC20_TRANSFER_SELECTOR = "0xa9059cbb";
|
|
@@ -323,6 +324,21 @@ interface AssertQuoteArgs {
|
|
|
323
324
|
}
|
|
324
325
|
declare function assertQuoteMatchesSelection({ quote, order, orders, option, destinationToken, destination, payer, result }: AssertQuoteArgs): void;
|
|
325
326
|
|
|
327
|
+
/**
|
|
328
|
+
* The `partnerId` word for this quote's `submitOrder`.
|
|
329
|
+
*
|
|
330
|
+
* A key with special rates gets its quote priced at them, and the gateway hands back a marker that
|
|
331
|
+
* binds that price to this exact order (wallets, tokens, chains, amounts). The solver only honours
|
|
332
|
+
* the price for an order that EMITS the marker, so dropping it — which this engine did until
|
|
333
|
+
* 2026-10-05, encoding zero unconditionally — submits an order asking for the special rate with
|
|
334
|
+
* nothing behind it, and it sits unfilled.
|
|
335
|
+
*
|
|
336
|
+
* Only a 32-byte hex string is a marker. Anything else is the zero word: absent (an ordinary key),
|
|
337
|
+
* or the `{ error }` object the gateway returns for a quote priced without both wallets. The API
|
|
338
|
+
* is untrusted, but this word buys it nothing: the escrow's whole use of it is one event, and a
|
|
339
|
+
* marker that does not match the order it rides on is simply not honoured.
|
|
340
|
+
*/
|
|
341
|
+
declare function quotePartnerId(quote: Pick<Quote, "partnerId">): string;
|
|
326
342
|
interface BuildRouteArgs {
|
|
327
343
|
option: PayOption;
|
|
328
344
|
destination: {
|
|
@@ -588,4 +604,4 @@ interface Engine {
|
|
|
588
604
|
/** Create an engine bound to a config. The 60s resource cache is per-engine. */
|
|
589
605
|
declare function createEngine(config?: EngineConfig): Engine;
|
|
590
606
|
|
|
591
|
-
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 };
|
|
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 };
|
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, 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-MZCS5TL2.js';
|
package/dist/index.cjs
CHANGED
|
@@ -1470,6 +1470,10 @@ function routeDeltaLabel(result, quote) {
|
|
|
1470
1470
|
if (quote.feeBps) return `${quote.feeBps} bps fee`;
|
|
1471
1471
|
return "~0";
|
|
1472
1472
|
}
|
|
1473
|
+
function quotePartnerId(quote) {
|
|
1474
|
+
const raw = quote.partnerId;
|
|
1475
|
+
return typeof raw === "string" && /^0x[0-9a-fA-F]{64}$/.test(raw) ? raw.toLowerCase() : NO_PARTNER_ID;
|
|
1476
|
+
}
|
|
1473
1477
|
function optionTicker(option) {
|
|
1474
1478
|
return option.ticker || option.symbol;
|
|
1475
1479
|
}
|
|
@@ -1635,6 +1639,7 @@ async function buildRoute({
|
|
|
1635
1639
|
}
|
|
1636
1640
|
}
|
|
1637
1641
|
const valueRaw = applyLayerZeroBuffer(quote, option);
|
|
1642
|
+
const partnerId = quotePartnerId(quote);
|
|
1638
1643
|
if (!needsNativeFee) {
|
|
1639
1644
|
if (valueRaw !== 0n) throw new Error("Non-LayerZero route requested a non-zero native value; refusing to sign.");
|
|
1640
1645
|
} else if (valueRaw === 0n && Number(quote.executionChainId) > 0) {
|
|
@@ -1685,7 +1690,7 @@ async function buildRoute({
|
|
|
1685
1690
|
label: "Submit ZeroDelta order",
|
|
1686
1691
|
chainId: option.chainId,
|
|
1687
1692
|
to: escrow,
|
|
1688
|
-
data: encodeSubmitOrder(orders),
|
|
1693
|
+
data: encodeSubmitOrder(orders, partnerId),
|
|
1689
1694
|
value: toHexQuantity(valueRaw),
|
|
1690
1695
|
escrow,
|
|
1691
1696
|
amountRaw: order.bidTokenAmount
|
|
@@ -1698,6 +1703,7 @@ async function buildRoute({
|
|
|
1698
1703
|
gasCostSource: quote.gasCostSource,
|
|
1699
1704
|
msgValue: valueRaw.toString(),
|
|
1700
1705
|
deadline: order.deadline,
|
|
1706
|
+
partnerId: partnerId === NO_PARTNER_ID ? void 0 : partnerId,
|
|
1701
1707
|
iterations: result.iterations,
|
|
1702
1708
|
// Carried verbatim from the gateway's decision on THIS wallet pair. The projection used to
|
|
1703
1709
|
// drop it, which is why the widget could show a price with no evidence of the control that
|
|
@@ -1712,7 +1718,7 @@ var CHANNEL_HEADER = "x-zd-channel";
|
|
|
1712
1718
|
var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
|
|
1713
1719
|
var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
|
|
1714
1720
|
var WIDGET_CHANNEL = "widget";
|
|
1715
|
-
var WIDGET_VERSION = "4.
|
|
1721
|
+
var WIDGET_VERSION = "4.7.0" ;
|
|
1716
1722
|
var MAX_CHANNEL_VERSION_LEN = 32;
|
|
1717
1723
|
function sanitizeVersion(raw) {
|
|
1718
1724
|
const v = String(raw).trim();
|
|
@@ -2368,7 +2374,7 @@ function validatePlannedTransaction(tx, route, expectedRecipient) {
|
|
|
2368
2374
|
if (!decoded) return false;
|
|
2369
2375
|
const first = decoded.orders[0];
|
|
2370
2376
|
const last = decoded.orders[decoded.orders.length - 1];
|
|
2371
|
-
return decoded.partnerId === NO_PARTNER_ID && lower(first.bidToken) === lower(route.source.tokenAddress) && rawEquals(first.bidTokenAmount, tx.amountRaw) && lower(last.askToken) === lower(route.receive.tokenAddress) && Number(last.destinationChainId) === Number(route.receive.chainId) && lower(last.destinationReceiver) === lower(expectedRecipient);
|
|
2377
|
+
return decoded.partnerId === lower(route.quote?.partnerId || NO_PARTNER_ID) && lower(first.bidToken) === lower(route.source.tokenAddress) && rawEquals(first.bidTokenAmount, tx.amountRaw) && lower(last.askToken) === lower(route.receive.tokenAddress) && Number(last.destinationChainId) === Number(route.receive.chainId) && lower(last.destinationReceiver) === lower(expectedRecipient);
|
|
2372
2378
|
}
|
|
2373
2379
|
return false;
|
|
2374
2380
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { B as BankPayoutAccount, E as Eip1193Provider, a as ExchangeMode, L as LinkIdentity, M as MountConfig, P as PaymentIsland, b as PaymentIslandKind, c as PaymentIslandProps, d as PillOpenAs, S as SettlementMethod, e as StableGenieConfig, f as StableGenieExchange, g as StableGenieExchangeProps, h as StableGeniePay, i as StableGeniePayProps, j as StableGenieProvider, k as StableGenieRwaExchange, l as StableGenieSwap, m as StableGenieSwapProps, n as StableGenieTheme, o as SuccessInfo, p as SupportedAsset, q as darkTheme, r as lightTheme, s as mount, t as resolveTheme } from './mount-
|
|
1
|
+
export { B as BankPayoutAccount, E as Eip1193Provider, a as ExchangeMode, L as LinkIdentity, M as MountConfig, P as PaymentIsland, b as PaymentIslandKind, c as PaymentIslandProps, d as PillOpenAs, S as SettlementMethod, e as StableGenieConfig, f as StableGenieExchange, g as StableGenieExchangeProps, h as StableGeniePay, i as StableGeniePayProps, j as StableGenieProvider, k as StableGenieRwaExchange, l as StableGenieSwap, m as StableGenieSwapProps, n as StableGenieTheme, o as SuccessInfo, p as SupportedAsset, q as darkTheme, r as lightTheme, s as mount, t as resolveTheme } from './mount-D4mbJwdc.cjs';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import { C as Compliance } from './verify-
|
|
4
|
-
export { A as Availability, B as BrokenLane, a as Catalogue, b as Chain, c as ComplianceCheck, d as ComplianceTone, e as ComplianceView, E as EngineConfig, f as ExchangeProduct, L as LaneLimit, P as Plan, R as Route, g as RouteLeg, h as RouteResult, S as SanitizedTxEntry, T as Token, i as TxHistoryEntry, V as VerifyResult, W as WalletScreen, j as assetClassOf, k as brokenLaneReason, l as complianceChecks, m as complianceControlsLine, n as complianceView, o as counterpartTokens, p as destinationAvailability, q as humanizeComplianceReason } from './verify-
|
|
3
|
+
import { C as Compliance } from './verify-BEQ8DMvJ.cjs';
|
|
4
|
+
export { A as Availability, B as BrokenLane, a as Catalogue, b as Chain, c as ComplianceCheck, d as ComplianceTone, e as ComplianceView, E as EngineConfig, f as ExchangeProduct, L as LaneLimit, P as Plan, R as Route, g as RouteLeg, h as RouteResult, S as SanitizedTxEntry, T as Token, i as TxHistoryEntry, V as VerifyResult, W as WalletScreen, j as assetClassOf, k as brokenLaneReason, l as complianceChecks, m as complianceControlsLine, n as complianceView, o as counterpartTokens, p as destinationAvailability, q as humanizeComplianceReason } from './verify-BEQ8DMvJ.cjs';
|
|
5
5
|
export { EXECUTABLE_STABLE_ASSETS, Engine, STABLE_ASSETS, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, createEngine, symbolKey } from './core/index.cjs';
|
|
6
6
|
|
|
7
7
|
declare function CompliancePanel(props: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { B as BankPayoutAccount, E as Eip1193Provider, a as ExchangeMode, L as LinkIdentity, M as MountConfig, P as PaymentIsland, b as PaymentIslandKind, c as PaymentIslandProps, d as PillOpenAs, S as SettlementMethod, e as StableGenieConfig, f as StableGenieExchange, g as StableGenieExchangeProps, h as StableGeniePay, i as StableGeniePayProps, j as StableGenieProvider, k as StableGenieRwaExchange, l as StableGenieSwap, m as StableGenieSwapProps, n as StableGenieTheme, o as SuccessInfo, p as SupportedAsset, q as darkTheme, r as lightTheme, s as mount, t as resolveTheme } from './mount-
|
|
1
|
+
export { B as BankPayoutAccount, E as Eip1193Provider, a as ExchangeMode, L as LinkIdentity, M as MountConfig, P as PaymentIsland, b as PaymentIslandKind, c as PaymentIslandProps, d as PillOpenAs, S as SettlementMethod, e as StableGenieConfig, f as StableGenieExchange, g as StableGenieExchangeProps, h as StableGeniePay, i as StableGeniePayProps, j as StableGenieProvider, k as StableGenieRwaExchange, l as StableGenieSwap, m as StableGenieSwapProps, n as StableGenieTheme, o as SuccessInfo, p as SupportedAsset, q as darkTheme, r as lightTheme, s as mount, t as resolveTheme } from './mount-D5TIOkMe.js';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import { C as Compliance } from './verify-
|
|
4
|
-
export { A as Availability, B as BrokenLane, a as Catalogue, b as Chain, c as ComplianceCheck, d as ComplianceTone, e as ComplianceView, E as EngineConfig, f as ExchangeProduct, L as LaneLimit, P as Plan, R as Route, g as RouteLeg, h as RouteResult, S as SanitizedTxEntry, T as Token, i as TxHistoryEntry, V as VerifyResult, W as WalletScreen, j as assetClassOf, k as brokenLaneReason, l as complianceChecks, m as complianceControlsLine, n as complianceView, o as counterpartTokens, p as destinationAvailability, q as humanizeComplianceReason } from './verify-
|
|
3
|
+
import { C as Compliance } from './verify-BEQ8DMvJ.js';
|
|
4
|
+
export { A as Availability, B as BrokenLane, a as Catalogue, b as Chain, c as ComplianceCheck, d as ComplianceTone, e as ComplianceView, E as EngineConfig, f as ExchangeProduct, L as LaneLimit, P as Plan, R as Route, g as RouteLeg, h as RouteResult, S as SanitizedTxEntry, T as Token, i as TxHistoryEntry, V as VerifyResult, W as WalletScreen, j as assetClassOf, k as brokenLaneReason, l as complianceChecks, m as complianceControlsLine, n as complianceView, o as counterpartTokens, p as destinationAvailability, q as humanizeComplianceReason } from './verify-BEQ8DMvJ.js';
|
|
5
5
|
export { EXECUTABLE_STABLE_ASSETS, Engine, STABLE_ASSETS, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, createEngine, symbolKey } from './core/index.js';
|
|
6
6
|
|
|
7
7
|
declare function CompliancePanel(props: {
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { CompliancePanel, PaymentIsland, StableGenieExchange, StableGeniePay, StableGenieProvider, StableGenieRwaExchange, StableGenieSwap, darkTheme, lightTheme, mount, resolveTheme } from './chunk-
|
|
2
|
-
export { EXECUTABLE_STABLE_ASSETS, STABLE_ASSETS, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, assetClassOf, brokenLaneReason, complianceChecks, complianceControlsLine, complianceView, counterpartTokens, createEngine, destinationAvailability, humanizeComplianceReason, symbolKey } from './chunk-
|
|
1
|
+
export { CompliancePanel, PaymentIsland, StableGenieExchange, StableGeniePay, StableGenieProvider, StableGenieRwaExchange, StableGenieSwap, darkTheme, lightTheme, mount, resolveTheme } from './chunk-L7ZEFAZ4.js';
|
|
2
|
+
export { EXECUTABLE_STABLE_ASSETS, STABLE_ASSETS, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, assetClassOf, brokenLaneReason, complianceChecks, complianceControlsLine, complianceView, counterpartTokens, createEngine, destinationAvailability, humanizeComplianceReason, symbolKey } from './chunk-MZCS5TL2.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { P as Plan, V as VerifyResult, h as RouteResult, S as SanitizedTxEntry, f as ExchangeProduct } from './verify-
|
|
3
|
+
import { P as Plan, V as VerifyResult, h as RouteResult, S as SanitizedTxEntry, f as ExchangeProduct } from './verify-BEQ8DMvJ.cjs';
|
|
4
4
|
|
|
5
5
|
interface Eip1193Provider {
|
|
6
6
|
request(args: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { P as Plan, V as VerifyResult, h as RouteResult, S as SanitizedTxEntry, f as ExchangeProduct } from './verify-
|
|
3
|
+
import { P as Plan, V as VerifyResult, h as RouteResult, S as SanitizedTxEntry, f as ExchangeProduct } from './verify-BEQ8DMvJ.js';
|
|
4
4
|
|
|
5
5
|
interface Eip1193Provider {
|
|
6
6
|
request(args: {
|
package/dist/mount.cjs
CHANGED
|
@@ -1451,6 +1451,10 @@ function routeDeltaLabel(result, quote) {
|
|
|
1451
1451
|
if (quote.feeBps) return `${quote.feeBps} bps fee`;
|
|
1452
1452
|
return "~0";
|
|
1453
1453
|
}
|
|
1454
|
+
function quotePartnerId(quote) {
|
|
1455
|
+
const raw = quote.partnerId;
|
|
1456
|
+
return typeof raw === "string" && /^0x[0-9a-fA-F]{64}$/.test(raw) ? raw.toLowerCase() : NO_PARTNER_ID;
|
|
1457
|
+
}
|
|
1454
1458
|
function optionTicker(option) {
|
|
1455
1459
|
return option.ticker || option.symbol;
|
|
1456
1460
|
}
|
|
@@ -1616,6 +1620,7 @@ async function buildRoute({
|
|
|
1616
1620
|
}
|
|
1617
1621
|
}
|
|
1618
1622
|
const valueRaw = applyLayerZeroBuffer(quote, option);
|
|
1623
|
+
const partnerId = quotePartnerId(quote);
|
|
1619
1624
|
if (!needsNativeFee) {
|
|
1620
1625
|
if (valueRaw !== 0n) throw new Error("Non-LayerZero route requested a non-zero native value; refusing to sign.");
|
|
1621
1626
|
} else if (valueRaw === 0n && Number(quote.executionChainId) > 0) {
|
|
@@ -1666,7 +1671,7 @@ async function buildRoute({
|
|
|
1666
1671
|
label: "Submit ZeroDelta order",
|
|
1667
1672
|
chainId: option.chainId,
|
|
1668
1673
|
to: escrow,
|
|
1669
|
-
data: encodeSubmitOrder(orders),
|
|
1674
|
+
data: encodeSubmitOrder(orders, partnerId),
|
|
1670
1675
|
value: toHexQuantity(valueRaw),
|
|
1671
1676
|
escrow,
|
|
1672
1677
|
amountRaw: order.bidTokenAmount
|
|
@@ -1679,6 +1684,7 @@ async function buildRoute({
|
|
|
1679
1684
|
gasCostSource: quote.gasCostSource,
|
|
1680
1685
|
msgValue: valueRaw.toString(),
|
|
1681
1686
|
deadline: order.deadline,
|
|
1687
|
+
partnerId: partnerId === NO_PARTNER_ID ? void 0 : partnerId,
|
|
1682
1688
|
iterations: result.iterations,
|
|
1683
1689
|
// Carried verbatim from the gateway's decision on THIS wallet pair. The projection used to
|
|
1684
1690
|
// drop it, which is why the widget could show a price with no evidence of the control that
|
|
@@ -1693,7 +1699,7 @@ var CHANNEL_HEADER = "x-zd-channel";
|
|
|
1693
1699
|
var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
|
|
1694
1700
|
var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
|
|
1695
1701
|
var WIDGET_CHANNEL = "widget";
|
|
1696
|
-
var WIDGET_VERSION = "4.
|
|
1702
|
+
var WIDGET_VERSION = "4.7.0" ;
|
|
1697
1703
|
var MAX_CHANNEL_VERSION_LEN = 32;
|
|
1698
1704
|
function sanitizeVersion(raw) {
|
|
1699
1705
|
const v = String(raw).trim();
|
|
@@ -2349,7 +2355,7 @@ function validatePlannedTransaction(tx, route, expectedRecipient) {
|
|
|
2349
2355
|
if (!decoded) return false;
|
|
2350
2356
|
const first = decoded.orders[0];
|
|
2351
2357
|
const last = decoded.orders[decoded.orders.length - 1];
|
|
2352
|
-
return decoded.partnerId === NO_PARTNER_ID && lower(first.bidToken) === lower(route.source.tokenAddress) && rawEquals(first.bidTokenAmount, tx.amountRaw) && lower(last.askToken) === lower(route.receive.tokenAddress) && Number(last.destinationChainId) === Number(route.receive.chainId) && lower(last.destinationReceiver) === lower(expectedRecipient);
|
|
2358
|
+
return decoded.partnerId === lower(route.quote?.partnerId || NO_PARTNER_ID) && lower(first.bidToken) === lower(route.source.tokenAddress) && rawEquals(first.bidTokenAmount, tx.amountRaw) && lower(last.askToken) === lower(route.receive.tokenAddress) && Number(last.destinationChainId) === Number(route.receive.chainId) && lower(last.destinationReceiver) === lower(expectedRecipient);
|
|
2353
2359
|
}
|
|
2354
2360
|
return false;
|
|
2355
2361
|
}
|
package/dist/mount.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { M as MountConfig, s as mount } from './mount-
|
|
1
|
+
export { M as MountConfig, s as mount } from './mount-D4mbJwdc.cjs';
|
|
2
2
|
import 'react';
|
|
3
|
-
import './verify-
|
|
3
|
+
import './verify-BEQ8DMvJ.cjs';
|
package/dist/mount.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { M as MountConfig, s as mount } from './mount-
|
|
1
|
+
export { M as MountConfig, s as mount } from './mount-D5TIOkMe.js';
|
|
2
2
|
import 'react';
|
|
3
|
-
import './verify-
|
|
3
|
+
import './verify-BEQ8DMvJ.js';
|
package/dist/mount.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { mount } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { mount } from './chunk-L7ZEFAZ4.js';
|
|
2
|
+
import './chunk-MZCS5TL2.js';
|