@glacislabs/stablegenie-zerodelta 4.21.0 → 4.22.1
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/CHANGELOG.md +424 -0
- package/dist/{chunk-KOFREX5L.js → chunk-6TCVZRNB.js} +385 -31
- package/dist/{chunk-3E554IZO.js → chunk-WVDRVGBA.js} +474 -51
- package/dist/core/index.cjs +400 -30
- package/dist/core/index.d.cts +196 -3
- package/dist/core/index.d.ts +196 -3
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +886 -109
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/{mount-C2GLFqgK.d.cts → mount-DC_JT0cE.d.cts} +1 -1
- package/dist/{mount-867H-JSe.d.ts → mount-GOYY_jNr.d.ts} +1 -1
- package/dist/mount.cjs +886 -109
- 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 +15 -8
- package/dist/{verify-CeHRSKl2.d.cts → verify-mpglrU7n.d.cts} +11 -1
- package/dist/{verify-CeHRSKl2.d.ts → verify-mpglrU7n.d.ts} +11 -1
- package/package.json +3 -2
package/dist/core/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as NormalizedOrder, s as ApiClient, t as SwapInput, P as Plan, C as Compliance, S as SanitizedTxEntry, T as Token, Q as Quote, u as PayOption, h as RouteResult, b as Chain, R as Route, a as Catalogue, v as RwaVault, F as FetchQuoteFn, w as SolveResult, O as OrderRequest, x as BalanceTarget, y as BalanceEntry, z as PlannedTx, Z as ZdHeavyExpected, D as Verifier, G as Promotion, f as ExchangeProduct, i as TxHistoryEntry, E as EngineConfig } from '../verify-
|
|
2
|
-
export {
|
|
1
|
+
import { N as NormalizedOrder, s as ApiClient, t as SwapInput, P as Plan, C as Compliance, S as SanitizedTxEntry, T as Token, Q as Quote, u as PayOption, h as RouteResult, b as Chain, R as Route, a as Catalogue, v as RwaVault, F as FetchQuoteFn, w as SolveResult, O as OrderRequest, x as BalanceTarget, y as BalanceEntry, z as PlannedTx, Z as ZdHeavyExpected, H as Hex, D as Verifier, G as Promotion, f as ExchangeProduct, i as TxHistoryEntry, E as EngineConfig } from '../verify-mpglrU7n.cjs';
|
|
2
|
+
export { I as Address, J as ApiError, A as Availability, K as BLOCK_LABEL_DEFAULT, M as BonusInputs, B as BrokenLane, U as CENTIBIPS_PER_UNIT, X as COMPLIANCE_CHECK_ORDER, Y as COMPLIANCE_DENY_LABEL, _ as CatalogueContext, $ as CatalogueInput, a0 as CompareContext, a1 as CompareHop, a2 as CompareOption, c as ComplianceCheck, a3 as ComplianceCheckId, a4 as ComplianceDecision, d as ComplianceTone, e as ComplianceView, a5 as CornerTag, a6 as DIRECT_CHECK_IDS, a7 as DIRECT_SCOPE_NOTE, a8 as Destination, a9 as FLOOR_CATEGORIES, aa as GatewayEvmTx, ab as InsteadFigures, ac as LaneAvailabilityState, L as LaneLimit, ad as MAX_QUOTE_CARDS, ae as Parity, af as PlannedTxKind, ag as PromotedAsset, ah as PromotedNetwork, ai as PromotionFunder, aj as PromotionKind, ak as PromotionToken, al as QuoteBlock, am as QuoteOption, an as ResolvedConfig, ao as RouteBadge, ap as RouteHealth, aq as RouteHealthAvailability, ar as RouteHealthLane, g as RouteLeg, as as SCREENING_BUCKETS, at as ScreenProvider, au as ScreeningBucket, av as ScreeningOutcome, aw as SwapEnds, ax as TUNABLE_CATEGORIES, ay as TagTone, az as TxPlan, V as VerifyResult, aA as WAIT_MAX_SEC, aB as WAIT_MIN_SEC, aC as WAIT_POSITIONS, aD as WAIT_STEP_SEC, aE as WaitScale, W as WalletScreen, aF as ZD_HEAVY_KEY_PREFIX, aG as amountFieldError, aH as apiError, j as assetClassOf, aI as bestOutputOption, aJ as blockLabelFor, aK as bonusFigure, aL as bonusPercentLabel, aM as brokenLaneFor, k as brokenLaneReason, aN as buildCatalogue, aO as canAttachApiKey, aP as categoryLabel, aQ as clampWait, aR as classifyQuoteError, aS as compareAmount, aT as compareDuration, aU as compareFeeUsd, aV as compareHops, aW as compareOptionOf, aX as compareOptionsOf, l as complianceChecks, aY as complianceControlsEvaluated, m as complianceControlsLine, aZ as complianceReasonHead, a_ as complianceReasonTag, a$ as complianceTagOf, n as complianceView, b0 as cornerTags, o as counterpartTokens, b1 as createApiClient, b2 as createVerifier, p as destinationAvailability, b3 as destinationKeys, b4 as directComplianceFromScreens, b5 as distinctScreenedWallets, b6 as estimateBonus, b7 as exceedsLaneLimit, b8 as executableRoutes, b9 as executionChainIds, ba as extraVsFastest, bb as fastestOption, q as formatJurisdiction, bc as fundedByLabel, bd as hasReachableDestination, be as hubDeliverableSymbols, r as humanizeComplianceReason, bf as insteadFigures, bg as isExecutableBridge, bh as isKnownUnbridgeable, bi as isSellableRwa, bj as isSourceToken, bk as laneAvailabilityState, bl as laneKey, bm as laneKeys, bn as laneLimitAmount, bo as laneLimitError, bp as laneLimitFor, bq as laneLimitHint, br as laneLimitSymbol, bs as limitedLanes, bt as pairPromotionsInto, bu as parity, bv as parseAllowedApiBase, bw as parsePromotion, bx as parsePromotions, by as pickForWait, bz as priceCompareOptions, bA as productAssets, bB as promotedAssets, bC as promotionFor, bD as proposedWait, bE as registryRpc, bF as resolveApiBase, bG as resolveConfig, bH as routeBadges, bI as routeShapeLabel, bJ as sameAddress, bK as screeningOutcomeOf, bL as selectableOptions, bM as snapWait, bN as sourceKeys, bO as suppressedLanes, bP as tokenKey, bQ as txMatchesPlan, bR as unattributedComplianceReasons, bS as usdStablePair, bT as visibleOptions, bU as waitFraction, bV as waitFromFraction, bW as waitLabel, bX as waitScaleFor, bY as zdHeavyOptionKey, bZ as zdHeavyUnavailableStatus } from '../verify-mpglrU7n.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. */
|
|
@@ -867,6 +867,186 @@ declare function tokenTicker(token: Pick<Token, "symbol" | "displaySymbol"> | nu
|
|
|
867
867
|
*/
|
|
868
868
|
declare function tickerOn(tokens: readonly Token[] | null | undefined, chainId: number | null | undefined, symbol: string): string;
|
|
869
869
|
|
|
870
|
+
/**
|
|
871
|
+
* ZD Heavy cancel and claim, checked before the wallet opens.
|
|
872
|
+
*
|
|
873
|
+
* zd-api-v2 builds the unsigned transactions (`POST /orders/{orderId}/cancel-tx`, `/claim-tx`) and says
|
|
874
|
+
* where the order's value is (`GET /orders/{orderId}/cancellation`). The gateway is UNTRUSTED, so the
|
|
875
|
+
* widget never signs those bytes blindly: the router must be one this build pins for the chain, the
|
|
876
|
+
* sender the connected wallet, no native value attached, and the calldata must decode — canonically,
|
|
877
|
+
* nothing trailing — to exactly the call the row asked for: a `cancel` of THIS order (its id recomputed
|
|
878
|
+
* from the proof, the proof's header naming this owner and this router), or a `claim` of the asked token
|
|
879
|
+
* paid to this wallet. A transaction that fails any of it is refused and the wallet never sees it.
|
|
880
|
+
*/
|
|
881
|
+
/** zd-api-v2 UnsignedTxEnvelope.data. */
|
|
882
|
+
interface ZdHeavyUnsignedTx {
|
|
883
|
+
purpose: string;
|
|
884
|
+
chainId: string;
|
|
885
|
+
from: string;
|
|
886
|
+
to: string;
|
|
887
|
+
data: string;
|
|
888
|
+
value?: string;
|
|
889
|
+
}
|
|
890
|
+
interface ZdHeavyCancellationPlace {
|
|
891
|
+
kind: "router" | "hub";
|
|
892
|
+
chainId?: number;
|
|
893
|
+
contract: string;
|
|
894
|
+
canCancelInPerson: boolean;
|
|
895
|
+
complete: boolean;
|
|
896
|
+
lots: {
|
|
897
|
+
step: number;
|
|
898
|
+
token: string;
|
|
899
|
+
amount: string;
|
|
900
|
+
key: string;
|
|
901
|
+
}[];
|
|
902
|
+
refunds: {
|
|
903
|
+
txHash: string;
|
|
904
|
+
step: number;
|
|
905
|
+
token: string;
|
|
906
|
+
amount: string;
|
|
907
|
+
to: string;
|
|
908
|
+
}[];
|
|
909
|
+
claimable: {
|
|
910
|
+
payee: string;
|
|
911
|
+
token: string;
|
|
912
|
+
amount: string;
|
|
913
|
+
}[];
|
|
914
|
+
}
|
|
915
|
+
/** zd-api-v2 CancellationPlan (GET /api/v1/orders/{orderId}/cancellation), as far as the widget reads it. */
|
|
916
|
+
interface ZdHeavyCancellationPlan {
|
|
917
|
+
orderId: string;
|
|
918
|
+
ownerType: "evm" | "solana";
|
|
919
|
+
owner: string;
|
|
920
|
+
originChainId: number;
|
|
921
|
+
state: "open" | "cancel_requested" | "refund_complete";
|
|
922
|
+
complete: boolean;
|
|
923
|
+
finished?: boolean;
|
|
924
|
+
places: ZdHeavyCancellationPlace[];
|
|
925
|
+
}
|
|
926
|
+
type ZdHeavyRefund = ZdHeavyCancellationPlace["refunds"][number] & {
|
|
927
|
+
chainId?: number;
|
|
928
|
+
};
|
|
929
|
+
type ZdHeavyRecovery = {
|
|
930
|
+
kind: "delivered";
|
|
931
|
+
} | {
|
|
932
|
+
kind: "refunded";
|
|
933
|
+
refunds: ZdHeavyRefund[];
|
|
934
|
+
} | {
|
|
935
|
+
kind: "claim";
|
|
936
|
+
claims: {
|
|
937
|
+
chainId: number;
|
|
938
|
+
token: string;
|
|
939
|
+
amount: string;
|
|
940
|
+
}[];
|
|
941
|
+
} | {
|
|
942
|
+
kind: "cancel";
|
|
943
|
+
chains: number[];
|
|
944
|
+
requested: boolean;
|
|
945
|
+
} | {
|
|
946
|
+
kind: "waiting";
|
|
947
|
+
} | {
|
|
948
|
+
kind: "not-owner";
|
|
949
|
+
};
|
|
950
|
+
/** Whether a value is a ZD Heavy router order id (a bytes32). Nothing else ever reaches a URL. */
|
|
951
|
+
declare function isZdHeavyOrderId(v: unknown): v is string;
|
|
952
|
+
/**
|
|
953
|
+
* What can be done about a ZD Heavy order, from the plan. A claim owed to the CONNECTED wallet comes
|
|
954
|
+
* first, before anything else — a delivered order can still have a payout parked as claimable for its
|
|
955
|
+
* receiver, who need not be the owner. Then: delivered, refunded, a cancel on every router chain that
|
|
956
|
+
* still holds the order's value, or one pre-emptive cancel while the order is open. Who may cancel is
|
|
957
|
+
* the button's question (the owner), not this one's, so a visitor still reads what the order needs.
|
|
958
|
+
*/
|
|
959
|
+
declare function zdHeavyRecovery(plan: ZdHeavyCancellationPlan, wallet: string | null | undefined): ZdHeavyRecovery;
|
|
960
|
+
/**
|
|
961
|
+
* The cancellation plan for `orderId`, or null when the answer is not one the widget can read. Every
|
|
962
|
+
* field it uses is held to its shape: the plan only decides which button to DRAW (each transaction is
|
|
963
|
+
* still checked before signing), but a malformed plan is "not known", never a confident action.
|
|
964
|
+
*/
|
|
965
|
+
declare function normalizeCancellationPlan(raw: unknown, orderId: string): ZdHeavyCancellationPlan | null;
|
|
966
|
+
/** One read of the order's cancellation plan. Never rejects: anything unreadable is null ("not known"). */
|
|
967
|
+
declare function fetchZdHeavyCancellation(api: Pick<ApiClient, "apiRequest">, orderId: string): Promise<ZdHeavyCancellationPlan | null>;
|
|
968
|
+
/** The gateway's unsigned owner-cancel. UNTRUSTED: hold it with {@link checkZdHeavyCancelTx} before any wallet call. */
|
|
969
|
+
declare function buildZdHeavyCancelTx(api: Pick<ApiClient, "apiRequest">, orderId: string, chainId?: number): Promise<ZdHeavyUnsignedTx>;
|
|
970
|
+
/** The gateway's unsigned claim. UNTRUSTED: hold it with {@link checkZdHeavyClaimTx} before any wallet call. */
|
|
971
|
+
declare function buildZdHeavyClaimTx(api: Pick<ApiClient, "apiRequest">, orderId: string, chainId: number, token: string): Promise<ZdHeavyUnsignedTx>;
|
|
972
|
+
/**
|
|
973
|
+
* The router's `cancel` and both `claim` overloads (zd-config src/abi/zdevm-router.json, zd-evm 701e956):
|
|
974
|
+
* cancel(bytes32 orderId, (uint64 expiryDate, bytes orderHeader, bytes32[] stepHashes) proof, uint256[] keys)
|
|
975
|
+
* claim(address token)
|
|
976
|
+
* claim(address token, address to)
|
|
977
|
+
* Selectors pinned against viem in test/engine/zdheavy-cancel.test.ts.
|
|
978
|
+
*/
|
|
979
|
+
declare const ZDHEAVY_CANCEL_SELECTOR = "0xf26bce2c";
|
|
980
|
+
declare const ZDHEAVY_CLAIM_SELECTOR = "0x1e83409a";
|
|
981
|
+
declare const ZDHEAVY_CLAIM_TO_SELECTOR = "0x21c0b342";
|
|
982
|
+
/** No order has more lots than steps × tokens it touches; 32 is far above any real one (≤ 8 steps). */
|
|
983
|
+
declare const MAX_CANCEL_KEYS = 32;
|
|
984
|
+
interface DecodedZdHeavyCancel {
|
|
985
|
+
orderId: Hex;
|
|
986
|
+
proof: {
|
|
987
|
+
expiryDate: bigint;
|
|
988
|
+
orderHeader: Hex;
|
|
989
|
+
stepHashes: Hex[];
|
|
990
|
+
};
|
|
991
|
+
keys: bigint[];
|
|
992
|
+
}
|
|
993
|
+
declare function decodeZdHeavyCancel(data: string): DecodedZdHeavyCancel;
|
|
994
|
+
declare function decodeZdHeavyClaim(data: string): {
|
|
995
|
+
token: Hex;
|
|
996
|
+
to?: Hex;
|
|
997
|
+
};
|
|
998
|
+
/** The order id the router derives from an owner proof: keccak("ZD/ORDER" ‖ expiry ‖ keccak(header) ‖ stepHashes). */
|
|
999
|
+
declare function orderIdFromProof(expiryDate: bigint, header: Hex, stepHashes: readonly Hex[]): Hex;
|
|
1000
|
+
/** One JSON-RPC read on a chain's bundled (or operator-overridden) RPC — never the registry's: the API
|
|
1001
|
+
* being checked must not pick the node that checks it (`createVerifier` › `bundledRpc`). */
|
|
1002
|
+
type BundledRpc = (chainId: number, method: string, params: unknown[]) => Promise<unknown>;
|
|
1003
|
+
/**
|
|
1004
|
+
* Whether the displayed SOURCE transaction submitted exactly the ZD Heavy order `orderId`.
|
|
1005
|
+
*
|
|
1006
|
+
* Security review 2026-12-01 (finding 1): a history row pairs a transaction hash with an order id, and
|
|
1007
|
+
* both come from the gateway. A hostile gateway could hand back order A's hash (whose amounts the
|
|
1008
|
+
* screen shows) with order B's id — both the user's — and a Cancel would then sign B's genuine proof,
|
|
1009
|
+
* which every byte check accepts because its expected id came from the same gateway. So the id is
|
|
1010
|
+
* re-derived here from the chain: the source transaction is read over the bundled RPC, it must have
|
|
1011
|
+
* succeeded and gone to a router this build pins on that chain, and its `submitOrder` calldata
|
|
1012
|
+
* (`decodeZdHeavySubmit`) must recompute (`orderIdOf`) to `orderId`. Anything else — no RPC, not
|
|
1013
|
+
* found, reverted, another contract, another order — is a refusal: the card draws no action.
|
|
1014
|
+
*/
|
|
1015
|
+
declare function verifyZdHeavySourceOrder(rpc: BundledRpc, chainId: number, hash: string, orderId: string): Promise<{
|
|
1016
|
+
ok: true;
|
|
1017
|
+
} | {
|
|
1018
|
+
ok: false;
|
|
1019
|
+
reason: string;
|
|
1020
|
+
}>;
|
|
1021
|
+
/** A transaction the checks passed, in the exact shape the wallet receives: value is always zero. */
|
|
1022
|
+
interface CheckedZdHeavyAction {
|
|
1023
|
+
ok: true;
|
|
1024
|
+
chainId: number;
|
|
1025
|
+
tx: {
|
|
1026
|
+
from: string;
|
|
1027
|
+
to: string;
|
|
1028
|
+
data: string;
|
|
1029
|
+
value: "0x0";
|
|
1030
|
+
};
|
|
1031
|
+
}
|
|
1032
|
+
type ZdHeavyActionCheck = CheckedZdHeavyAction | {
|
|
1033
|
+
ok: false;
|
|
1034
|
+
reason: string;
|
|
1035
|
+
};
|
|
1036
|
+
/** An owner-cancel built by zd-api-v2, held to this order, this owner and a pinned router. */
|
|
1037
|
+
declare function checkZdHeavyCancelTx(tx: ZdHeavyUnsignedTx, e: {
|
|
1038
|
+
orderId: string;
|
|
1039
|
+
owner: string;
|
|
1040
|
+
chainId?: number;
|
|
1041
|
+
lotKeys?: readonly string[];
|
|
1042
|
+
}): ZdHeavyActionCheck;
|
|
1043
|
+
/** A claim built by zd-api-v2: claim(token) or claim(token, to) of the asked token, paid to this wallet. */
|
|
1044
|
+
declare function checkZdHeavyClaimTx(tx: ZdHeavyUnsignedTx, e: {
|
|
1045
|
+
owner: string;
|
|
1046
|
+
chainId: number;
|
|
1047
|
+
token: string;
|
|
1048
|
+
}): ZdHeavyActionCheck;
|
|
1049
|
+
|
|
870
1050
|
declare const STABLEGENIE_INTENT_VERSION = 1;
|
|
871
1051
|
declare const STABLEGENIE_INTENT_TTL_MS: number;
|
|
872
1052
|
declare const STABLEGENIE_SUPPORTED_CHAIN_IDS: readonly number[];
|
|
@@ -1032,6 +1212,19 @@ interface Engine {
|
|
|
1032
1212
|
previewSolanaSource: (input: Parameters<typeof previewSolanaSource>[1]) => Promise<SwapPreview>;
|
|
1033
1213
|
/** Where an order is on its journey, by its source transaction hash. Display only; never rejects. */
|
|
1034
1214
|
trackDelivery: (hash: string) => Promise<DeliveryStatus>;
|
|
1215
|
+
/** A ZD Heavy order's cancellation plan (`GET /orders/{orderId}/cancellation`). Never rejects: null is "not known". */
|
|
1216
|
+
fetchZdHeavyCancellation: (orderId: string) => Promise<ZdHeavyCancellationPlan | null>;
|
|
1217
|
+
/** The gateway's UNSIGNED owner-cancel. Untrusted: hold it with `checkZdHeavyCancelTx` before any wallet call. */
|
|
1218
|
+
buildZdHeavyCancelTx: (orderId: string, chainId?: number) => Promise<ZdHeavyUnsignedTx>;
|
|
1219
|
+
/** The gateway's UNSIGNED claim. Untrusted: hold it with `checkZdHeavyClaimTx` before any wallet call. */
|
|
1220
|
+
buildZdHeavyClaimTx: (orderId: string, chainId: number, token: string) => Promise<ZdHeavyUnsignedTx>;
|
|
1221
|
+
/** Whether the SOURCE transaction `hash` on `chainId` submitted exactly the ZD Heavy order `orderId` (bundled RPC). */
|
|
1222
|
+
verifyZdHeavySourceOrder: (chainId: number, hash: string, orderId: string) => Promise<{
|
|
1223
|
+
ok: true;
|
|
1224
|
+
} | {
|
|
1225
|
+
ok: false;
|
|
1226
|
+
reason: string;
|
|
1227
|
+
}>;
|
|
1035
1228
|
/** The gateway's orders for these wallets (EVM and/or Solana), newest first; null when unreadable. */
|
|
1036
1229
|
fetchWalletHistory: (wallets: readonly string[]) => Promise<SanitizedTxEntry[] | null>;
|
|
1037
1230
|
/** The two-click flow: preparation, then the submit on its own click. */
|
|
@@ -1069,4 +1262,4 @@ interface Engine {
|
|
|
1069
1262
|
/** Create an engine bound to a config. Its 60s registry cache is shared with every engine of the same base and key (api.ts › registryCacheFor). */
|
|
1070
1263
|
declare function createEngine(config?: EngineConfig): Engine;
|
|
1071
1264
|
|
|
1072
|
-
export { API_CACHE_TTL_MS, ApiClient, type AssertQuoteArgs, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, BUNDLED_SOLANA_RPC, BalanceEntry, type BalanceReader, BalanceTarget, type BuildPayOptionsArgs, type BuildRouteArgs, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CANONICAL_SOLANA_PROGRAM, CHAIN_DISPLAY_NAMES, Catalogue, Chain, Compliance, DEFAULT_WIDGET_API_BASE, type DecodedOrderRequest, type DecodedSubmitOrder, type DeliveryPhase, type DeliveryStatus, type DeliveryStep, ERC20_ALLOWANCE_SELECTOR, ERC20_APPROVE_SELECTOR, ERC20_BALANCEOF_SELECTOR, ERC20_TRANSFER_SELECTOR, EXECUTABLE_STABLE_ASSETS, type Engine, EngineConfig, ExchangeProduct, type ExpectedOrder, 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, type NativeSolanaOption, type NativeSolanaQuote, type NativeSolanaQuoteRequest, NormalizedOrder, OrderRequest, PREVIEW_OWNER, type ParsedSolanaTransaction, PayOption, type PayRequest, type PaymentWalletContext, Plan, PlannedTx, Promotion, QUOTE_BUFFER_BPS, Quote, Route, RouteResult, RwaVault, SAME_CLASS_STABLE, SCREEN_CACHE_TTL_MS, SOLANA_CHAIN_ID, SOLANA_DESTINATION_ASSETS, SOL_SHORTFALL_MESSAGE, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_DISCRIMINATOR, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, SanitizedTxEntry, type SolanaBridge, type SolanaOrderCost, type SolanaProgress, type SolanaProgressStage, type SolanaRpc, type SolanaRpcAccount, SolanaSendError, type SolanaSigner, type SolanaSourceInput, type SolanaSourcePlan, type SolanaSourcePreview, type SolanaSubmitOrder, type SolanaTransaction, type SolveArgs, SolveResult, SwapInput, type SwapPreview, TOKEN_2022_PROGRAM, TOKEN_PROGRAM, TRACKING, TRADEABLE_RWA_ASSETS, Token, TxHistoryEntry, type ValidatedSwap, Verifier, WALLET_HISTORY_LIMIT, ZERO_ADDRESS, addressWord, allowanceCovers, applyLayerZeroBuffer, askCovers, askTokenDecimals, assertAddress, assertChainAddress, assertQuoteMatchesSelection, assertWalletMessage, assetDecimals, associatedTokenAddress, base58Decode, base58Encode, base64Decode, base64Encode, buildPayOptions, buildRoute, buildSolanaSourcePlan, buildSwapPlan, bytes32Word, bytesEqual, bytesPayload, chainAddressKey, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, checkSolanaPlan as checkPlan, checkSolanaPlan, checkSolanaProgram, checkSolanaReceiver, checkSolanaRouteBuffer, cosignSolanaEvent, createEngine, createSolanaRpc, decodeSolanaSubmitOrder, decodeSolanaSubmitOrder as decodeSubmitOrder, decodeSubmitOrderCalldata, deriveSolanaEvent, encodeAllowance, encodeApprove, encodeBalanceOf, encodeNextSolanaOrders, encodeSubmitOrder, encodeTransfer, executeSolanaPlan, executeSolanaPlanStaged, expectedSolanaDelivery, fetchDelivery, fetchPaymentPlan, fetchWalletHistory, finalOf, findProgramAddress, findToken, foldTicker, formatNative, formatUnits, hexBytes, hexToSolanaKey, historyEntryFromOrder, historyKey, isAddress, isChainAddress, isDeliverable, isHexAddress, isHexData, isHexQuantity, isLayerZeroRoute, isOnEd25519Curve, isPreparationInstruction, isSolanaAddress, isSolanaChainId, isSubmitOrder, maxDeadlineSeconds, maxNativeFeeWei, mergeHistory, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeDelivery, normalizeOrderRequest, normalizeOrderRequests, overwriteBlockhash, parseAddressLookupTable, parseSolanaTransaction, parseUnitsDecimal, placeSignature, planErrorSummary, planMsgValueHex, pollSolanaConfirmation, previewSolanaSource, quotePartnerId, quotePayOption, quoteSolanaSource, quoteSwapPreview, readSolanaBalance, recommendedDeadlineSeconds, requiresNativeBridgeFee, resolveSolanaKeys, resolveSwapReceiver, resolveVaultIcon, resultForOption, routeNativeValue, safeTicker, scaleDecimals, serializeSolanaTransaction, sha256, simulateSolanaCost, solanaBridgeOf, solanaDestinationAsset, solanaKeyBytes, solanaKeyHex, solanaLamportShortfall, solanaPlanNeedsPreparation, solanaQuoteCompliance, solveExactIn, solveExactOut, stableGenieIntentSchema, strip0x, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenTicker, uint64Word, uintWord, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, verifySolanaSubmit, verifySolanaTransaction, verifySolanaSubmit as verifySubmit, verifySolanaTransaction as verifyTransaction, withVaultArtwork };
|
|
1265
|
+
export { API_CACHE_TTL_MS, ApiClient, type AssertQuoteArgs, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, BUNDLED_SOLANA_RPC, BalanceEntry, type BalanceReader, BalanceTarget, type BuildPayOptionsArgs, type BuildRouteArgs, type BundledRpc, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CANONICAL_SOLANA_PROGRAM, CHAIN_DISPLAY_NAMES, Catalogue, Chain, type CheckedZdHeavyAction, Compliance, DEFAULT_WIDGET_API_BASE, type DecodedOrderRequest, type DecodedSubmitOrder, type DecodedZdHeavyCancel, type DeliveryPhase, type DeliveryStatus, type DeliveryStep, ERC20_ALLOWANCE_SELECTOR, ERC20_APPROVE_SELECTOR, ERC20_BALANCEOF_SELECTOR, ERC20_TRANSFER_SELECTOR, EXECUTABLE_STABLE_ASSETS, type Engine, EngineConfig, ExchangeProduct, type ExpectedOrder, FetchQuoteFn, Hex, LZ_FEE_BUFFER_BPS, MAX_CANCEL_KEYS, 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, type NativeSolanaOption, type NativeSolanaQuote, type NativeSolanaQuoteRequest, NormalizedOrder, OrderRequest, PREVIEW_OWNER, type ParsedSolanaTransaction, PayOption, type PayRequest, type PaymentWalletContext, Plan, PlannedTx, Promotion, QUOTE_BUFFER_BPS, Quote, Route, RouteResult, RwaVault, SAME_CLASS_STABLE, SCREEN_CACHE_TTL_MS, SOLANA_CHAIN_ID, SOLANA_DESTINATION_ASSETS, SOL_SHORTFALL_MESSAGE, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_DISCRIMINATOR, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, SanitizedTxEntry, type SolanaBridge, type SolanaOrderCost, type SolanaProgress, type SolanaProgressStage, type SolanaRpc, type SolanaRpcAccount, SolanaSendError, type SolanaSigner, type SolanaSourceInput, type SolanaSourcePlan, type SolanaSourcePreview, type SolanaSubmitOrder, type SolanaTransaction, type SolveArgs, SolveResult, SwapInput, type SwapPreview, TOKEN_2022_PROGRAM, TOKEN_PROGRAM, TRACKING, TRADEABLE_RWA_ASSETS, Token, TxHistoryEntry, type ValidatedSwap, Verifier, WALLET_HISTORY_LIMIT, ZDHEAVY_CANCEL_SELECTOR, ZDHEAVY_CLAIM_SELECTOR, ZDHEAVY_CLAIM_TO_SELECTOR, ZERO_ADDRESS, type ZdHeavyActionCheck, type ZdHeavyCancellationPlace, type ZdHeavyCancellationPlan, type ZdHeavyRecovery, type ZdHeavyRefund, type ZdHeavyUnsignedTx, addressWord, allowanceCovers, applyLayerZeroBuffer, askCovers, askTokenDecimals, assertAddress, assertChainAddress, assertQuoteMatchesSelection, assertWalletMessage, assetDecimals, associatedTokenAddress, base58Decode, base58Encode, base64Decode, base64Encode, buildPayOptions, buildRoute, buildSolanaSourcePlan, buildSwapPlan, buildZdHeavyCancelTx, buildZdHeavyClaimTx, bytes32Word, bytesEqual, bytesPayload, chainAddressKey, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, checkSolanaPlan as checkPlan, checkSolanaPlan, checkSolanaProgram, checkSolanaReceiver, checkSolanaRouteBuffer, checkZdHeavyCancelTx, checkZdHeavyClaimTx, cosignSolanaEvent, createEngine, createSolanaRpc, decodeSolanaSubmitOrder, decodeSolanaSubmitOrder as decodeSubmitOrder, decodeSubmitOrderCalldata, decodeZdHeavyCancel, decodeZdHeavyClaim, deriveSolanaEvent, encodeAllowance, encodeApprove, encodeBalanceOf, encodeNextSolanaOrders, encodeSubmitOrder, encodeTransfer, executeSolanaPlan, executeSolanaPlanStaged, expectedSolanaDelivery, fetchDelivery, fetchPaymentPlan, fetchWalletHistory, fetchZdHeavyCancellation, finalOf, findProgramAddress, findToken, foldTicker, formatNative, formatUnits, hexBytes, hexToSolanaKey, historyEntryFromOrder, historyKey, isAddress, isChainAddress, isDeliverable, isHexAddress, isHexData, isHexQuantity, isLayerZeroRoute, isOnEd25519Curve, isPreparationInstruction, isSolanaAddress, isSolanaChainId, isSubmitOrder, isZdHeavyOrderId, maxDeadlineSeconds, maxNativeFeeWei, mergeHistory, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeCancellationPlan, normalizeDecimalText, normalizeDelivery, normalizeOrderRequest, normalizeOrderRequests, orderIdFromProof, overwriteBlockhash, parseAddressLookupTable, parseSolanaTransaction, parseUnitsDecimal, placeSignature, planErrorSummary, planMsgValueHex, pollSolanaConfirmation, previewSolanaSource, quotePartnerId, quotePayOption, quoteSolanaSource, quoteSwapPreview, readSolanaBalance, recommendedDeadlineSeconds, requiresNativeBridgeFee, resolveSolanaKeys, resolveSwapReceiver, resolveVaultIcon, resultForOption, routeNativeValue, safeTicker, scaleDecimals, serializeSolanaTransaction, sha256, simulateSolanaCost, solanaBridgeOf, solanaDestinationAsset, solanaKeyBytes, solanaKeyHex, solanaLamportShortfall, solanaPlanNeedsPreparation, solanaQuoteCompliance, solveExactIn, solveExactOut, stableGenieIntentSchema, strip0x, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenTicker, uint64Word, uintWord, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, verifySolanaSubmit, verifySolanaTransaction, verifySolanaSubmit as verifySubmit, verifySolanaTransaction as verifyTransaction, verifyZdHeavySourceOrder, withVaultArtwork, zdHeavyRecovery };
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as NormalizedOrder, s as ApiClient, t as SwapInput, P as Plan, C as Compliance, S as SanitizedTxEntry, T as Token, Q as Quote, u as PayOption, h as RouteResult, b as Chain, R as Route, a as Catalogue, v as RwaVault, F as FetchQuoteFn, w as SolveResult, O as OrderRequest, x as BalanceTarget, y as BalanceEntry, z as PlannedTx, Z as ZdHeavyExpected, D as Verifier, G as Promotion, f as ExchangeProduct, i as TxHistoryEntry, E as EngineConfig } from '../verify-
|
|
2
|
-
export {
|
|
1
|
+
import { N as NormalizedOrder, s as ApiClient, t as SwapInput, P as Plan, C as Compliance, S as SanitizedTxEntry, T as Token, Q as Quote, u as PayOption, h as RouteResult, b as Chain, R as Route, a as Catalogue, v as RwaVault, F as FetchQuoteFn, w as SolveResult, O as OrderRequest, x as BalanceTarget, y as BalanceEntry, z as PlannedTx, Z as ZdHeavyExpected, H as Hex, D as Verifier, G as Promotion, f as ExchangeProduct, i as TxHistoryEntry, E as EngineConfig } from '../verify-mpglrU7n.js';
|
|
2
|
+
export { I as Address, J as ApiError, A as Availability, K as BLOCK_LABEL_DEFAULT, M as BonusInputs, B as BrokenLane, U as CENTIBIPS_PER_UNIT, X as COMPLIANCE_CHECK_ORDER, Y as COMPLIANCE_DENY_LABEL, _ as CatalogueContext, $ as CatalogueInput, a0 as CompareContext, a1 as CompareHop, a2 as CompareOption, c as ComplianceCheck, a3 as ComplianceCheckId, a4 as ComplianceDecision, d as ComplianceTone, e as ComplianceView, a5 as CornerTag, a6 as DIRECT_CHECK_IDS, a7 as DIRECT_SCOPE_NOTE, a8 as Destination, a9 as FLOOR_CATEGORIES, aa as GatewayEvmTx, ab as InsteadFigures, ac as LaneAvailabilityState, L as LaneLimit, ad as MAX_QUOTE_CARDS, ae as Parity, af as PlannedTxKind, ag as PromotedAsset, ah as PromotedNetwork, ai as PromotionFunder, aj as PromotionKind, ak as PromotionToken, al as QuoteBlock, am as QuoteOption, an as ResolvedConfig, ao as RouteBadge, ap as RouteHealth, aq as RouteHealthAvailability, ar as RouteHealthLane, g as RouteLeg, as as SCREENING_BUCKETS, at as ScreenProvider, au as ScreeningBucket, av as ScreeningOutcome, aw as SwapEnds, ax as TUNABLE_CATEGORIES, ay as TagTone, az as TxPlan, V as VerifyResult, aA as WAIT_MAX_SEC, aB as WAIT_MIN_SEC, aC as WAIT_POSITIONS, aD as WAIT_STEP_SEC, aE as WaitScale, W as WalletScreen, aF as ZD_HEAVY_KEY_PREFIX, aG as amountFieldError, aH as apiError, j as assetClassOf, aI as bestOutputOption, aJ as blockLabelFor, aK as bonusFigure, aL as bonusPercentLabel, aM as brokenLaneFor, k as brokenLaneReason, aN as buildCatalogue, aO as canAttachApiKey, aP as categoryLabel, aQ as clampWait, aR as classifyQuoteError, aS as compareAmount, aT as compareDuration, aU as compareFeeUsd, aV as compareHops, aW as compareOptionOf, aX as compareOptionsOf, l as complianceChecks, aY as complianceControlsEvaluated, m as complianceControlsLine, aZ as complianceReasonHead, a_ as complianceReasonTag, a$ as complianceTagOf, n as complianceView, b0 as cornerTags, o as counterpartTokens, b1 as createApiClient, b2 as createVerifier, p as destinationAvailability, b3 as destinationKeys, b4 as directComplianceFromScreens, b5 as distinctScreenedWallets, b6 as estimateBonus, b7 as exceedsLaneLimit, b8 as executableRoutes, b9 as executionChainIds, ba as extraVsFastest, bb as fastestOption, q as formatJurisdiction, bc as fundedByLabel, bd as hasReachableDestination, be as hubDeliverableSymbols, r as humanizeComplianceReason, bf as insteadFigures, bg as isExecutableBridge, bh as isKnownUnbridgeable, bi as isSellableRwa, bj as isSourceToken, bk as laneAvailabilityState, bl as laneKey, bm as laneKeys, bn as laneLimitAmount, bo as laneLimitError, bp as laneLimitFor, bq as laneLimitHint, br as laneLimitSymbol, bs as limitedLanes, bt as pairPromotionsInto, bu as parity, bv as parseAllowedApiBase, bw as parsePromotion, bx as parsePromotions, by as pickForWait, bz as priceCompareOptions, bA as productAssets, bB as promotedAssets, bC as promotionFor, bD as proposedWait, bE as registryRpc, bF as resolveApiBase, bG as resolveConfig, bH as routeBadges, bI as routeShapeLabel, bJ as sameAddress, bK as screeningOutcomeOf, bL as selectableOptions, bM as snapWait, bN as sourceKeys, bO as suppressedLanes, bP as tokenKey, bQ as txMatchesPlan, bR as unattributedComplianceReasons, bS as usdStablePair, bT as visibleOptions, bU as waitFraction, bV as waitFromFraction, bW as waitLabel, bX as waitScaleFor, bY as zdHeavyOptionKey, bZ as zdHeavyUnavailableStatus } from '../verify-mpglrU7n.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. */
|
|
@@ -867,6 +867,186 @@ declare function tokenTicker(token: Pick<Token, "symbol" | "displaySymbol"> | nu
|
|
|
867
867
|
*/
|
|
868
868
|
declare function tickerOn(tokens: readonly Token[] | null | undefined, chainId: number | null | undefined, symbol: string): string;
|
|
869
869
|
|
|
870
|
+
/**
|
|
871
|
+
* ZD Heavy cancel and claim, checked before the wallet opens.
|
|
872
|
+
*
|
|
873
|
+
* zd-api-v2 builds the unsigned transactions (`POST /orders/{orderId}/cancel-tx`, `/claim-tx`) and says
|
|
874
|
+
* where the order's value is (`GET /orders/{orderId}/cancellation`). The gateway is UNTRUSTED, so the
|
|
875
|
+
* widget never signs those bytes blindly: the router must be one this build pins for the chain, the
|
|
876
|
+
* sender the connected wallet, no native value attached, and the calldata must decode — canonically,
|
|
877
|
+
* nothing trailing — to exactly the call the row asked for: a `cancel` of THIS order (its id recomputed
|
|
878
|
+
* from the proof, the proof's header naming this owner and this router), or a `claim` of the asked token
|
|
879
|
+
* paid to this wallet. A transaction that fails any of it is refused and the wallet never sees it.
|
|
880
|
+
*/
|
|
881
|
+
/** zd-api-v2 UnsignedTxEnvelope.data. */
|
|
882
|
+
interface ZdHeavyUnsignedTx {
|
|
883
|
+
purpose: string;
|
|
884
|
+
chainId: string;
|
|
885
|
+
from: string;
|
|
886
|
+
to: string;
|
|
887
|
+
data: string;
|
|
888
|
+
value?: string;
|
|
889
|
+
}
|
|
890
|
+
interface ZdHeavyCancellationPlace {
|
|
891
|
+
kind: "router" | "hub";
|
|
892
|
+
chainId?: number;
|
|
893
|
+
contract: string;
|
|
894
|
+
canCancelInPerson: boolean;
|
|
895
|
+
complete: boolean;
|
|
896
|
+
lots: {
|
|
897
|
+
step: number;
|
|
898
|
+
token: string;
|
|
899
|
+
amount: string;
|
|
900
|
+
key: string;
|
|
901
|
+
}[];
|
|
902
|
+
refunds: {
|
|
903
|
+
txHash: string;
|
|
904
|
+
step: number;
|
|
905
|
+
token: string;
|
|
906
|
+
amount: string;
|
|
907
|
+
to: string;
|
|
908
|
+
}[];
|
|
909
|
+
claimable: {
|
|
910
|
+
payee: string;
|
|
911
|
+
token: string;
|
|
912
|
+
amount: string;
|
|
913
|
+
}[];
|
|
914
|
+
}
|
|
915
|
+
/** zd-api-v2 CancellationPlan (GET /api/v1/orders/{orderId}/cancellation), as far as the widget reads it. */
|
|
916
|
+
interface ZdHeavyCancellationPlan {
|
|
917
|
+
orderId: string;
|
|
918
|
+
ownerType: "evm" | "solana";
|
|
919
|
+
owner: string;
|
|
920
|
+
originChainId: number;
|
|
921
|
+
state: "open" | "cancel_requested" | "refund_complete";
|
|
922
|
+
complete: boolean;
|
|
923
|
+
finished?: boolean;
|
|
924
|
+
places: ZdHeavyCancellationPlace[];
|
|
925
|
+
}
|
|
926
|
+
type ZdHeavyRefund = ZdHeavyCancellationPlace["refunds"][number] & {
|
|
927
|
+
chainId?: number;
|
|
928
|
+
};
|
|
929
|
+
type ZdHeavyRecovery = {
|
|
930
|
+
kind: "delivered";
|
|
931
|
+
} | {
|
|
932
|
+
kind: "refunded";
|
|
933
|
+
refunds: ZdHeavyRefund[];
|
|
934
|
+
} | {
|
|
935
|
+
kind: "claim";
|
|
936
|
+
claims: {
|
|
937
|
+
chainId: number;
|
|
938
|
+
token: string;
|
|
939
|
+
amount: string;
|
|
940
|
+
}[];
|
|
941
|
+
} | {
|
|
942
|
+
kind: "cancel";
|
|
943
|
+
chains: number[];
|
|
944
|
+
requested: boolean;
|
|
945
|
+
} | {
|
|
946
|
+
kind: "waiting";
|
|
947
|
+
} | {
|
|
948
|
+
kind: "not-owner";
|
|
949
|
+
};
|
|
950
|
+
/** Whether a value is a ZD Heavy router order id (a bytes32). Nothing else ever reaches a URL. */
|
|
951
|
+
declare function isZdHeavyOrderId(v: unknown): v is string;
|
|
952
|
+
/**
|
|
953
|
+
* What can be done about a ZD Heavy order, from the plan. A claim owed to the CONNECTED wallet comes
|
|
954
|
+
* first, before anything else — a delivered order can still have a payout parked as claimable for its
|
|
955
|
+
* receiver, who need not be the owner. Then: delivered, refunded, a cancel on every router chain that
|
|
956
|
+
* still holds the order's value, or one pre-emptive cancel while the order is open. Who may cancel is
|
|
957
|
+
* the button's question (the owner), not this one's, so a visitor still reads what the order needs.
|
|
958
|
+
*/
|
|
959
|
+
declare function zdHeavyRecovery(plan: ZdHeavyCancellationPlan, wallet: string | null | undefined): ZdHeavyRecovery;
|
|
960
|
+
/**
|
|
961
|
+
* The cancellation plan for `orderId`, or null when the answer is not one the widget can read. Every
|
|
962
|
+
* field it uses is held to its shape: the plan only decides which button to DRAW (each transaction is
|
|
963
|
+
* still checked before signing), but a malformed plan is "not known", never a confident action.
|
|
964
|
+
*/
|
|
965
|
+
declare function normalizeCancellationPlan(raw: unknown, orderId: string): ZdHeavyCancellationPlan | null;
|
|
966
|
+
/** One read of the order's cancellation plan. Never rejects: anything unreadable is null ("not known"). */
|
|
967
|
+
declare function fetchZdHeavyCancellation(api: Pick<ApiClient, "apiRequest">, orderId: string): Promise<ZdHeavyCancellationPlan | null>;
|
|
968
|
+
/** The gateway's unsigned owner-cancel. UNTRUSTED: hold it with {@link checkZdHeavyCancelTx} before any wallet call. */
|
|
969
|
+
declare function buildZdHeavyCancelTx(api: Pick<ApiClient, "apiRequest">, orderId: string, chainId?: number): Promise<ZdHeavyUnsignedTx>;
|
|
970
|
+
/** The gateway's unsigned claim. UNTRUSTED: hold it with {@link checkZdHeavyClaimTx} before any wallet call. */
|
|
971
|
+
declare function buildZdHeavyClaimTx(api: Pick<ApiClient, "apiRequest">, orderId: string, chainId: number, token: string): Promise<ZdHeavyUnsignedTx>;
|
|
972
|
+
/**
|
|
973
|
+
* The router's `cancel` and both `claim` overloads (zd-config src/abi/zdevm-router.json, zd-evm 701e956):
|
|
974
|
+
* cancel(bytes32 orderId, (uint64 expiryDate, bytes orderHeader, bytes32[] stepHashes) proof, uint256[] keys)
|
|
975
|
+
* claim(address token)
|
|
976
|
+
* claim(address token, address to)
|
|
977
|
+
* Selectors pinned against viem in test/engine/zdheavy-cancel.test.ts.
|
|
978
|
+
*/
|
|
979
|
+
declare const ZDHEAVY_CANCEL_SELECTOR = "0xf26bce2c";
|
|
980
|
+
declare const ZDHEAVY_CLAIM_SELECTOR = "0x1e83409a";
|
|
981
|
+
declare const ZDHEAVY_CLAIM_TO_SELECTOR = "0x21c0b342";
|
|
982
|
+
/** No order has more lots than steps × tokens it touches; 32 is far above any real one (≤ 8 steps). */
|
|
983
|
+
declare const MAX_CANCEL_KEYS = 32;
|
|
984
|
+
interface DecodedZdHeavyCancel {
|
|
985
|
+
orderId: Hex;
|
|
986
|
+
proof: {
|
|
987
|
+
expiryDate: bigint;
|
|
988
|
+
orderHeader: Hex;
|
|
989
|
+
stepHashes: Hex[];
|
|
990
|
+
};
|
|
991
|
+
keys: bigint[];
|
|
992
|
+
}
|
|
993
|
+
declare function decodeZdHeavyCancel(data: string): DecodedZdHeavyCancel;
|
|
994
|
+
declare function decodeZdHeavyClaim(data: string): {
|
|
995
|
+
token: Hex;
|
|
996
|
+
to?: Hex;
|
|
997
|
+
};
|
|
998
|
+
/** The order id the router derives from an owner proof: keccak("ZD/ORDER" ‖ expiry ‖ keccak(header) ‖ stepHashes). */
|
|
999
|
+
declare function orderIdFromProof(expiryDate: bigint, header: Hex, stepHashes: readonly Hex[]): Hex;
|
|
1000
|
+
/** One JSON-RPC read on a chain's bundled (or operator-overridden) RPC — never the registry's: the API
|
|
1001
|
+
* being checked must not pick the node that checks it (`createVerifier` › `bundledRpc`). */
|
|
1002
|
+
type BundledRpc = (chainId: number, method: string, params: unknown[]) => Promise<unknown>;
|
|
1003
|
+
/**
|
|
1004
|
+
* Whether the displayed SOURCE transaction submitted exactly the ZD Heavy order `orderId`.
|
|
1005
|
+
*
|
|
1006
|
+
* Security review 2026-12-01 (finding 1): a history row pairs a transaction hash with an order id, and
|
|
1007
|
+
* both come from the gateway. A hostile gateway could hand back order A's hash (whose amounts the
|
|
1008
|
+
* screen shows) with order B's id — both the user's — and a Cancel would then sign B's genuine proof,
|
|
1009
|
+
* which every byte check accepts because its expected id came from the same gateway. So the id is
|
|
1010
|
+
* re-derived here from the chain: the source transaction is read over the bundled RPC, it must have
|
|
1011
|
+
* succeeded and gone to a router this build pins on that chain, and its `submitOrder` calldata
|
|
1012
|
+
* (`decodeZdHeavySubmit`) must recompute (`orderIdOf`) to `orderId`. Anything else — no RPC, not
|
|
1013
|
+
* found, reverted, another contract, another order — is a refusal: the card draws no action.
|
|
1014
|
+
*/
|
|
1015
|
+
declare function verifyZdHeavySourceOrder(rpc: BundledRpc, chainId: number, hash: string, orderId: string): Promise<{
|
|
1016
|
+
ok: true;
|
|
1017
|
+
} | {
|
|
1018
|
+
ok: false;
|
|
1019
|
+
reason: string;
|
|
1020
|
+
}>;
|
|
1021
|
+
/** A transaction the checks passed, in the exact shape the wallet receives: value is always zero. */
|
|
1022
|
+
interface CheckedZdHeavyAction {
|
|
1023
|
+
ok: true;
|
|
1024
|
+
chainId: number;
|
|
1025
|
+
tx: {
|
|
1026
|
+
from: string;
|
|
1027
|
+
to: string;
|
|
1028
|
+
data: string;
|
|
1029
|
+
value: "0x0";
|
|
1030
|
+
};
|
|
1031
|
+
}
|
|
1032
|
+
type ZdHeavyActionCheck = CheckedZdHeavyAction | {
|
|
1033
|
+
ok: false;
|
|
1034
|
+
reason: string;
|
|
1035
|
+
};
|
|
1036
|
+
/** An owner-cancel built by zd-api-v2, held to this order, this owner and a pinned router. */
|
|
1037
|
+
declare function checkZdHeavyCancelTx(tx: ZdHeavyUnsignedTx, e: {
|
|
1038
|
+
orderId: string;
|
|
1039
|
+
owner: string;
|
|
1040
|
+
chainId?: number;
|
|
1041
|
+
lotKeys?: readonly string[];
|
|
1042
|
+
}): ZdHeavyActionCheck;
|
|
1043
|
+
/** A claim built by zd-api-v2: claim(token) or claim(token, to) of the asked token, paid to this wallet. */
|
|
1044
|
+
declare function checkZdHeavyClaimTx(tx: ZdHeavyUnsignedTx, e: {
|
|
1045
|
+
owner: string;
|
|
1046
|
+
chainId: number;
|
|
1047
|
+
token: string;
|
|
1048
|
+
}): ZdHeavyActionCheck;
|
|
1049
|
+
|
|
870
1050
|
declare const STABLEGENIE_INTENT_VERSION = 1;
|
|
871
1051
|
declare const STABLEGENIE_INTENT_TTL_MS: number;
|
|
872
1052
|
declare const STABLEGENIE_SUPPORTED_CHAIN_IDS: readonly number[];
|
|
@@ -1032,6 +1212,19 @@ interface Engine {
|
|
|
1032
1212
|
previewSolanaSource: (input: Parameters<typeof previewSolanaSource>[1]) => Promise<SwapPreview>;
|
|
1033
1213
|
/** Where an order is on its journey, by its source transaction hash. Display only; never rejects. */
|
|
1034
1214
|
trackDelivery: (hash: string) => Promise<DeliveryStatus>;
|
|
1215
|
+
/** A ZD Heavy order's cancellation plan (`GET /orders/{orderId}/cancellation`). Never rejects: null is "not known". */
|
|
1216
|
+
fetchZdHeavyCancellation: (orderId: string) => Promise<ZdHeavyCancellationPlan | null>;
|
|
1217
|
+
/** The gateway's UNSIGNED owner-cancel. Untrusted: hold it with `checkZdHeavyCancelTx` before any wallet call. */
|
|
1218
|
+
buildZdHeavyCancelTx: (orderId: string, chainId?: number) => Promise<ZdHeavyUnsignedTx>;
|
|
1219
|
+
/** The gateway's UNSIGNED claim. Untrusted: hold it with `checkZdHeavyClaimTx` before any wallet call. */
|
|
1220
|
+
buildZdHeavyClaimTx: (orderId: string, chainId: number, token: string) => Promise<ZdHeavyUnsignedTx>;
|
|
1221
|
+
/** Whether the SOURCE transaction `hash` on `chainId` submitted exactly the ZD Heavy order `orderId` (bundled RPC). */
|
|
1222
|
+
verifyZdHeavySourceOrder: (chainId: number, hash: string, orderId: string) => Promise<{
|
|
1223
|
+
ok: true;
|
|
1224
|
+
} | {
|
|
1225
|
+
ok: false;
|
|
1226
|
+
reason: string;
|
|
1227
|
+
}>;
|
|
1035
1228
|
/** The gateway's orders for these wallets (EVM and/or Solana), newest first; null when unreadable. */
|
|
1036
1229
|
fetchWalletHistory: (wallets: readonly string[]) => Promise<SanitizedTxEntry[] | null>;
|
|
1037
1230
|
/** The two-click flow: preparation, then the submit on its own click. */
|
|
@@ -1069,4 +1262,4 @@ interface Engine {
|
|
|
1069
1262
|
/** Create an engine bound to a config. Its 60s registry cache is shared with every engine of the same base and key (api.ts › registryCacheFor). */
|
|
1070
1263
|
declare function createEngine(config?: EngineConfig): Engine;
|
|
1071
1264
|
|
|
1072
|
-
export { API_CACHE_TTL_MS, ApiClient, type AssertQuoteArgs, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, BUNDLED_SOLANA_RPC, BalanceEntry, type BalanceReader, BalanceTarget, type BuildPayOptionsArgs, type BuildRouteArgs, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CANONICAL_SOLANA_PROGRAM, CHAIN_DISPLAY_NAMES, Catalogue, Chain, Compliance, DEFAULT_WIDGET_API_BASE, type DecodedOrderRequest, type DecodedSubmitOrder, type DeliveryPhase, type DeliveryStatus, type DeliveryStep, ERC20_ALLOWANCE_SELECTOR, ERC20_APPROVE_SELECTOR, ERC20_BALANCEOF_SELECTOR, ERC20_TRANSFER_SELECTOR, EXECUTABLE_STABLE_ASSETS, type Engine, EngineConfig, ExchangeProduct, type ExpectedOrder, 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, type NativeSolanaOption, type NativeSolanaQuote, type NativeSolanaQuoteRequest, NormalizedOrder, OrderRequest, PREVIEW_OWNER, type ParsedSolanaTransaction, PayOption, type PayRequest, type PaymentWalletContext, Plan, PlannedTx, Promotion, QUOTE_BUFFER_BPS, Quote, Route, RouteResult, RwaVault, SAME_CLASS_STABLE, SCREEN_CACHE_TTL_MS, SOLANA_CHAIN_ID, SOLANA_DESTINATION_ASSETS, SOL_SHORTFALL_MESSAGE, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_DISCRIMINATOR, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, SanitizedTxEntry, type SolanaBridge, type SolanaOrderCost, type SolanaProgress, type SolanaProgressStage, type SolanaRpc, type SolanaRpcAccount, SolanaSendError, type SolanaSigner, type SolanaSourceInput, type SolanaSourcePlan, type SolanaSourcePreview, type SolanaSubmitOrder, type SolanaTransaction, type SolveArgs, SolveResult, SwapInput, type SwapPreview, TOKEN_2022_PROGRAM, TOKEN_PROGRAM, TRACKING, TRADEABLE_RWA_ASSETS, Token, TxHistoryEntry, type ValidatedSwap, Verifier, WALLET_HISTORY_LIMIT, ZERO_ADDRESS, addressWord, allowanceCovers, applyLayerZeroBuffer, askCovers, askTokenDecimals, assertAddress, assertChainAddress, assertQuoteMatchesSelection, assertWalletMessage, assetDecimals, associatedTokenAddress, base58Decode, base58Encode, base64Decode, base64Encode, buildPayOptions, buildRoute, buildSolanaSourcePlan, buildSwapPlan, bytes32Word, bytesEqual, bytesPayload, chainAddressKey, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, checkSolanaPlan as checkPlan, checkSolanaPlan, checkSolanaProgram, checkSolanaReceiver, checkSolanaRouteBuffer, cosignSolanaEvent, createEngine, createSolanaRpc, decodeSolanaSubmitOrder, decodeSolanaSubmitOrder as decodeSubmitOrder, decodeSubmitOrderCalldata, deriveSolanaEvent, encodeAllowance, encodeApprove, encodeBalanceOf, encodeNextSolanaOrders, encodeSubmitOrder, encodeTransfer, executeSolanaPlan, executeSolanaPlanStaged, expectedSolanaDelivery, fetchDelivery, fetchPaymentPlan, fetchWalletHistory, finalOf, findProgramAddress, findToken, foldTicker, formatNative, formatUnits, hexBytes, hexToSolanaKey, historyEntryFromOrder, historyKey, isAddress, isChainAddress, isDeliverable, isHexAddress, isHexData, isHexQuantity, isLayerZeroRoute, isOnEd25519Curve, isPreparationInstruction, isSolanaAddress, isSolanaChainId, isSubmitOrder, maxDeadlineSeconds, maxNativeFeeWei, mergeHistory, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeDelivery, normalizeOrderRequest, normalizeOrderRequests, overwriteBlockhash, parseAddressLookupTable, parseSolanaTransaction, parseUnitsDecimal, placeSignature, planErrorSummary, planMsgValueHex, pollSolanaConfirmation, previewSolanaSource, quotePartnerId, quotePayOption, quoteSolanaSource, quoteSwapPreview, readSolanaBalance, recommendedDeadlineSeconds, requiresNativeBridgeFee, resolveSolanaKeys, resolveSwapReceiver, resolveVaultIcon, resultForOption, routeNativeValue, safeTicker, scaleDecimals, serializeSolanaTransaction, sha256, simulateSolanaCost, solanaBridgeOf, solanaDestinationAsset, solanaKeyBytes, solanaKeyHex, solanaLamportShortfall, solanaPlanNeedsPreparation, solanaQuoteCompliance, solveExactIn, solveExactOut, stableGenieIntentSchema, strip0x, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenTicker, uint64Word, uintWord, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, verifySolanaSubmit, verifySolanaTransaction, verifySolanaSubmit as verifySubmit, verifySolanaTransaction as verifyTransaction, withVaultArtwork };
|
|
1265
|
+
export { API_CACHE_TTL_MS, ApiClient, type AssertQuoteArgs, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, BUNDLED_SOLANA_RPC, BalanceEntry, type BalanceReader, BalanceTarget, type BuildPayOptionsArgs, type BuildRouteArgs, type BundledRpc, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CANONICAL_SOLANA_PROGRAM, CHAIN_DISPLAY_NAMES, Catalogue, Chain, type CheckedZdHeavyAction, Compliance, DEFAULT_WIDGET_API_BASE, type DecodedOrderRequest, type DecodedSubmitOrder, type DecodedZdHeavyCancel, type DeliveryPhase, type DeliveryStatus, type DeliveryStep, ERC20_ALLOWANCE_SELECTOR, ERC20_APPROVE_SELECTOR, ERC20_BALANCEOF_SELECTOR, ERC20_TRANSFER_SELECTOR, EXECUTABLE_STABLE_ASSETS, type Engine, EngineConfig, ExchangeProduct, type ExpectedOrder, FetchQuoteFn, Hex, LZ_FEE_BUFFER_BPS, MAX_CANCEL_KEYS, 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, type NativeSolanaOption, type NativeSolanaQuote, type NativeSolanaQuoteRequest, NormalizedOrder, OrderRequest, PREVIEW_OWNER, type ParsedSolanaTransaction, PayOption, type PayRequest, type PaymentWalletContext, Plan, PlannedTx, Promotion, QUOTE_BUFFER_BPS, Quote, Route, RouteResult, RwaVault, SAME_CLASS_STABLE, SCREEN_CACHE_TTL_MS, SOLANA_CHAIN_ID, SOLANA_DESTINATION_ASSETS, SOL_SHORTFALL_MESSAGE, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_DISCRIMINATOR, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, SanitizedTxEntry, type SolanaBridge, type SolanaOrderCost, type SolanaProgress, type SolanaProgressStage, type SolanaRpc, type SolanaRpcAccount, SolanaSendError, type SolanaSigner, type SolanaSourceInput, type SolanaSourcePlan, type SolanaSourcePreview, type SolanaSubmitOrder, type SolanaTransaction, type SolveArgs, SolveResult, SwapInput, type SwapPreview, TOKEN_2022_PROGRAM, TOKEN_PROGRAM, TRACKING, TRADEABLE_RWA_ASSETS, Token, TxHistoryEntry, type ValidatedSwap, Verifier, WALLET_HISTORY_LIMIT, ZDHEAVY_CANCEL_SELECTOR, ZDHEAVY_CLAIM_SELECTOR, ZDHEAVY_CLAIM_TO_SELECTOR, ZERO_ADDRESS, type ZdHeavyActionCheck, type ZdHeavyCancellationPlace, type ZdHeavyCancellationPlan, type ZdHeavyRecovery, type ZdHeavyRefund, type ZdHeavyUnsignedTx, addressWord, allowanceCovers, applyLayerZeroBuffer, askCovers, askTokenDecimals, assertAddress, assertChainAddress, assertQuoteMatchesSelection, assertWalletMessage, assetDecimals, associatedTokenAddress, base58Decode, base58Encode, base64Decode, base64Encode, buildPayOptions, buildRoute, buildSolanaSourcePlan, buildSwapPlan, buildZdHeavyCancelTx, buildZdHeavyClaimTx, bytes32Word, bytesEqual, bytesPayload, chainAddressKey, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, checkSolanaPlan as checkPlan, checkSolanaPlan, checkSolanaProgram, checkSolanaReceiver, checkSolanaRouteBuffer, checkZdHeavyCancelTx, checkZdHeavyClaimTx, cosignSolanaEvent, createEngine, createSolanaRpc, decodeSolanaSubmitOrder, decodeSolanaSubmitOrder as decodeSubmitOrder, decodeSubmitOrderCalldata, decodeZdHeavyCancel, decodeZdHeavyClaim, deriveSolanaEvent, encodeAllowance, encodeApprove, encodeBalanceOf, encodeNextSolanaOrders, encodeSubmitOrder, encodeTransfer, executeSolanaPlan, executeSolanaPlanStaged, expectedSolanaDelivery, fetchDelivery, fetchPaymentPlan, fetchWalletHistory, fetchZdHeavyCancellation, finalOf, findProgramAddress, findToken, foldTicker, formatNative, formatUnits, hexBytes, hexToSolanaKey, historyEntryFromOrder, historyKey, isAddress, isChainAddress, isDeliverable, isHexAddress, isHexData, isHexQuantity, isLayerZeroRoute, isOnEd25519Curve, isPreparationInstruction, isSolanaAddress, isSolanaChainId, isSubmitOrder, isZdHeavyOrderId, maxDeadlineSeconds, maxNativeFeeWei, mergeHistory, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeCancellationPlan, normalizeDecimalText, normalizeDelivery, normalizeOrderRequest, normalizeOrderRequests, orderIdFromProof, overwriteBlockhash, parseAddressLookupTable, parseSolanaTransaction, parseUnitsDecimal, placeSignature, planErrorSummary, planMsgValueHex, pollSolanaConfirmation, previewSolanaSource, quotePartnerId, quotePayOption, quoteSolanaSource, quoteSwapPreview, readSolanaBalance, recommendedDeadlineSeconds, requiresNativeBridgeFee, resolveSolanaKeys, resolveSwapReceiver, resolveVaultIcon, resultForOption, routeNativeValue, safeTicker, scaleDecimals, serializeSolanaTransaction, sha256, simulateSolanaCost, solanaBridgeOf, solanaDestinationAsset, solanaKeyBytes, solanaKeyHex, solanaLamportShortfall, solanaPlanNeedsPreparation, solanaQuoteCompliance, solveExactIn, solveExactOut, stableGenieIntentSchema, strip0x, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenTicker, uint64Word, uintWord, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, verifySolanaSubmit, verifySolanaTransaction, verifySolanaSubmit as verifySubmit, verifySolanaTransaction as verifyTransaction, verifyZdHeavySourceOrder, withVaultArtwork, zdHeavyRecovery };
|
package/dist/core/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { API_CACHE_TTL_MS, BLOCK_LABEL_DEFAULT, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, BUNDLED_SOLANA_RPC, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CANONICAL_SOLANA_PROGRAM, CENTIBIPS_PER_UNIT, 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_QUOTE_CARDS, MAX_SAME_CLASS_PAY_BPS, MAX_UINT64, NO_PARTNER_ID, PREVIEW_OWNER, QUOTE_BUFFER_BPS, SAME_CLASS_STABLE, SCREENING_BUCKETS, SCREEN_CACHE_TTL_MS, SOLANA_CHAIN_ID, SOLANA_DESTINATION_ASSETS, SOL_SHORTFALL_MESSAGE, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_DISCRIMINATOR, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, SolanaSendError, TOKEN_2022_PROGRAM, TOKEN_PROGRAM, TRACKING, TRADEABLE_RWA_ASSETS, TUNABLE_CATEGORIES, WAIT_MAX_SEC, WAIT_MIN_SEC, WAIT_POSITIONS, WAIT_STEP_SEC, WALLET_HISTORY_LIMIT, ZD_HEAVY_KEY_PREFIX, ZERO_ADDRESS, addressWord, allowanceCovers, amountFieldError, apiError, applyLayerZeroBuffer, askCovers, askTokenDecimals, assertAddress, assertChainAddress, assertQuoteMatchesSelection, assertWalletMessage, assetClassOf, assetDecimals, associatedTokenAddress, base58Decode, base58Encode, base64Decode, base64Encode, bestOutputOption, blockLabelFor, bonusFigure, bonusPercentLabel, brokenLaneFor, brokenLaneReason, buildCatalogue, buildPayOptions, buildRoute, buildSolanaSourcePlan, buildSwapPlan, bytes32Word, bytesEqual, bytesPayload, canAttachApiKey, categoryLabel, chainAddressKey, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, checkSolanaPlan as checkPlan, checkSolanaPlan, checkSolanaProgram, checkSolanaReceiver, checkSolanaRouteBuffer, clampWait, classifyQuoteError, compareAmount, compareDuration, compareFeeUsd, compareHops, compareOptionOf, compareOptionsOf, complianceChecks, complianceControlsEvaluated, complianceControlsLine, complianceReasonHead, complianceReasonTag, complianceTagOf, complianceView, cornerTags, cosignSolanaEvent, counterpartTokens, createApiClient, createEngine, createSolanaRpc, createVerifier, decodeSolanaSubmitOrder, decodeSolanaSubmitOrder as decodeSubmitOrder, decodeSubmitOrderCalldata, deriveSolanaEvent, destinationAvailability, destinationKeys, directComplianceFromScreens, distinctScreenedWallets, encodeAllowance, encodeApprove, encodeBalanceOf, encodeNextSolanaOrders, encodeSubmitOrder, encodeTransfer, estimateBonus, exceedsLaneLimit, executableRoutes, executeSolanaPlan, executeSolanaPlanStaged, executionChainIds, expectedSolanaDelivery, extraVsFastest, fastestOption, fetchDelivery, fetchPaymentPlan, fetchWalletHistory, finalOf, findProgramAddress, findToken, foldTicker, formatJurisdiction, formatNative, formatUnits, fundedByLabel, hasReachableDestination, hexBytes, hexToSolanaKey, historyEntryFromOrder, historyKey, hubDeliverableSymbols, humanizeComplianceReason, insteadFigures, isAddress, isChainAddress, isDeliverable, isExecutableBridge, isHexAddress, isHexData, isHexQuantity, isKnownUnbridgeable, isLayerZeroRoute, isOnEd25519Curve, isPreparationInstruction, isSellableRwa, isSolanaAddress, isSolanaChainId, isSourceToken, isSubmitOrder, laneAvailabilityState, laneKey, laneKeys, laneLimitAmount, laneLimitError, laneLimitFor, laneLimitHint, laneLimitSymbol, limitedLanes, maxDeadlineSeconds, maxNativeFeeWei, mergeHistory, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeDelivery, normalizeOrderRequest, normalizeOrderRequests, overwriteBlockhash, pairPromotionsInto, parity, parseAddressLookupTable, parseAllowedApiBase, parsePromotion, parsePromotions, parseSolanaTransaction, parseUnitsDecimal, pickForWait, placeSignature, planErrorSummary, planMsgValueHex, pollSolanaConfirmation, previewSolanaSource, priceCompareOptions, productAssets, promotedAssets, promotionFor, proposedWait, quotePartnerId, quotePayOption, quoteSolanaSource, quoteSwapPreview, readSolanaBalance, recommendedDeadlineSeconds, registryRpc, requiresNativeBridgeFee, resolveApiBase, resolveConfig, resolveSolanaKeys, resolveSwapReceiver, resolveVaultIcon, resultForOption, routeBadges, routeNativeValue, routeShapeLabel, safeTicker, sameAddress, scaleDecimals, screeningOutcomeOf, selectableOptions, serializeSolanaTransaction, sha256, simulateSolanaCost, snapWait, solanaBridgeOf, solanaDestinationAsset, solanaKeyBytes, solanaKeyHex, solanaLamportShortfall, solanaPlanNeedsPreparation, solanaQuoteCompliance, solveExactIn, solveExactOut, sourceKeys, stableGenieIntentSchema, strip0x, suppressedLanes, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenKey, tokenTicker, txMatchesPlan, uint64Word, uintWord, unattributedComplianceReasons, usdStablePair, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, verifySolanaSubmit, verifySolanaTransaction, verifySolanaSubmit as verifySubmit, verifySolanaTransaction as verifyTransaction, visibleOptions, waitFraction, waitFromFraction, waitLabel, waitScaleFor, withVaultArtwork, zdHeavyOptionKey, zdHeavyUnavailableStatus } from '../chunk-
|
|
1
|
+
export { API_CACHE_TTL_MS, BLOCK_LABEL_DEFAULT, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, BUNDLED_SOLANA_RPC, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CANONICAL_SOLANA_PROGRAM, CENTIBIPS_PER_UNIT, 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_CANCEL_KEYS, MAX_LZ_MSG_VALUE_WEI, MAX_LZ_MSG_VALUE_WEI_BY_CHAIN, MAX_QUOTE_CANDIDATES, MAX_QUOTE_CARDS, MAX_SAME_CLASS_PAY_BPS, MAX_UINT64, NO_PARTNER_ID, PREVIEW_OWNER, QUOTE_BUFFER_BPS, SAME_CLASS_STABLE, SCREENING_BUCKETS, SCREEN_CACHE_TTL_MS, SOLANA_CHAIN_ID, SOLANA_DESTINATION_ASSETS, SOL_SHORTFALL_MESSAGE, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_DISCRIMINATOR, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, SolanaSendError, TOKEN_2022_PROGRAM, TOKEN_PROGRAM, TRACKING, TRADEABLE_RWA_ASSETS, TUNABLE_CATEGORIES, WAIT_MAX_SEC, WAIT_MIN_SEC, WAIT_POSITIONS, WAIT_STEP_SEC, WALLET_HISTORY_LIMIT, ZDHEAVY_CANCEL_SELECTOR, ZDHEAVY_CLAIM_SELECTOR, ZDHEAVY_CLAIM_TO_SELECTOR, ZD_HEAVY_KEY_PREFIX, ZERO_ADDRESS, addressWord, allowanceCovers, amountFieldError, apiError, applyLayerZeroBuffer, askCovers, askTokenDecimals, assertAddress, assertChainAddress, assertQuoteMatchesSelection, assertWalletMessage, assetClassOf, assetDecimals, associatedTokenAddress, base58Decode, base58Encode, base64Decode, base64Encode, bestOutputOption, blockLabelFor, bonusFigure, bonusPercentLabel, brokenLaneFor, brokenLaneReason, buildCatalogue, buildPayOptions, buildRoute, buildSolanaSourcePlan, buildSwapPlan, buildZdHeavyCancelTx, buildZdHeavyClaimTx, bytes32Word, bytesEqual, bytesPayload, canAttachApiKey, categoryLabel, chainAddressKey, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, checkSolanaPlan as checkPlan, checkSolanaPlan, checkSolanaProgram, checkSolanaReceiver, checkSolanaRouteBuffer, checkZdHeavyCancelTx, checkZdHeavyClaimTx, clampWait, classifyQuoteError, compareAmount, compareDuration, compareFeeUsd, compareHops, compareOptionOf, compareOptionsOf, complianceChecks, complianceControlsEvaluated, complianceControlsLine, complianceReasonHead, complianceReasonTag, complianceTagOf, complianceView, cornerTags, cosignSolanaEvent, counterpartTokens, createApiClient, createEngine, createSolanaRpc, createVerifier, decodeSolanaSubmitOrder, decodeSolanaSubmitOrder as decodeSubmitOrder, decodeSubmitOrderCalldata, decodeZdHeavyCancel, decodeZdHeavyClaim, deriveSolanaEvent, destinationAvailability, destinationKeys, directComplianceFromScreens, distinctScreenedWallets, encodeAllowance, encodeApprove, encodeBalanceOf, encodeNextSolanaOrders, encodeSubmitOrder, encodeTransfer, estimateBonus, exceedsLaneLimit, executableRoutes, executeSolanaPlan, executeSolanaPlanStaged, executionChainIds, expectedSolanaDelivery, extraVsFastest, fastestOption, fetchDelivery, fetchPaymentPlan, fetchWalletHistory, fetchZdHeavyCancellation, finalOf, findProgramAddress, findToken, foldTicker, formatJurisdiction, formatNative, formatUnits, fundedByLabel, hasReachableDestination, hexBytes, hexToSolanaKey, historyEntryFromOrder, historyKey, hubDeliverableSymbols, humanizeComplianceReason, insteadFigures, isAddress, isChainAddress, isDeliverable, isExecutableBridge, isHexAddress, isHexData, isHexQuantity, isKnownUnbridgeable, isLayerZeroRoute, isOnEd25519Curve, isPreparationInstruction, isSellableRwa, isSolanaAddress, isSolanaChainId, isSourceToken, isSubmitOrder, isZdHeavyOrderId, laneAvailabilityState, laneKey, laneKeys, laneLimitAmount, laneLimitError, laneLimitFor, laneLimitHint, laneLimitSymbol, limitedLanes, maxDeadlineSeconds, maxNativeFeeWei, mergeHistory, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeCancellationPlan, normalizeDecimalText, normalizeDelivery, normalizeOrderRequest, normalizeOrderRequests, orderIdFromProof, overwriteBlockhash, pairPromotionsInto, parity, parseAddressLookupTable, parseAllowedApiBase, parsePromotion, parsePromotions, parseSolanaTransaction, parseUnitsDecimal, pickForWait, placeSignature, planErrorSummary, planMsgValueHex, pollSolanaConfirmation, previewSolanaSource, priceCompareOptions, productAssets, promotedAssets, promotionFor, proposedWait, quotePartnerId, quotePayOption, quoteSolanaSource, quoteSwapPreview, readSolanaBalance, recommendedDeadlineSeconds, registryRpc, requiresNativeBridgeFee, resolveApiBase, resolveConfig, resolveSolanaKeys, resolveSwapReceiver, resolveVaultIcon, resultForOption, routeBadges, routeNativeValue, routeShapeLabel, safeTicker, sameAddress, scaleDecimals, screeningOutcomeOf, selectableOptions, serializeSolanaTransaction, sha256, simulateSolanaCost, snapWait, solanaBridgeOf, solanaDestinationAsset, solanaKeyBytes, solanaKeyHex, solanaLamportShortfall, solanaPlanNeedsPreparation, solanaQuoteCompliance, solveExactIn, solveExactOut, sourceKeys, stableGenieIntentSchema, strip0x, suppressedLanes, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenKey, tokenTicker, txMatchesPlan, uint64Word, uintWord, unattributedComplianceReasons, usdStablePair, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, verifySolanaSubmit, verifySolanaTransaction, verifySolanaSubmit as verifySubmit, verifySolanaTransaction as verifyTransaction, verifyZdHeavySourceOrder, visibleOptions, waitFraction, waitFromFraction, waitLabel, waitScaleFor, withVaultArtwork, zdHeavyOptionKey, zdHeavyRecovery, zdHeavyUnavailableStatus } from '../chunk-6TCVZRNB.js';
|