@glacislabs/stablegenie-zerodelta 3.4.0 → 4.0.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-Q3YSX4D5.js → chunk-ABI6ZH7O.js} +344 -3
- package/dist/{chunk-TYQF2L5C.js → chunk-FJQQLB2K.js} +411 -19
- package/dist/core/index.cjs +433 -18
- package/dist/core/index.d.cts +21 -4
- package/dist/core/index.d.ts +21 -4
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +764 -26
- package/dist/index.d.cts +22 -3
- package/dist/index.d.ts +22 -3
- package/dist/index.js +2 -2
- package/dist/{mount-BT2NejVt.d.ts → mount-D5k_u92L.d.ts} +1 -1
- package/dist/{mount-D8NmWtqV.d.cts → mount-mcyZAzZc.d.cts} +1 -1
- package/dist/mount.cjs +743 -26
- 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 +99 -7
- package/dist/{verify-34voZYj1.d.cts → verify-C9vzpm4T.d.cts} +225 -1
- package/dist/{verify-34voZYj1.d.ts → verify-C9vzpm4T.d.ts} +225 -1
- package/package.json +1 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Token, Q as Quote, N as NormalizedOrder,
|
|
2
|
-
export {
|
|
1
|
+
import { T as Token, Q as Quote, N as NormalizedOrder, q as PayOption, g as RouteResult, b as Chain, R as Route, a as Catalogue, F as FetchQuoteFn, r as SolveResult, O as OrderRequest, C as Compliance, s as BalanceTarget, t as BalanceEntry, u as ApiClient, P as Plan, v as SwapInput, w as PlannedTx, x as Verifier, f as ExchangeProduct, h as TxHistoryEntry, S as SanitizedTxEntry, E as EngineConfig } from '../verify-C9vzpm4T.js';
|
|
2
|
+
export { y as Address, z as ApiError, A as Availability, D as BLOCK_LABEL_DEFAULT, B as BrokenLane, G as COMPLIANCE_CHECK_ORDER, H as COMPLIANCE_DENY_LABEL, I as CatalogueContext, J as CatalogueInput, c as ComplianceCheck, K as ComplianceCheckId, L as ComplianceDecision, d as ComplianceTone, e as ComplianceView, M as DIRECT_CHECK_IDS, U as DIRECT_SCOPE_NOTE, X as Destination, Y as FLOOR_CATEGORIES, Z as Hex, _ as PlannedTxKind, $ as QuoteBlock, a0 as ResolvedConfig, a1 as RouteHealth, a2 as RouteHealthLane, a3 as SCREENING_BUCKETS, a4 as ScreenProvider, a5 as ScreeningBucket, a6 as ScreeningOutcome, a7 as TUNABLE_CATEGORIES, a8 as TxPlan, V as VerifyResult, W as WalletScreen, a9 as apiError, i as assetClassOf, aa as blockLabelFor, ab as brokenLaneFor, j as brokenLaneReason, ac as buildCatalogue, ad as canAttachApiKey, ae as categoryLabel, af as classifyQuoteError, k as complianceChecks, ag as complianceControlsEvaluated, l as complianceControlsLine, ah as complianceReasonHead, ai as complianceReasonTag, aj as complianceTagOf, m as complianceView, n as counterpartTokens, ak as createApiClient, al as createVerifier, o as destinationAvailability, am as destinationKeys, an as directComplianceFromScreens, ao as distinctScreenedWallets, ap as executableRoutes, aq as executionChainIds, ar as hasReachableDestination, as as hubDeliverableSymbols, p as humanizeComplianceReason, at as isExecutableBridge, au as isKnownUnbridgeable, av as isSourceToken, aw as laneKey, ax as laneKeys, ay as parseAllowedApiBase, az as productAssets, aA as registryRpc, aB as resolveApiBase, aC as resolveConfig, aD as screeningOutcomeOf, aE as sourceKeys, aF as suppressedLanes, aG as tokenKey, aH as txMatchesPlan, aI as unattributedComplianceReasons } from '../verify-C9vzpm4T.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. */
|
|
@@ -11,6 +11,15 @@ declare const TRADEABLE_RWA_ASSETS: ReadonlySet<string>;
|
|
|
11
11
|
/** Everything the engine may price. The catalogue narrows this per product; see availability.ts. */
|
|
12
12
|
declare const SUPPORTED_ASSETS: ReadonlySet<string>;
|
|
13
13
|
declare const API_CACHE_TTL_MS = 60000;
|
|
14
|
+
/**
|
|
15
|
+
* How long one wallet's KYW verdict is held.
|
|
16
|
+
*
|
|
17
|
+
* Longer than the resource cache on purpose: a screening verdict is a property of the ADDRESS, not
|
|
18
|
+
* of the current market, so re-asking every minute buys nothing and every miss costs a provider
|
|
19
|
+
* bill plus an audit row upstream (see api.ts `screenWallet`). Five minutes matches the dApp's own
|
|
20
|
+
* `staleTime` for the same call, so the two products re-screen on the same cadence.
|
|
21
|
+
*/
|
|
22
|
+
declare const SCREEN_CACHE_TTL_MS: number;
|
|
14
23
|
declare const MAX_QUOTE_CANDIDATES = 8;
|
|
15
24
|
declare const QUOTE_BUFFER_BPS = 50;
|
|
16
25
|
declare const LZ_FEE_BUFFER_BPS = 1500n;
|
|
@@ -285,8 +294,16 @@ interface BuildRouteArgs {
|
|
|
285
294
|
fetchQuote: FetchQuoteFn;
|
|
286
295
|
solve?: typeof solveExactOut;
|
|
287
296
|
amountInRaw?: string | bigint;
|
|
297
|
+
/**
|
|
298
|
+
* The compliance verdict for a DIRECT route, synthesized from standalone wallet screens.
|
|
299
|
+
*
|
|
300
|
+
* Only ever set on the direct path: a routed quote carries the gateway's own decision on the
|
|
301
|
+
* response. Absent here means the route has no verdict to show, which the panel states as
|
|
302
|
+
* "no decision returned" rather than rendering as passed.
|
|
303
|
+
*/
|
|
304
|
+
compliance?: Compliance;
|
|
288
305
|
}
|
|
289
|
-
declare function buildRoute({ option, destination, destinationToken, chains, payer, fetchQuote, solve, amountInRaw }: BuildRouteArgs): Promise<RouteResult>;
|
|
306
|
+
declare function buildRoute({ option, destination, destinationToken, chains, payer, fetchQuote, solve, amountInRaw, compliance }: BuildRouteArgs): Promise<RouteResult>;
|
|
290
307
|
|
|
291
308
|
interface PayRequest {
|
|
292
309
|
address: string;
|
|
@@ -484,4 +501,4 @@ interface Engine {
|
|
|
484
501
|
/** Create an engine bound to a config. The 60s resource cache is per-engine. */
|
|
485
502
|
declare function createEngine(config?: EngineConfig): Engine;
|
|
486
503
|
|
|
487
|
-
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, 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, SAME_CLASS_STABLE, 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, formatNative, formatUnits, isAddress, isDeliverable, isHexAddress, isHexData, isHexQuantity, isLayerZeroRoute, maxNativeFeeWei, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeOrderRequest, normalizeOrderRequests, parseUnitsDecimal, planErrorSummary, planMsgValueHex, quoteSwapPreview, requiresNativeBridgeFee, resolveSwapReceiver, routeNativeValue, scaleDecimals, solveExactIn, solveExactOut, stableGenieIntentSchema, strip0x, symbolKey, toHexQuantity, tokenEnabled, uint64Word, uintWord, validateDestination, validatePlannedTransaction, validateSwap };
|
|
504
|
+
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, 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, formatNative, formatUnits, isAddress, isDeliverable, isHexAddress, isHexData, isHexQuantity, isLayerZeroRoute, maxNativeFeeWei, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeOrderRequest, normalizeOrderRequests, parseUnitsDecimal, planErrorSummary, planMsgValueHex, quoteSwapPreview, requiresNativeBridgeFee, resolveSwapReceiver, routeNativeValue, scaleDecimals, solveExactIn, solveExactOut, stableGenieIntentSchema, strip0x, symbolKey, toHexQuantity, tokenEnabled, uint64Word, uintWord, validateDestination, validatePlannedTransaction, validateSwap };
|
package/dist/core/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { API_CACHE_TTL_MS, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CHAIN_DISPLAY_NAMES, DEFAULT_WIDGET_API_BASE, ERC20_ALLOWANCE_SELECTOR, ERC20_APPROVE_SELECTOR, ERC20_BALANCEOF_SELECTOR, ERC20_TRANSFER_SELECTOR, EXECUTABLE_STABLE_ASSETS, 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, 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, ZERO_ADDRESS, addressWord, allowanceCovers, apiError, applyLayerZeroBuffer, assertAddress, assertQuoteMatchesSelection, assetClassOf, assetDecimals, brokenLaneFor, brokenLaneReason, buildCatalogue, buildPayOptions, buildRoute, buildSwapPlan, bytes32Word, bytesPayload, canAttachApiKey, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, classifyQuoteError, counterpartTokens, createApiClient, createEngine, createVerifier, decodeSubmitOrderCalldata, destinationAvailability, destinationKeys, encodeAllowance, encodeApprove, encodeBalanceOf, encodeSubmitOrder, encodeTransfer, executableRoutes, executionChainIds, fetchPaymentPlan, finalOf, findToken, formatNative, formatUnits, hasReachableDestination, hubDeliverableSymbols, 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, routeNativeValue, scaleDecimals, solveExactIn, solveExactOut, sourceKeys, stableGenieIntentSchema, strip0x, suppressedLanes, symbolKey, toHexQuantity, tokenEnabled, tokenKey, txMatchesPlan, uint64Word, uintWord, validateDestination, validatePlannedTransaction, validateSwap } 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, 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, 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, routeNativeValue, scaleDecimals, screeningOutcomeOf, solveExactIn, solveExactOut, sourceKeys, stableGenieIntentSchema, strip0x, suppressedLanes, symbolKey, toHexQuantity, tokenEnabled, tokenKey, txMatchesPlan, uint64Word, uintWord, unattributedComplianceReasons, validateDestination, validatePlannedTransaction, validateSwap } from '../chunk-FJQQLB2K.js';
|