@glacislabs/stablegenie-zerodelta 3.0.2 → 3.2.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 +39 -5
- package/dist/{chunk-AZPTL3KD.js → chunk-OOURZ5DL.js} +191 -58
- package/dist/{chunk-TR2XMP7X.js → chunk-QKGRMRS4.js} +57 -17
- package/dist/core/index.cjs +196 -57
- package/dist/core/index.d.cts +60 -7
- package/dist/core/index.d.ts +60 -7
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +246 -73
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/{mount-BC5gY1X6.d.cts → mount-DNvmtX0y.d.cts} +1 -1
- package/dist/{mount-8nchcNbL.d.ts → mount-jxrT-DMe.d.ts} +1 -1
- package/dist/mount.cjs +246 -73
- 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 +9 -8
- package/dist/{verify-DFTuQ2g3.d.cts → verify-7lk90Ado.d.cts} +11 -3
- package/dist/{verify-DFTuQ2g3.d.ts → verify-7lk90Ado.d.ts} +11 -3
- package/package.json +19 -5
|
@@ -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
|
}
|
|
@@ -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
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glacislabs/stablegenie-zerodelta",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.2.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",
|
|
@@ -59,13 +59,19 @@
|
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "tsup",
|
|
61
61
|
"dev": "tsup --watch",
|
|
62
|
-
"typecheck": "tsc --noEmit",
|
|
62
|
+
"typecheck": "tsc --noEmit && tsc -p tsconfig.playground.json --noEmit && tsc -p tsconfig.node.json --noEmit && tsc -p tsconfig.api.json --noEmit",
|
|
63
63
|
"test": "vitest run",
|
|
64
64
|
"test:watch": "vitest",
|
|
65
65
|
"prepublishOnly": "npm run build",
|
|
66
|
-
"lint": "biome lint src test",
|
|
67
|
-
"lint:fix": "biome lint src test --write",
|
|
68
|
-
"format": "biome format src test --write"
|
|
66
|
+
"lint": "biome lint src test api playground e2e scripts",
|
|
67
|
+
"lint:fix": "biome lint src test api playground e2e scripts --write",
|
|
68
|
+
"format": "biome format src test api playground e2e scripts --write",
|
|
69
|
+
"dev:playground": "vite",
|
|
70
|
+
"build:playground": "npm run build && node scripts/copy-standalone.mjs && vite build",
|
|
71
|
+
"preview:playground": "vite preview",
|
|
72
|
+
"check:api": "node scripts/check-api-esm.mjs",
|
|
73
|
+
"test:e2e": "playwright test",
|
|
74
|
+
"test:e2e:live": "playwright test --config playwright.live.config.ts"
|
|
69
75
|
},
|
|
70
76
|
"peerDependencies": {
|
|
71
77
|
"react": ">=18",
|
|
@@ -73,6 +79,7 @@
|
|
|
73
79
|
},
|
|
74
80
|
"devDependencies": {
|
|
75
81
|
"@biomejs/biome": "^2.5.6",
|
|
82
|
+
"@playwright/test": "^1.63.0",
|
|
76
83
|
"@semantic-release/changelog": "^6.0.3",
|
|
77
84
|
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
78
85
|
"@semantic-release/git": "^10.0.1",
|
|
@@ -81,14 +88,21 @@
|
|
|
81
88
|
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
82
89
|
"@testing-library/dom": "^10.4.1",
|
|
83
90
|
"@testing-library/react": "^16.3.2",
|
|
91
|
+
"@types/node": "^22.20.1",
|
|
84
92
|
"@types/react": "^19.2.0",
|
|
85
93
|
"@types/react-dom": "^19.2.0",
|
|
94
|
+
"@vitejs/plugin-react": "^4.7.0",
|
|
95
|
+
"autoprefixer": "^10.5.5",
|
|
86
96
|
"happy-dom": "^20.11.1",
|
|
97
|
+
"postcss": "^8.5.28",
|
|
87
98
|
"react": "^19.2.0",
|
|
88
99
|
"react-dom": "^19.2.0",
|
|
89
100
|
"semantic-release": "^25.0.3",
|
|
101
|
+
"tailwindcss": "^3.4.19",
|
|
90
102
|
"tsup": "^8.3.5",
|
|
91
103
|
"typescript": "~5.8.2",
|
|
104
|
+
"viem": "^2.56.3",
|
|
105
|
+
"vite": "^6.4.3",
|
|
92
106
|
"vitest": "^3.2.4"
|
|
93
107
|
},
|
|
94
108
|
"engines": {
|