@glacislabs/stablegenie-zerodelta 3.0.1 → 3.1.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/README.md +1 -1
- package/dist/{chunk-DH7QYQG4.js → chunk-NSH3PT2J.js} +247 -51
- package/dist/{chunk-VL5MWEY2.js → chunk-OOURZ5DL.js} +283 -80
- package/dist/core/index.cjs +288 -79
- package/dist/core/index.d.cts +68 -13
- package/dist/core/index.d.ts +68 -13
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +528 -129
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/{mount-yqXrDBLc.d.cts → mount-DNvmtX0y.d.cts} +1 -1
- package/dist/{mount-yTJi4VdA.d.ts → mount-jxrT-DMe.d.ts} +1 -1
- package/dist/mount.cjs +528 -129
- 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 +8 -8
- package/dist/{verify-CaO0OD4Z.d.cts → verify-7lk90Ado.d.cts} +20 -4
- package/dist/{verify-CaO0OD4Z.d.ts → verify-7lk90Ado.d.ts} +20 -4
- package/package.json +2 -1
|
@@ -43,8 +43,9 @@ interface OrderRequest {
|
|
|
43
43
|
askTokenAmount?: string | number;
|
|
44
44
|
destinationReceiver?: string;
|
|
45
45
|
destinationChainId?: string | number;
|
|
46
|
+
/** Chain the escrow executes the order on. Mandatory on-chain; the gateway always issues it. */
|
|
47
|
+
executionChainId?: string | number;
|
|
46
48
|
deadline?: string | number;
|
|
47
|
-
data?: string;
|
|
48
49
|
}
|
|
49
50
|
interface NormalizedOrder {
|
|
50
51
|
owner: string;
|
|
@@ -54,8 +55,8 @@ interface NormalizedOrder {
|
|
|
54
55
|
askTokenAmount: string;
|
|
55
56
|
destinationReceiver: string;
|
|
56
57
|
destinationChainId: string;
|
|
58
|
+
executionChainId: string;
|
|
57
59
|
deadline: string;
|
|
58
|
-
data: string;
|
|
59
60
|
}
|
|
60
61
|
interface Quote {
|
|
61
62
|
fromChainId: number;
|
|
@@ -71,7 +72,14 @@ interface Quote {
|
|
|
71
72
|
gasCostSource?: string;
|
|
72
73
|
gasCostDest?: string;
|
|
73
74
|
escrowAddress?: string;
|
|
74
|
-
|
|
75
|
+
/** Escrow on the execution chain. Informational: approve/submitOrder go to the SOURCE-chain
|
|
76
|
+
* escrow, which is what checkEscrow binds. */
|
|
77
|
+
executionEscrowAddress?: string;
|
|
78
|
+
executionChainId?: number | string;
|
|
79
|
+
/** Every leg of the order, first to last. A plain swap is one leg; a chained (RWA) quote is
|
|
80
|
+
* two or more, all encoded into one submitOrder call. */
|
|
81
|
+
orderRequests?: OrderRequest[] | null;
|
|
82
|
+
/** Legacy single-leg shape, accepted for backward compatibility. */
|
|
75
83
|
orderRequest?: OrderRequest | null;
|
|
76
84
|
[k: string]: unknown;
|
|
77
85
|
}
|
|
@@ -160,6 +168,14 @@ interface Plan {
|
|
|
160
168
|
expiresAt: string;
|
|
161
169
|
apiBase?: string;
|
|
162
170
|
routes: RouteResult[];
|
|
171
|
+
/** Wallet balances already read while choosing funding candidates. Payment UIs reuse these so
|
|
172
|
+
* route rendering does not trigger the same RPC scan a second time. */
|
|
173
|
+
fundingBalances?: Record<string, {
|
|
174
|
+
raw: string;
|
|
175
|
+
formatted: string;
|
|
176
|
+
}>;
|
|
177
|
+
/** Normalized account that `fundingBalances` belongs to. */
|
|
178
|
+
fundingAccount?: string;
|
|
163
179
|
destination: {
|
|
164
180
|
asset: string;
|
|
165
181
|
chainId: number;
|
|
@@ -348,4 +364,4 @@ interface Verifier {
|
|
|
348
364
|
}
|
|
349
365
|
declare function createVerifier(api: ApiClient, fetchImpl: typeof fetch, rpcOverrides?: Record<number, string>): Verifier;
|
|
350
366
|
|
|
351
|
-
export { type ApiClient as A, type
|
|
367
|
+
export { type ApiClient as A, type BalanceTarget as B, type Chain as C, type Destination as D, type EngineConfig as E, type FetchQuoteFn as F, type Hex as H, type NormalizedOrder as N, type OrderRequest as O, type Plan as P, type Quote as Q, type RouteResult as R, type SanitizedTxEntry as S, type TxHistoryEntry as T, type VerifyResult as V, type Token as a, type PayOption as b, type Route as c, type SolveResult as d, type BalanceEntry as e, type SwapInput as f, type PlannedTx as g, type Verifier as h, type Address as i, type ApiError as j, type PlannedTxKind as k, type QuoteBlock as l, type ResolvedConfig as m, type TxPlan as n, apiError as o, canAttachApiKey as p, classifyQuoteError as q, createApiClient as r, createVerifier as s, parseAllowedApiBase as t, registryRpc as u, resolveApiBase as v, resolveConfig as w, txMatchesPlan as x };
|
|
@@ -43,8 +43,9 @@ interface OrderRequest {
|
|
|
43
43
|
askTokenAmount?: string | number;
|
|
44
44
|
destinationReceiver?: string;
|
|
45
45
|
destinationChainId?: string | number;
|
|
46
|
+
/** Chain the escrow executes the order on. Mandatory on-chain; the gateway always issues it. */
|
|
47
|
+
executionChainId?: string | number;
|
|
46
48
|
deadline?: string | number;
|
|
47
|
-
data?: string;
|
|
48
49
|
}
|
|
49
50
|
interface NormalizedOrder {
|
|
50
51
|
owner: string;
|
|
@@ -54,8 +55,8 @@ interface NormalizedOrder {
|
|
|
54
55
|
askTokenAmount: string;
|
|
55
56
|
destinationReceiver: string;
|
|
56
57
|
destinationChainId: string;
|
|
58
|
+
executionChainId: string;
|
|
57
59
|
deadline: string;
|
|
58
|
-
data: string;
|
|
59
60
|
}
|
|
60
61
|
interface Quote {
|
|
61
62
|
fromChainId: number;
|
|
@@ -71,7 +72,14 @@ interface Quote {
|
|
|
71
72
|
gasCostSource?: string;
|
|
72
73
|
gasCostDest?: string;
|
|
73
74
|
escrowAddress?: string;
|
|
74
|
-
|
|
75
|
+
/** Escrow on the execution chain. Informational: approve/submitOrder go to the SOURCE-chain
|
|
76
|
+
* escrow, which is what checkEscrow binds. */
|
|
77
|
+
executionEscrowAddress?: string;
|
|
78
|
+
executionChainId?: number | string;
|
|
79
|
+
/** Every leg of the order, first to last. A plain swap is one leg; a chained (RWA) quote is
|
|
80
|
+
* two or more, all encoded into one submitOrder call. */
|
|
81
|
+
orderRequests?: OrderRequest[] | null;
|
|
82
|
+
/** Legacy single-leg shape, accepted for backward compatibility. */
|
|
75
83
|
orderRequest?: OrderRequest | null;
|
|
76
84
|
[k: string]: unknown;
|
|
77
85
|
}
|
|
@@ -160,6 +168,14 @@ interface Plan {
|
|
|
160
168
|
expiresAt: string;
|
|
161
169
|
apiBase?: string;
|
|
162
170
|
routes: RouteResult[];
|
|
171
|
+
/** Wallet balances already read while choosing funding candidates. Payment UIs reuse these so
|
|
172
|
+
* route rendering does not trigger the same RPC scan a second time. */
|
|
173
|
+
fundingBalances?: Record<string, {
|
|
174
|
+
raw: string;
|
|
175
|
+
formatted: string;
|
|
176
|
+
}>;
|
|
177
|
+
/** Normalized account that `fundingBalances` belongs to. */
|
|
178
|
+
fundingAccount?: string;
|
|
163
179
|
destination: {
|
|
164
180
|
asset: string;
|
|
165
181
|
chainId: number;
|
|
@@ -348,4 +364,4 @@ interface Verifier {
|
|
|
348
364
|
}
|
|
349
365
|
declare function createVerifier(api: ApiClient, fetchImpl: typeof fetch, rpcOverrides?: Record<number, string>): Verifier;
|
|
350
366
|
|
|
351
|
-
export { type ApiClient as A, type
|
|
367
|
+
export { type ApiClient as A, type BalanceTarget as B, type Chain as C, type Destination as D, type EngineConfig as E, type FetchQuoteFn as F, type Hex as H, type NormalizedOrder as N, type OrderRequest as O, type Plan as P, type Quote as Q, type RouteResult as R, type SanitizedTxEntry as S, type TxHistoryEntry as T, type VerifyResult as V, type Token as a, type PayOption as b, type Route as c, type SolveResult as d, type BalanceEntry as e, type SwapInput as f, type PlannedTx as g, type Verifier as h, type Address as i, type ApiError as j, type PlannedTxKind as k, type QuoteBlock as l, type ResolvedConfig as m, type TxPlan as n, apiError as o, canAttachApiKey as p, classifyQuoteError as q, createApiClient as r, createVerifier as s, parseAllowedApiBase as t, registryRpc as u, resolveApiBase as v, resolveConfig as w, txMatchesPlan as x };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glacislabs/stablegenie-zerodelta",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.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",
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"semantic-release": "^25.0.3",
|
|
90
90
|
"tsup": "^8.3.5",
|
|
91
91
|
"typescript": "~5.8.2",
|
|
92
|
+
"viem": "^2.56.3",
|
|
92
93
|
"vitest": "^3.2.4"
|
|
93
94
|
},
|
|
94
95
|
"engines": {
|