@glacislabs/stablegenie-zerodelta 4.20.1 → 4.22.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-4WBNXYOV.js → chunk-UBSZA63S.js} +504 -50
- package/dist/{chunk-RUHREVDT.js → chunk-UIIH5O6G.js} +439 -40
- package/dist/core/index.cjs +454 -39
- 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 +970 -117
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/{mount-D2tDkHea.d.cts → mount-DC_JT0cE.d.cts} +1 -1
- package/dist/{mount-DuTF5CQV.d.ts → mount-GOYY_jNr.d.ts} +1 -1
- package/dist/mount.cjs +970 -117
- 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-UqDjAVxa.d.cts → verify-mpglrU7n.d.cts} +21 -2
- package/dist/{verify-UqDjAVxa.d.ts → verify-mpglrU7n.d.ts} +21 -2
- package/package.json +1 -1
|
@@ -538,6 +538,7 @@ interface RwaVault {
|
|
|
538
538
|
[k: string]: unknown;
|
|
539
539
|
}
|
|
540
540
|
interface Route {
|
|
541
|
+
isQuotable?: boolean;
|
|
541
542
|
tokenId?: string;
|
|
542
543
|
tokenName?: string;
|
|
543
544
|
fromChainId: number;
|
|
@@ -546,6 +547,8 @@ interface Route {
|
|
|
546
547
|
* be bridgeable from one chain and not another, and only the pair says which. */
|
|
547
548
|
fromAddress?: string;
|
|
548
549
|
toAddress?: string;
|
|
550
|
+
fromSymbol?: string;
|
|
551
|
+
toSymbol?: string;
|
|
549
552
|
bridge?: string;
|
|
550
553
|
standard?: string;
|
|
551
554
|
isEnabled?: boolean;
|
|
@@ -914,6 +917,14 @@ interface SanitizedTxEntry {
|
|
|
914
917
|
/** Where the ORDER is, from the gateway's tracker, when the history was read from it. `status` is
|
|
915
918
|
* only the source transaction; this is whether the destination received the funds. Never stored. */
|
|
916
919
|
delivery?: "in-progress" | "attention" | "delivered" | "failed";
|
|
920
|
+
/** The gateway's word behind `delivery` (`cancelled`, `fill_failed`…), when read from it. Never stored. */
|
|
921
|
+
deliveryStatus?: string;
|
|
922
|
+
/** The order protocol the gateway reports for this row (`zdlite`, `zdheavy`). Never stored. */
|
|
923
|
+
protocol?: string;
|
|
924
|
+
/** The order's id as the gateway reports it (a ZD Heavy router order id is a bytes32). Never stored. */
|
|
925
|
+
orderId?: string;
|
|
926
|
+
/** The gateway says a payout of this order is parked for its receiver to claim. Never stored. */
|
|
927
|
+
claimable?: boolean;
|
|
917
928
|
at: string;
|
|
918
929
|
/** The orders this transaction submitted, first to last. Absent on entries persisted before legs
|
|
919
930
|
* were recorded (2026-09-09); the UI falls back to the single from → to summary for those. */
|
|
@@ -1280,6 +1291,9 @@ interface CatalogueContext {
|
|
|
1280
1291
|
* work; this says what was actually tried and did not.
|
|
1281
1292
|
*/
|
|
1282
1293
|
brokenLanes?: ReadonlyMap<string, BrokenLane>;
|
|
1294
|
+
/** Mirrors zd-dapp src/pages/Swap.tsx extraCat: exact quotable Heavy lanes and sources. */
|
|
1295
|
+
zdHeavyLanes?: ReadonlySet<string>;
|
|
1296
|
+
zdHeavySources?: ReadonlySet<string>;
|
|
1283
1297
|
}
|
|
1284
1298
|
/**
|
|
1285
1299
|
* Can this deployment fund a payment?
|
|
@@ -1288,7 +1302,7 @@ interface CatalogueContext {
|
|
|
1288
1302
|
* that chain safe to transact on: a source must also be a chain this widget pins an escrow and a
|
|
1289
1303
|
* bundled RPC for, because that is where `approve`, `submitOrder` and settlement verification run.
|
|
1290
1304
|
*/
|
|
1291
|
-
declare function isSourceToken(token: Token, ctx: Pick<CatalogueContext, "source" | "execution" | "sourceChains">): boolean;
|
|
1305
|
+
declare function isSourceToken(token: Token, ctx: Pick<CatalogueContext, "source" | "execution" | "sourceChains" | "zdHeavySources">): boolean;
|
|
1292
1306
|
/**
|
|
1293
1307
|
* `available` — we can deliver this token on this chain.
|
|
1294
1308
|
* `hub-only` — the asset exists here but we cannot deliver it here; it IS deliverable on an
|
|
@@ -1336,6 +1350,8 @@ interface CatalogueInput {
|
|
|
1336
1350
|
chains: readonly Chain[];
|
|
1337
1351
|
tokens: readonly Token[];
|
|
1338
1352
|
routes: readonly Route[];
|
|
1353
|
+
/** Quotable Heavy lanes added independently of the Lite bridge-family rules. */
|
|
1354
|
+
zdHeavyRoutes?: readonly Route[];
|
|
1339
1355
|
/** Which product this catalogue is for. Defaults to `"stable"`. */
|
|
1340
1356
|
product?: ExchangeProduct;
|
|
1341
1357
|
/** A host narrowing, INTERSECTED with the product's own universe. Omit for the whole product. */
|
|
@@ -1572,6 +1588,7 @@ interface ApiClient {
|
|
|
1572
1588
|
fetchChains: () => Promise<Chain[]>;
|
|
1573
1589
|
fetchTokens: () => Promise<Token[]>;
|
|
1574
1590
|
fetchRoutes: () => Promise<Route[]>;
|
|
1591
|
+
fetchZdHeavyRoutes: () => Promise<Route[]>;
|
|
1575
1592
|
/** Measured lane health. NEVER rejects — see the implementation. */
|
|
1576
1593
|
fetchRouteHealth: () => Promise<RouteHealth | null>;
|
|
1577
1594
|
/** The RWA vault catalogue, read ONLY for its artwork. NEVER rejects — see the implementation. */
|
|
@@ -1646,6 +1663,8 @@ interface BalanceEntry {
|
|
|
1646
1663
|
}
|
|
1647
1664
|
interface Verifier {
|
|
1648
1665
|
readZdHeavySubmitFee: (chainId: number, to: string, data: string) => Promise<bigint | undefined>;
|
|
1666
|
+
/** One read on the chain's BUNDLED (or overridden) RPC, never the registry's. Rejects when there is none. */
|
|
1667
|
+
bundledRpc: (chainId: number, method: string, params: unknown[]) => Promise<unknown>;
|
|
1649
1668
|
payerNonceBaseline: (chainId: number, account: string) => Promise<number | null>;
|
|
1650
1669
|
verifySubmittedTx: (args: {
|
|
1651
1670
|
chainId: number;
|
|
@@ -1666,4 +1685,4 @@ interface Verifier {
|
|
|
1666
1685
|
}
|
|
1667
1686
|
declare function createVerifier(api: ApiClient, fetchImpl: typeof fetch, rpcOverrides?: Record<number, string>): Verifier;
|
|
1668
1687
|
|
|
1669
|
-
export { type
|
|
1688
|
+
export { type CatalogueInput as $, type Availability as A, type BrokenLane as B, type Compliance as C, type Verifier as D, type EngineConfig as E, type FetchQuoteFn as F, type Promotion as G, type Hex as H, type Address as I, type ApiError as J, BLOCK_LABEL_DEFAULT as K, type LaneLimit as L, type BonusInputs as M, type NormalizedOrder as N, type OrderRequest as O, type Plan as P, type Quote as Q, type Route as R, type SanitizedTxEntry as S, type Token as T, CENTIBIPS_PER_UNIT as U, type VerifyResult as V, type WalletScreen as W, COMPLIANCE_CHECK_ORDER as X, COMPLIANCE_DENY_LABEL as Y, type ZdHeavyExpected as Z, type CatalogueContext as _, type Catalogue as a, complianceTagOf as a$, type CompareContext as a0, type CompareHop as a1, type CompareOption as a2, type ComplianceCheckId as a3, type ComplianceDecision as a4, type CornerTag as a5, DIRECT_CHECK_IDS as a6, DIRECT_SCOPE_NOTE as a7, type Destination as a8, FLOOR_CATEGORIES as a9, WAIT_MAX_SEC as aA, WAIT_MIN_SEC as aB, WAIT_POSITIONS as aC, WAIT_STEP_SEC as aD, type WaitScale as aE, ZD_HEAVY_KEY_PREFIX as aF, amountFieldError as aG, apiError as aH, bestOutputOption as aI, blockLabelFor as aJ, bonusFigure as aK, bonusPercentLabel as aL, brokenLaneFor as aM, buildCatalogue as aN, canAttachApiKey as aO, categoryLabel as aP, clampWait as aQ, classifyQuoteError as aR, compareAmount as aS, compareDuration as aT, compareFeeUsd as aU, compareHops as aV, compareOptionOf as aW, compareOptionsOf as aX, complianceControlsEvaluated as aY, complianceReasonHead as aZ, complianceReasonTag as a_, type GatewayEvmTx as aa, type InsteadFigures as ab, type LaneAvailabilityState as ac, MAX_QUOTE_CARDS as ad, type Parity as ae, type PlannedTxKind as af, type PromotedAsset as ag, type PromotedNetwork as ah, type PromotionFunder as ai, type PromotionKind as aj, type PromotionToken as ak, type QuoteBlock as al, type QuoteOption as am, type ResolvedConfig as an, type RouteBadge as ao, type RouteHealth as ap, type RouteHealthAvailability as aq, type RouteHealthLane as ar, SCREENING_BUCKETS as as, type ScreenProvider as at, type ScreeningBucket as au, type ScreeningOutcome as av, type SwapEnds as aw, TUNABLE_CATEGORIES as ax, type TagTone as ay, type TxPlan as az, type Chain as b, cornerTags as b0, createApiClient as b1, createVerifier as b2, destinationKeys as b3, directComplianceFromScreens as b4, distinctScreenedWallets as b5, estimateBonus as b6, exceedsLaneLimit as b7, executableRoutes as b8, executionChainIds as b9, productAssets as bA, promotedAssets as bB, promotionFor as bC, proposedWait as bD, registryRpc as bE, resolveApiBase as bF, resolveConfig as bG, routeBadges as bH, routeShapeLabel as bI, sameAddress as bJ, screeningOutcomeOf as bK, selectableOptions as bL, snapWait as bM, sourceKeys as bN, suppressedLanes as bO, tokenKey as bP, txMatchesPlan as bQ, unattributedComplianceReasons as bR, usdStablePair as bS, visibleOptions as bT, waitFraction as bU, waitFromFraction as bV, waitLabel as bW, waitScaleFor as bX, zdHeavyOptionKey as bY, zdHeavyUnavailableStatus as bZ, extraVsFastest as ba, fastestOption as bb, fundedByLabel as bc, hasReachableDestination as bd, hubDeliverableSymbols as be, insteadFigures as bf, isExecutableBridge as bg, isKnownUnbridgeable as bh, isSellableRwa as bi, isSourceToken as bj, laneAvailabilityState as bk, laneKey as bl, laneKeys as bm, laneLimitAmount as bn, laneLimitError as bo, laneLimitFor as bp, laneLimitHint as bq, laneLimitSymbol as br, limitedLanes as bs, pairPromotionsInto as bt, parity as bu, parseAllowedApiBase as bv, parsePromotion as bw, parsePromotions as bx, pickForWait as by, priceCompareOptions as bz, type ComplianceCheck as c, type ComplianceTone as d, type ComplianceView as e, type ExchangeProduct as f, type RouteLeg as g, type RouteResult as h, type TxHistoryEntry as i, assetClassOf as j, brokenLaneReason as k, complianceChecks as l, complianceControlsLine as m, complianceView as n, counterpartTokens as o, destinationAvailability as p, formatJurisdiction as q, humanizeComplianceReason as r, type ApiClient as s, type SwapInput as t, type PayOption as u, type RwaVault as v, type SolveResult as w, type BalanceTarget as x, type BalanceEntry as y, type PlannedTx as z };
|
|
@@ -538,6 +538,7 @@ interface RwaVault {
|
|
|
538
538
|
[k: string]: unknown;
|
|
539
539
|
}
|
|
540
540
|
interface Route {
|
|
541
|
+
isQuotable?: boolean;
|
|
541
542
|
tokenId?: string;
|
|
542
543
|
tokenName?: string;
|
|
543
544
|
fromChainId: number;
|
|
@@ -546,6 +547,8 @@ interface Route {
|
|
|
546
547
|
* be bridgeable from one chain and not another, and only the pair says which. */
|
|
547
548
|
fromAddress?: string;
|
|
548
549
|
toAddress?: string;
|
|
550
|
+
fromSymbol?: string;
|
|
551
|
+
toSymbol?: string;
|
|
549
552
|
bridge?: string;
|
|
550
553
|
standard?: string;
|
|
551
554
|
isEnabled?: boolean;
|
|
@@ -914,6 +917,14 @@ interface SanitizedTxEntry {
|
|
|
914
917
|
/** Where the ORDER is, from the gateway's tracker, when the history was read from it. `status` is
|
|
915
918
|
* only the source transaction; this is whether the destination received the funds. Never stored. */
|
|
916
919
|
delivery?: "in-progress" | "attention" | "delivered" | "failed";
|
|
920
|
+
/** The gateway's word behind `delivery` (`cancelled`, `fill_failed`…), when read from it. Never stored. */
|
|
921
|
+
deliveryStatus?: string;
|
|
922
|
+
/** The order protocol the gateway reports for this row (`zdlite`, `zdheavy`). Never stored. */
|
|
923
|
+
protocol?: string;
|
|
924
|
+
/** The order's id as the gateway reports it (a ZD Heavy router order id is a bytes32). Never stored. */
|
|
925
|
+
orderId?: string;
|
|
926
|
+
/** The gateway says a payout of this order is parked for its receiver to claim. Never stored. */
|
|
927
|
+
claimable?: boolean;
|
|
917
928
|
at: string;
|
|
918
929
|
/** The orders this transaction submitted, first to last. Absent on entries persisted before legs
|
|
919
930
|
* were recorded (2026-09-09); the UI falls back to the single from → to summary for those. */
|
|
@@ -1280,6 +1291,9 @@ interface CatalogueContext {
|
|
|
1280
1291
|
* work; this says what was actually tried and did not.
|
|
1281
1292
|
*/
|
|
1282
1293
|
brokenLanes?: ReadonlyMap<string, BrokenLane>;
|
|
1294
|
+
/** Mirrors zd-dapp src/pages/Swap.tsx extraCat: exact quotable Heavy lanes and sources. */
|
|
1295
|
+
zdHeavyLanes?: ReadonlySet<string>;
|
|
1296
|
+
zdHeavySources?: ReadonlySet<string>;
|
|
1283
1297
|
}
|
|
1284
1298
|
/**
|
|
1285
1299
|
* Can this deployment fund a payment?
|
|
@@ -1288,7 +1302,7 @@ interface CatalogueContext {
|
|
|
1288
1302
|
* that chain safe to transact on: a source must also be a chain this widget pins an escrow and a
|
|
1289
1303
|
* bundled RPC for, because that is where `approve`, `submitOrder` and settlement verification run.
|
|
1290
1304
|
*/
|
|
1291
|
-
declare function isSourceToken(token: Token, ctx: Pick<CatalogueContext, "source" | "execution" | "sourceChains">): boolean;
|
|
1305
|
+
declare function isSourceToken(token: Token, ctx: Pick<CatalogueContext, "source" | "execution" | "sourceChains" | "zdHeavySources">): boolean;
|
|
1292
1306
|
/**
|
|
1293
1307
|
* `available` — we can deliver this token on this chain.
|
|
1294
1308
|
* `hub-only` — the asset exists here but we cannot deliver it here; it IS deliverable on an
|
|
@@ -1336,6 +1350,8 @@ interface CatalogueInput {
|
|
|
1336
1350
|
chains: readonly Chain[];
|
|
1337
1351
|
tokens: readonly Token[];
|
|
1338
1352
|
routes: readonly Route[];
|
|
1353
|
+
/** Quotable Heavy lanes added independently of the Lite bridge-family rules. */
|
|
1354
|
+
zdHeavyRoutes?: readonly Route[];
|
|
1339
1355
|
/** Which product this catalogue is for. Defaults to `"stable"`. */
|
|
1340
1356
|
product?: ExchangeProduct;
|
|
1341
1357
|
/** A host narrowing, INTERSECTED with the product's own universe. Omit for the whole product. */
|
|
@@ -1572,6 +1588,7 @@ interface ApiClient {
|
|
|
1572
1588
|
fetchChains: () => Promise<Chain[]>;
|
|
1573
1589
|
fetchTokens: () => Promise<Token[]>;
|
|
1574
1590
|
fetchRoutes: () => Promise<Route[]>;
|
|
1591
|
+
fetchZdHeavyRoutes: () => Promise<Route[]>;
|
|
1575
1592
|
/** Measured lane health. NEVER rejects — see the implementation. */
|
|
1576
1593
|
fetchRouteHealth: () => Promise<RouteHealth | null>;
|
|
1577
1594
|
/** The RWA vault catalogue, read ONLY for its artwork. NEVER rejects — see the implementation. */
|
|
@@ -1646,6 +1663,8 @@ interface BalanceEntry {
|
|
|
1646
1663
|
}
|
|
1647
1664
|
interface Verifier {
|
|
1648
1665
|
readZdHeavySubmitFee: (chainId: number, to: string, data: string) => Promise<bigint | undefined>;
|
|
1666
|
+
/** One read on the chain's BUNDLED (or overridden) RPC, never the registry's. Rejects when there is none. */
|
|
1667
|
+
bundledRpc: (chainId: number, method: string, params: unknown[]) => Promise<unknown>;
|
|
1649
1668
|
payerNonceBaseline: (chainId: number, account: string) => Promise<number | null>;
|
|
1650
1669
|
verifySubmittedTx: (args: {
|
|
1651
1670
|
chainId: number;
|
|
@@ -1666,4 +1685,4 @@ interface Verifier {
|
|
|
1666
1685
|
}
|
|
1667
1686
|
declare function createVerifier(api: ApiClient, fetchImpl: typeof fetch, rpcOverrides?: Record<number, string>): Verifier;
|
|
1668
1687
|
|
|
1669
|
-
export { type
|
|
1688
|
+
export { type CatalogueInput as $, type Availability as A, type BrokenLane as B, type Compliance as C, type Verifier as D, type EngineConfig as E, type FetchQuoteFn as F, type Promotion as G, type Hex as H, type Address as I, type ApiError as J, BLOCK_LABEL_DEFAULT as K, type LaneLimit as L, type BonusInputs as M, type NormalizedOrder as N, type OrderRequest as O, type Plan as P, type Quote as Q, type Route as R, type SanitizedTxEntry as S, type Token as T, CENTIBIPS_PER_UNIT as U, type VerifyResult as V, type WalletScreen as W, COMPLIANCE_CHECK_ORDER as X, COMPLIANCE_DENY_LABEL as Y, type ZdHeavyExpected as Z, type CatalogueContext as _, type Catalogue as a, complianceTagOf as a$, type CompareContext as a0, type CompareHop as a1, type CompareOption as a2, type ComplianceCheckId as a3, type ComplianceDecision as a4, type CornerTag as a5, DIRECT_CHECK_IDS as a6, DIRECT_SCOPE_NOTE as a7, type Destination as a8, FLOOR_CATEGORIES as a9, WAIT_MAX_SEC as aA, WAIT_MIN_SEC as aB, WAIT_POSITIONS as aC, WAIT_STEP_SEC as aD, type WaitScale as aE, ZD_HEAVY_KEY_PREFIX as aF, amountFieldError as aG, apiError as aH, bestOutputOption as aI, blockLabelFor as aJ, bonusFigure as aK, bonusPercentLabel as aL, brokenLaneFor as aM, buildCatalogue as aN, canAttachApiKey as aO, categoryLabel as aP, clampWait as aQ, classifyQuoteError as aR, compareAmount as aS, compareDuration as aT, compareFeeUsd as aU, compareHops as aV, compareOptionOf as aW, compareOptionsOf as aX, complianceControlsEvaluated as aY, complianceReasonHead as aZ, complianceReasonTag as a_, type GatewayEvmTx as aa, type InsteadFigures as ab, type LaneAvailabilityState as ac, MAX_QUOTE_CARDS as ad, type Parity as ae, type PlannedTxKind as af, type PromotedAsset as ag, type PromotedNetwork as ah, type PromotionFunder as ai, type PromotionKind as aj, type PromotionToken as ak, type QuoteBlock as al, type QuoteOption as am, type ResolvedConfig as an, type RouteBadge as ao, type RouteHealth as ap, type RouteHealthAvailability as aq, type RouteHealthLane as ar, SCREENING_BUCKETS as as, type ScreenProvider as at, type ScreeningBucket as au, type ScreeningOutcome as av, type SwapEnds as aw, TUNABLE_CATEGORIES as ax, type TagTone as ay, type TxPlan as az, type Chain as b, cornerTags as b0, createApiClient as b1, createVerifier as b2, destinationKeys as b3, directComplianceFromScreens as b4, distinctScreenedWallets as b5, estimateBonus as b6, exceedsLaneLimit as b7, executableRoutes as b8, executionChainIds as b9, productAssets as bA, promotedAssets as bB, promotionFor as bC, proposedWait as bD, registryRpc as bE, resolveApiBase as bF, resolveConfig as bG, routeBadges as bH, routeShapeLabel as bI, sameAddress as bJ, screeningOutcomeOf as bK, selectableOptions as bL, snapWait as bM, sourceKeys as bN, suppressedLanes as bO, tokenKey as bP, txMatchesPlan as bQ, unattributedComplianceReasons as bR, usdStablePair as bS, visibleOptions as bT, waitFraction as bU, waitFromFraction as bV, waitLabel as bW, waitScaleFor as bX, zdHeavyOptionKey as bY, zdHeavyUnavailableStatus as bZ, extraVsFastest as ba, fastestOption as bb, fundedByLabel as bc, hasReachableDestination as bd, hubDeliverableSymbols as be, insteadFigures as bf, isExecutableBridge as bg, isKnownUnbridgeable as bh, isSellableRwa as bi, isSourceToken as bj, laneAvailabilityState as bk, laneKey as bl, laneKeys as bm, laneLimitAmount as bn, laneLimitError as bo, laneLimitFor as bp, laneLimitHint as bq, laneLimitSymbol as br, limitedLanes as bs, pairPromotionsInto as bt, parity as bu, parseAllowedApiBase as bv, parsePromotion as bw, parsePromotions as bx, pickForWait as by, priceCompareOptions as bz, type ComplianceCheck as c, type ComplianceTone as d, type ComplianceView as e, type ExchangeProduct as f, type RouteLeg as g, type RouteResult as h, type TxHistoryEntry as i, assetClassOf as j, brokenLaneReason as k, complianceChecks as l, complianceControlsLine as m, complianceView as n, counterpartTokens as o, destinationAvailability as p, formatJurisdiction as q, humanizeComplianceReason as r, type ApiClient as s, type SwapInput as t, type PayOption as u, type RwaVault as v, type SolveResult as w, type BalanceTarget as x, type BalanceEntry as y, type PlannedTx as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glacislabs/stablegenie-zerodelta",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.22.0",
|
|
4
4
|
"description": "Lightweight embeddable ZeroDelta payment + swap widget (exact-receive Pay and exact-in Swap). Wallet always owns the final signature.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|