@permissionless-technologies/upp-sdk 0.4.21 → 0.4.23
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 +37 -3
- package/dist/chunk-2BSIUEPO.js +343 -0
- package/dist/chunk-2BSIUEPO.js.map +1 -0
- package/dist/{chunk-YHBUCKVS.cjs → chunk-5MK5R7M7.cjs} +24 -24
- package/dist/{chunk-YHBUCKVS.cjs.map → chunk-5MK5R7M7.cjs.map} +1 -1
- package/dist/{chunk-V6MW5VOF.cjs → chunk-632LPXPX.cjs} +4 -4
- package/dist/{chunk-V6MW5VOF.cjs.map → chunk-632LPXPX.cjs.map} +1 -1
- package/dist/{chunk-RYEYGGE7.cjs → chunk-IX7HV5TE.cjs} +18 -5
- package/dist/chunk-IX7HV5TE.cjs.map +1 -0
- package/dist/{chunk-5H27F6W6.cjs → chunk-IYRCJAME.cjs} +13 -9
- package/dist/chunk-IYRCJAME.cjs.map +1 -0
- package/dist/{chunk-KRLRJ3HN.js → chunk-KR4GB6VC.js} +18 -5
- package/dist/chunk-KR4GB6VC.js.map +1 -0
- package/dist/{chunk-C7DUABSG.js → chunk-Q6BLTPWV.js} +13 -9
- package/dist/chunk-Q6BLTPWV.js.map +1 -0
- package/dist/{chunk-ND56VNCF.js → chunk-R4O6FOIN.js} +2 -2
- package/dist/{chunk-ND56VNCF.js.map → chunk-R4O6FOIN.js.map} +1 -1
- package/dist/{chunk-OLJFKARA.js → chunk-TVF6FYTQ.js} +16 -16
- package/dist/{chunk-OLJFKARA.js.map → chunk-TVF6FYTQ.js.map} +1 -1
- package/dist/{chunk-7VPW5T5R.js → chunk-UMWY4ICQ.js} +3 -3
- package/dist/{chunk-7VPW5T5R.js.map → chunk-UMWY4ICQ.js.map} +1 -1
- package/dist/{chunk-PZAV2S5E.cjs → chunk-UWW4GFZ3.cjs} +2 -2
- package/dist/{chunk-PZAV2S5E.cjs.map → chunk-UWW4GFZ3.cjs.map} +1 -1
- package/dist/chunk-VVW5VVY3.cjs +347 -0
- package/dist/chunk-VVW5VVY3.cjs.map +1 -0
- package/dist/core/index.cjs +85 -72
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +6 -5
- package/dist/core/proof-worker-entry.cjs +8 -8
- package/dist/core/proof-worker-entry.cjs.map +1 -1
- package/dist/core/proof-worker-entry.js +8 -8
- package/dist/core/proof-worker-entry.js.map +1 -1
- package/dist/{index-PgqOAfcc.d.cts → index-AooYZ0kF.d.cts} +1 -1
- package/dist/{index-DsXMd8zh.d.ts → index-CpfUNGm9.d.ts} +1 -1
- package/dist/{index-DmowSsZb.d.ts → index-De5B4r0l.d.ts} +9 -3
- package/dist/{index-DcfqeWvk.d.cts → index-hNuffoCo.d.cts} +9 -3
- package/dist/index.cjs +231 -218
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/dist/indexer/index.cjs +6 -6
- package/dist/indexer/index.d.cts +5 -5
- package/dist/indexer/index.d.ts +5 -5
- package/dist/indexer/index.js +1 -1
- package/dist/{proof-VINVGL4F.cjs → proof-X3MVQFFZ.cjs} +14 -13
- package/dist/{proof-VINVGL4F.cjs.map → proof-X3MVQFFZ.cjs.map} +1 -1
- package/dist/{proof-XQG5DN5N.js → proof-YMXBL4D5.js} +4 -3
- package/dist/{proof-XQG5DN5N.js.map → proof-YMXBL4D5.js.map} +1 -1
- package/dist/react/index.cjs +123 -39
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +44 -6
- package/dist/react/index.d.ts +44 -6
- package/dist/react/index.js +90 -18
- package/dist/react/index.js.map +1 -1
- package/dist/{transfer-Cqg235q6.d.ts → transfer-BGzySIhC.d.ts} +124 -5
- package/dist/{transfer-B4q3ZTJK.d.cts → transfer-BhB-UuBP.d.cts} +124 -5
- package/dist/{transfer-7IFAXV5K.cjs → transfer-M3PKP4PY.cjs} +12 -11
- package/dist/{transfer-7IFAXV5K.cjs.map → transfer-M3PKP4PY.cjs.map} +1 -1
- package/dist/{transfer-FWCRUWWM.js → transfer-RA7R3KQY.js} +6 -5
- package/dist/{transfer-FWCRUWWM.js.map → transfer-RA7R3KQY.js.map} +1 -1
- package/package.json +2 -2
- package/src/deployments/11155111.json +12 -12
- package/dist/chunk-5H27F6W6.cjs.map +0 -1
- package/dist/chunk-C7DUABSG.js.map +0 -1
- package/dist/chunk-KRLRJ3HN.js.map +0 -1
- package/dist/chunk-RYEYGGE7.cjs.map +0 -1
package/dist/core/index.cjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunk632LPXPX_cjs = require('../chunk-632LPXPX.cjs');
|
|
4
|
+
var chunk5MK5R7M7_cjs = require('../chunk-5MK5R7M7.cjs');
|
|
5
|
+
var chunkIX7HV5TE_cjs = require('../chunk-IX7HV5TE.cjs');
|
|
6
|
+
var chunkIYRCJAME_cjs = require('../chunk-IYRCJAME.cjs');
|
|
7
|
+
var chunkXVIICZKW_cjs = require('../chunk-XVIICZKW.cjs');
|
|
8
|
+
var chunkVVW5VVY3_cjs = require('../chunk-VVW5VVY3.cjs');
|
|
6
9
|
var chunkSWTNJPK5_cjs = require('../chunk-SWTNJPK5.cjs');
|
|
7
10
|
require('../chunk-IIUKM5VE.cjs');
|
|
8
11
|
require('../chunk-U3YFYMWF.cjs');
|
|
9
|
-
var chunk5H27F6W6_cjs = require('../chunk-5H27F6W6.cjs');
|
|
10
|
-
var chunkXVIICZKW_cjs = require('../chunk-XVIICZKW.cjs');
|
|
11
12
|
require('../chunk-UFEDJJSH.cjs');
|
|
12
13
|
require('../chunk-HEHXSV47.cjs');
|
|
13
14
|
require('../chunk-G7VZBCD6.cjs');
|
|
@@ -16,259 +17,255 @@ require('../chunk-G7VZBCD6.cjs');
|
|
|
16
17
|
|
|
17
18
|
Object.defineProperty(exports, "NOTE_VERSION", {
|
|
18
19
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunk632LPXPX_cjs.NOTE_VERSION; }
|
|
20
21
|
});
|
|
21
22
|
Object.defineProperty(exports, "createNote", {
|
|
22
23
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunk632LPXPX_cjs.createNote; }
|
|
24
25
|
});
|
|
25
26
|
Object.defineProperty(exports, "createUPPClient", {
|
|
26
27
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunk632LPXPX_cjs.createUPPClient; }
|
|
28
29
|
});
|
|
29
30
|
Object.defineProperty(exports, "decryptNote", {
|
|
30
31
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunk632LPXPX_cjs.decryptNote; }
|
|
32
33
|
});
|
|
33
34
|
Object.defineProperty(exports, "encryptNote", {
|
|
34
35
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunk632LPXPX_cjs.encryptNote; }
|
|
36
37
|
});
|
|
37
38
|
Object.defineProperty(exports, "buildTransfer", {
|
|
38
39
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunk5MK5R7M7_cjs.buildTransfer; }
|
|
40
41
|
});
|
|
41
42
|
Object.defineProperty(exports, "buildUPPTransferCircuitInputs", {
|
|
42
43
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunk5MK5R7M7_cjs.buildUPPTransferCircuitInputs; }
|
|
44
45
|
});
|
|
45
46
|
Object.defineProperty(exports, "computeNullifier", {
|
|
46
47
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunk5MK5R7M7_cjs.computeNullifier; }
|
|
48
49
|
});
|
|
49
50
|
Object.defineProperty(exports, "formatOutputForContract", {
|
|
50
51
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunk5MK5R7M7_cjs.formatOutputForContract; }
|
|
52
53
|
});
|
|
53
54
|
Object.defineProperty(exports, "getMerkleProofsForNotes", {
|
|
54
55
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunk5MK5R7M7_cjs.getMerkleProofsForNotes; }
|
|
56
57
|
});
|
|
57
58
|
Object.defineProperty(exports, "syncMerkleTree", {
|
|
58
59
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunk5MK5R7M7_cjs.syncMerkleTree; }
|
|
60
61
|
});
|
|
61
62
|
Object.defineProperty(exports, "ASP_TREE_DEPTH", {
|
|
62
63
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkIX7HV5TE_cjs.ASP_TREE_DEPTH; }
|
|
64
65
|
});
|
|
65
66
|
Object.defineProperty(exports, "STATE_TREE_DEPTH", {
|
|
66
67
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkIX7HV5TE_cjs.STATE_TREE_DEPTH; }
|
|
68
69
|
});
|
|
69
70
|
Object.defineProperty(exports, "formatProofForContract", {
|
|
70
71
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkIX7HV5TE_cjs.formatProofForContract; }
|
|
72
73
|
});
|
|
73
74
|
Object.defineProperty(exports, "generateProof", {
|
|
74
75
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkIX7HV5TE_cjs.generateProof; }
|
|
76
77
|
});
|
|
77
78
|
Object.defineProperty(exports, "generateStealthProof", {
|
|
78
79
|
enumerable: true,
|
|
79
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkIX7HV5TE_cjs.generateStealthProof; }
|
|
80
81
|
});
|
|
81
82
|
Object.defineProperty(exports, "generateUPPProof", {
|
|
82
83
|
enumerable: true,
|
|
83
|
-
get: function () { return
|
|
84
|
+
get: function () { return chunkIX7HV5TE_cjs.generateUPPProof; }
|
|
84
85
|
});
|
|
85
86
|
Object.defineProperty(exports, "getStealthCircuitArtifacts", {
|
|
86
87
|
enumerable: true,
|
|
87
|
-
get: function () { return
|
|
88
|
+
get: function () { return chunkIX7HV5TE_cjs.getStealthCircuitArtifacts; }
|
|
88
89
|
});
|
|
89
90
|
Object.defineProperty(exports, "getUPPCircuitArtifacts", {
|
|
90
91
|
enumerable: true,
|
|
91
|
-
get: function () { return
|
|
92
|
+
get: function () { return chunkIX7HV5TE_cjs.getUPPCircuitArtifacts; }
|
|
92
93
|
});
|
|
93
94
|
Object.defineProperty(exports, "verifyProof", {
|
|
94
95
|
enumerable: true,
|
|
95
|
-
get: function () { return
|
|
96
|
-
});
|
|
97
|
-
Object.defineProperty(exports, "STARK_AMOUNT_SCALE", {
|
|
98
|
-
enumerable: true,
|
|
99
|
-
get: function () { return chunkSWTNJPK5_cjs.STARK_AMOUNT_SCALE; }
|
|
96
|
+
get: function () { return chunkIX7HV5TE_cjs.verifyProof; }
|
|
100
97
|
});
|
|
101
98
|
Object.defineProperty(exports, "ADDRESS_VERSION", {
|
|
102
99
|
enumerable: true,
|
|
103
|
-
get: function () { return
|
|
100
|
+
get: function () { return chunkIYRCJAME_cjs.ADDRESS_VERSION; }
|
|
104
101
|
});
|
|
105
102
|
Object.defineProperty(exports, "DirectAccountAdapter", {
|
|
106
103
|
enumerable: true,
|
|
107
|
-
get: function () { return
|
|
104
|
+
get: function () { return chunkIYRCJAME_cjs.DirectAccountAdapter; }
|
|
108
105
|
});
|
|
109
106
|
Object.defineProperty(exports, "NoteStore", {
|
|
110
107
|
enumerable: true,
|
|
111
|
-
get: function () { return
|
|
108
|
+
get: function () { return chunkIYRCJAME_cjs.NoteStore; }
|
|
112
109
|
});
|
|
113
110
|
Object.defineProperty(exports, "ProofWorkerManager", {
|
|
114
111
|
enumerable: true,
|
|
115
|
-
get: function () { return
|
|
112
|
+
get: function () { return chunkIYRCJAME_cjs.ProofWorkerManager; }
|
|
116
113
|
});
|
|
117
114
|
Object.defineProperty(exports, "RATE_PRECISION", {
|
|
118
115
|
enumerable: true,
|
|
119
|
-
get: function () { return
|
|
116
|
+
get: function () { return chunkIYRCJAME_cjs.RATE_PRECISION; }
|
|
120
117
|
});
|
|
121
118
|
Object.defineProperty(exports, "STARK_ADDRESS_VERSION", {
|
|
122
119
|
enumerable: true,
|
|
123
|
-
get: function () { return
|
|
120
|
+
get: function () { return chunkIYRCJAME_cjs.STARK_ADDRESS_VERSION; }
|
|
124
121
|
});
|
|
125
122
|
Object.defineProperty(exports, "STARK_STEALTH_ADDRESS_PREFIX", {
|
|
126
123
|
enumerable: true,
|
|
127
|
-
get: function () { return
|
|
124
|
+
get: function () { return chunkIYRCJAME_cjs.STARK_STEALTH_ADDRESS_PREFIX; }
|
|
128
125
|
});
|
|
129
126
|
Object.defineProperty(exports, "STEALTH_ADDRESS_PREFIX", {
|
|
130
127
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunkIYRCJAME_cjs.STEALTH_ADDRESS_PREFIX; }
|
|
132
129
|
});
|
|
133
130
|
Object.defineProperty(exports, "SWAP_EVENTS_ABI", {
|
|
134
131
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkIYRCJAME_cjs.SWAP_EVENTS_ABI; }
|
|
136
133
|
});
|
|
137
134
|
Object.defineProperty(exports, "SWAP_ORDER_CANCELLED_EVENT", {
|
|
138
135
|
enumerable: true,
|
|
139
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkIYRCJAME_cjs.SWAP_ORDER_CANCELLED_EVENT; }
|
|
140
137
|
});
|
|
141
138
|
Object.defineProperty(exports, "SWAP_ORDER_CLAIMED_EVENT", {
|
|
142
139
|
enumerable: true,
|
|
143
|
-
get: function () { return
|
|
140
|
+
get: function () { return chunkIYRCJAME_cjs.SWAP_ORDER_CLAIMED_EVENT; }
|
|
144
141
|
});
|
|
145
142
|
Object.defineProperty(exports, "SWAP_ORDER_FILLED_EVENT", {
|
|
146
143
|
enumerable: true,
|
|
147
|
-
get: function () { return
|
|
144
|
+
get: function () { return chunkIYRCJAME_cjs.SWAP_ORDER_FILLED_EVENT; }
|
|
148
145
|
});
|
|
149
146
|
Object.defineProperty(exports, "SWAP_ORDER_PLACED_EVENT", {
|
|
150
147
|
enumerable: true,
|
|
151
|
-
get: function () { return
|
|
148
|
+
get: function () { return chunkIYRCJAME_cjs.SWAP_ORDER_PLACED_EVENT; }
|
|
152
149
|
});
|
|
153
150
|
Object.defineProperty(exports, "StorableAccountAdapter", {
|
|
154
151
|
enumerable: true,
|
|
155
|
-
get: function () { return
|
|
152
|
+
get: function () { return chunkIYRCJAME_cjs.StorableAccountAdapter; }
|
|
156
153
|
});
|
|
157
154
|
Object.defineProperty(exports, "computeCancelKeyHash", {
|
|
158
155
|
enumerable: true,
|
|
159
|
-
get: function () { return
|
|
156
|
+
get: function () { return chunkIYRCJAME_cjs.computeCancelKeyHash; }
|
|
160
157
|
});
|
|
161
158
|
Object.defineProperty(exports, "computeFillPercentage", {
|
|
162
159
|
enumerable: true,
|
|
163
|
-
get: function () { return
|
|
160
|
+
get: function () { return chunkIYRCJAME_cjs.computeFillPercentage; }
|
|
164
161
|
});
|
|
165
162
|
Object.defineProperty(exports, "computeGiveAmount", {
|
|
166
163
|
enumerable: true,
|
|
167
|
-
get: function () { return
|
|
164
|
+
get: function () { return chunkIYRCJAME_cjs.computeGiveAmount; }
|
|
168
165
|
});
|
|
169
166
|
Object.defineProperty(exports, "computeNoteEncryptionKey", {
|
|
170
167
|
enumerable: true,
|
|
171
|
-
get: function () { return
|
|
168
|
+
get: function () { return chunkIYRCJAME_cjs.computeNoteEncryptionKey; }
|
|
172
169
|
});
|
|
173
170
|
Object.defineProperty(exports, "computeRate", {
|
|
174
171
|
enumerable: true,
|
|
175
|
-
get: function () { return
|
|
172
|
+
get: function () { return chunkIYRCJAME_cjs.computeRate; }
|
|
176
173
|
});
|
|
177
174
|
Object.defineProperty(exports, "computeTakeAmount", {
|
|
178
175
|
enumerable: true,
|
|
179
|
-
get: function () { return
|
|
176
|
+
get: function () { return chunkIYRCJAME_cjs.computeTakeAmount; }
|
|
180
177
|
});
|
|
181
178
|
Object.defineProperty(exports, "computeTotalBuyAmount", {
|
|
182
179
|
enumerable: true,
|
|
183
|
-
get: function () { return
|
|
180
|
+
get: function () { return chunkIYRCJAME_cjs.computeTotalBuyAmount; }
|
|
184
181
|
});
|
|
185
182
|
Object.defineProperty(exports, "createOneTimeKeys", {
|
|
186
183
|
enumerable: true,
|
|
187
|
-
get: function () { return
|
|
184
|
+
get: function () { return chunkIYRCJAME_cjs.createOneTimeKeys; }
|
|
188
185
|
});
|
|
189
186
|
Object.defineProperty(exports, "decodeStarkStealthAddress", {
|
|
190
187
|
enumerable: true,
|
|
191
|
-
get: function () { return
|
|
188
|
+
get: function () { return chunkIYRCJAME_cjs.decodeStarkStealthAddress; }
|
|
192
189
|
});
|
|
193
190
|
Object.defineProperty(exports, "decodeStealthAddress", {
|
|
194
191
|
enumerable: true,
|
|
195
|
-
get: function () { return
|
|
192
|
+
get: function () { return chunkIYRCJAME_cjs.decodeStealthAddress; }
|
|
196
193
|
});
|
|
197
194
|
Object.defineProperty(exports, "detectAddressType", {
|
|
198
195
|
enumerable: true,
|
|
199
|
-
get: function () { return
|
|
196
|
+
get: function () { return chunkIYRCJAME_cjs.detectAddressType; }
|
|
200
197
|
});
|
|
201
198
|
Object.defineProperty(exports, "encodeStarkStealthAddress", {
|
|
202
199
|
enumerable: true,
|
|
203
|
-
get: function () { return
|
|
200
|
+
get: function () { return chunkIYRCJAME_cjs.encodeStarkStealthAddress; }
|
|
204
201
|
});
|
|
205
202
|
Object.defineProperty(exports, "encodeStealthAddress", {
|
|
206
203
|
enumerable: true,
|
|
207
|
-
get: function () { return
|
|
204
|
+
get: function () { return chunkIYRCJAME_cjs.encodeStealthAddress; }
|
|
208
205
|
});
|
|
209
206
|
Object.defineProperty(exports, "filterOrdersByASP", {
|
|
210
207
|
enumerable: true,
|
|
211
|
-
get: function () { return
|
|
208
|
+
get: function () { return chunkIYRCJAME_cjs.filterOrdersByASP; }
|
|
212
209
|
});
|
|
213
210
|
Object.defineProperty(exports, "filterOrdersByTokenPair", {
|
|
214
211
|
enumerable: true,
|
|
215
|
-
get: function () { return
|
|
212
|
+
get: function () { return chunkIYRCJAME_cjs.filterOrdersByTokenPair; }
|
|
216
213
|
});
|
|
217
214
|
Object.defineProperty(exports, "formatRate", {
|
|
218
215
|
enumerable: true,
|
|
219
|
-
get: function () { return
|
|
216
|
+
get: function () { return chunkIYRCJAME_cjs.formatRate; }
|
|
220
217
|
});
|
|
221
218
|
Object.defineProperty(exports, "generateCancelSecret", {
|
|
222
219
|
enumerable: true,
|
|
223
|
-
get: function () { return
|
|
220
|
+
get: function () { return chunkIYRCJAME_cjs.generateCancelSecret; }
|
|
224
221
|
});
|
|
225
222
|
Object.defineProperty(exports, "generateStarkStealthAddress", {
|
|
226
223
|
enumerable: true,
|
|
227
|
-
get: function () { return
|
|
224
|
+
get: function () { return chunkIYRCJAME_cjs.generateStarkStealthAddress; }
|
|
228
225
|
});
|
|
229
226
|
Object.defineProperty(exports, "generateStealthAddress", {
|
|
230
227
|
enumerable: true,
|
|
231
|
-
get: function () { return
|
|
228
|
+
get: function () { return chunkIYRCJAME_cjs.generateStealthAddress; }
|
|
232
229
|
});
|
|
233
230
|
Object.defineProperty(exports, "generateUPPProofAsync", {
|
|
234
231
|
enumerable: true,
|
|
235
|
-
get: function () { return
|
|
232
|
+
get: function () { return chunkIYRCJAME_cjs.generateUPPProofAsync; }
|
|
236
233
|
});
|
|
237
234
|
Object.defineProperty(exports, "getCancelSecret", {
|
|
238
235
|
enumerable: true,
|
|
239
|
-
get: function () { return
|
|
236
|
+
get: function () { return chunkIYRCJAME_cjs.getCancelSecret; }
|
|
240
237
|
});
|
|
241
238
|
Object.defineProperty(exports, "getOwnOrderIds", {
|
|
242
239
|
enumerable: true,
|
|
243
|
-
get: function () { return
|
|
240
|
+
get: function () { return chunkIYRCJAME_cjs.getOwnOrderIds; }
|
|
244
241
|
});
|
|
245
242
|
Object.defineProperty(exports, "isFillerASPAccepted", {
|
|
246
243
|
enumerable: true,
|
|
247
|
-
get: function () { return
|
|
244
|
+
get: function () { return chunkIYRCJAME_cjs.isFillerASPAccepted; }
|
|
248
245
|
});
|
|
249
246
|
Object.defineProperty(exports, "isOrderActive", {
|
|
250
247
|
enumerable: true,
|
|
251
|
-
get: function () { return
|
|
248
|
+
get: function () { return chunkIYRCJAME_cjs.isOrderActive; }
|
|
252
249
|
});
|
|
253
250
|
Object.defineProperty(exports, "isValidStarkStealthAddress", {
|
|
254
251
|
enumerable: true,
|
|
255
|
-
get: function () { return
|
|
252
|
+
get: function () { return chunkIYRCJAME_cjs.isValidStarkStealthAddress; }
|
|
256
253
|
});
|
|
257
254
|
Object.defineProperty(exports, "isValidStealthAddress", {
|
|
258
255
|
enumerable: true,
|
|
259
|
-
get: function () { return
|
|
256
|
+
get: function () { return chunkIYRCJAME_cjs.isValidStealthAddress; }
|
|
260
257
|
});
|
|
261
258
|
Object.defineProperty(exports, "removeCancelSecret", {
|
|
262
259
|
enumerable: true,
|
|
263
|
-
get: function () { return
|
|
260
|
+
get: function () { return chunkIYRCJAME_cjs.removeCancelSecret; }
|
|
264
261
|
});
|
|
265
262
|
Object.defineProperty(exports, "storeCancelSecret", {
|
|
266
263
|
enumerable: true,
|
|
267
|
-
get: function () { return
|
|
264
|
+
get: function () { return chunkIYRCJAME_cjs.storeCancelSecret; }
|
|
268
265
|
});
|
|
269
266
|
Object.defineProperty(exports, "verifyOwnership", {
|
|
270
267
|
enumerable: true,
|
|
271
|
-
get: function () { return
|
|
268
|
+
get: function () { return chunkIYRCJAME_cjs.verifyOwnership; }
|
|
272
269
|
});
|
|
273
270
|
Object.defineProperty(exports, "DEMO_ASP_ID", {
|
|
274
271
|
enumerable: true,
|
|
@@ -310,5 +307,21 @@ Object.defineProperty(exports, "verifyASPProof", {
|
|
|
310
307
|
enumerable: true,
|
|
311
308
|
get: function () { return chunkXVIICZKW_cjs.verifyASPProof; }
|
|
312
309
|
});
|
|
310
|
+
Object.defineProperty(exports, "CIRCUIT_CDN_BASE", {
|
|
311
|
+
enumerable: true,
|
|
312
|
+
get: function () { return chunkVVW5VVY3_cjs.CIRCUIT_CDN_BASE; }
|
|
313
|
+
});
|
|
314
|
+
Object.defineProperty(exports, "CIRCUIT_VERSION", {
|
|
315
|
+
enumerable: true,
|
|
316
|
+
get: function () { return chunkVVW5VVY3_cjs.CIRCUIT_VERSION; }
|
|
317
|
+
});
|
|
318
|
+
Object.defineProperty(exports, "CircuitArtifactCache", {
|
|
319
|
+
enumerable: true,
|
|
320
|
+
get: function () { return chunkVVW5VVY3_cjs.CircuitArtifactCache; }
|
|
321
|
+
});
|
|
322
|
+
Object.defineProperty(exports, "STARK_AMOUNT_SCALE", {
|
|
323
|
+
enumerable: true,
|
|
324
|
+
get: function () { return chunkSWTNJPK5_cjs.STARK_AMOUNT_SCALE; }
|
|
325
|
+
});
|
|
313
326
|
//# sourceMappingURL=index.cjs.map
|
|
314
327
|
//# sourceMappingURL=index.cjs.map
|
package/dist/core/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as ADDRESS_VERSION, k as ASPMembershipProof, D as DirectAccountAdapter, l as IASPProvider, m as IAccountAdapter, n as INoteStore, V as NoteStatus, o as NoteStore, P as ProofSystem, p as STARK_ADDRESS_VERSION, q as STARK_STEALTH_ADDRESS_PREFIX, r as STEALTH_ADDRESS_PREFIX, s as ShieldedNote, t as StorableAccountAdapter, U as UPPClient, u as UPPClientConfig, v as computeNoteEncryptionKey, w as createNote, x as createOneTimeKeys, y as createUPPClient, z as decodeStarkStealthAddress, B as decodeStealthAddress, E as decryptNote, F as detectAddressType, G as encodeStarkStealthAddress, H as encodeStealthAddress, J as encryptNote, K as generateStarkStealthAddress, M as generateStealthAddress, O as isValidStarkStealthAddress, Q as isValidStealthAddress, T as verifyOwnership } from '../index-
|
|
2
|
-
export { A as ASPProof, a as ASPRoot, b as ASP_TREE_DEPTH, C as
|
|
1
|
+
export { A as ADDRESS_VERSION, k as ASPMembershipProof, D as DirectAccountAdapter, l as IASPProvider, m as IAccountAdapter, n as INoteStore, V as NoteStatus, o as NoteStore, P as ProofSystem, p as STARK_ADDRESS_VERSION, q as STARK_STEALTH_ADDRESS_PREFIX, r as STEALTH_ADDRESS_PREFIX, s as ShieldedNote, t as StorableAccountAdapter, U as UPPClient, u as UPPClientConfig, v as computeNoteEncryptionKey, w as createNote, x as createOneTimeKeys, y as createUPPClient, z as decodeStarkStealthAddress, B as decodeStealthAddress, E as decryptNote, F as detectAddressType, G as encodeStarkStealthAddress, H as encodeStealthAddress, J as encryptNote, K as generateStarkStealthAddress, M as generateStealthAddress, O as isValidStarkStealthAddress, Q as isValidStealthAddress, T as verifyOwnership } from '../index-AooYZ0kF.cjs';
|
|
2
|
+
export { A as ASPProof, a as ASPRoot, b as ASP_TREE_DEPTH, C as CIRCUIT_CDN_BASE, c as CIRCUIT_VERSION, d as CircuitArtifactCache, e as CircuitArtifacts, f as CircuitCacheStatus, g as CircuitType, h as Commitment, D as DEMO_ASP_ID, i as DEMO_ASP_NAME, j as DownloadProgress, E as EncryptedNote, M as MergeParams, k as MergeRecord, l as MerkleProofWithNote, N as NOTE_VERSION, m as Note, n as NoteWithAmount, o as Nullifier, P as PlonkProvingStage, p as Proof, q as ProofResult, r as ProofWorkerManager, s as ProofWorkerRequest, t as ProofWorkerResponse, R as RATE_PRECISION, u as ResolvedCircuitArtifacts, S as STATE_TREE_DEPTH, v as SWAP_EVENTS_ABI, w as SWAP_ORDER_CANCELLED_EVENT, x as SWAP_ORDER_CLAIMED_EVENT, y as SWAP_ORDER_FILLED_EVENT, z as SWAP_ORDER_PLACED_EVENT, B as ShieldParams, F as SpendableNote, G as StarkNote, H as StarkProof, I as StarkStealthMetaAddress, J as Stealth1x2CircuitInputs, K as Stealth2x2CircuitInputs, L as StealthAddress, O as StealthCircuitInputs, Q as StealthCircuitType, T as StealthMetaAddress, U as SwapFillEvent, V as SwapFillParams, W as SwapOrder, X as SwapOrderEvent, Y as SwapOrderParams, Z as TransferBuildResult, _ as TransferContext, $ as TransferParams, a0 as TransferStage, a1 as UPPCircuitInputs, a2 as UPPCircuitType, a3 as UPPTransferCircuitInputs, a4 as UPPWithdrawCircuitInputs, a5 as WithdrawParams, a6 as buildASPTree, a7 as buildTransfer, a8 as buildUPPTransferCircuitInputs, a9 as computeCancelKeyHash, aa as computeFillPercentage, ab as computeGiveAmount, ac as computeMultiOriginASPRoot, ad as computeNullifier, ae as computeRate, af as computeSingleOriginASPRoot, ag as computeTakeAmount, ah as computeTotalBuyAmount, ai as createDemoASPRoot, aj as filterOrdersByASP, ak as filterOrdersByTokenPair, al as formatOutputForContract, am as formatProofForContract, an as formatRate, ao as generateASPProof, ap as generateCancelSecret, aq as generateMultiOriginASPProof, ar as generateProof, as as generateSingleOriginASPProof, at as generateStealthProof, au as generateUPPProof, av as generateUPPProofAsync, aw as getCancelSecret, ax as getMerkleProofsForNotes, ay as getOwnOrderIds, az as getStealthCircuitArtifacts, aA as getUPPCircuitArtifacts, aB as isFillerASPAccepted, aC as isOrderActive, aD as removeCancelSecret, aE as storeCancelSecret, aF as syncMerkleTree, aG as verifyASPProof, aH as verifyProof } from '../transfer-BhB-UuBP.cjs';
|
|
3
3
|
export { S as STARK_AMOUNT_SCALE } from '../stark-BcTD1OaJ.cjs';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import '../types-CJSbxv4q.cjs';
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as ADDRESS_VERSION, k as ASPMembershipProof, D as DirectAccountAdapter, l as IASPProvider, m as IAccountAdapter, n as INoteStore, V as NoteStatus, o as NoteStore, P as ProofSystem, p as STARK_ADDRESS_VERSION, q as STARK_STEALTH_ADDRESS_PREFIX, r as STEALTH_ADDRESS_PREFIX, s as ShieldedNote, t as StorableAccountAdapter, U as UPPClient, u as UPPClientConfig, v as computeNoteEncryptionKey, w as createNote, x as createOneTimeKeys, y as createUPPClient, z as decodeStarkStealthAddress, B as decodeStealthAddress, E as decryptNote, F as detectAddressType, G as encodeStarkStealthAddress, H as encodeStealthAddress, J as encryptNote, K as generateStarkStealthAddress, M as generateStealthAddress, O as isValidStarkStealthAddress, Q as isValidStealthAddress, T as verifyOwnership } from '../index-
|
|
2
|
-
export { A as ASPProof, a as ASPRoot, b as ASP_TREE_DEPTH, C as
|
|
1
|
+
export { A as ADDRESS_VERSION, k as ASPMembershipProof, D as DirectAccountAdapter, l as IASPProvider, m as IAccountAdapter, n as INoteStore, V as NoteStatus, o as NoteStore, P as ProofSystem, p as STARK_ADDRESS_VERSION, q as STARK_STEALTH_ADDRESS_PREFIX, r as STEALTH_ADDRESS_PREFIX, s as ShieldedNote, t as StorableAccountAdapter, U as UPPClient, u as UPPClientConfig, v as computeNoteEncryptionKey, w as createNote, x as createOneTimeKeys, y as createUPPClient, z as decodeStarkStealthAddress, B as decodeStealthAddress, E as decryptNote, F as detectAddressType, G as encodeStarkStealthAddress, H as encodeStealthAddress, J as encryptNote, K as generateStarkStealthAddress, M as generateStealthAddress, O as isValidStarkStealthAddress, Q as isValidStealthAddress, T as verifyOwnership } from '../index-CpfUNGm9.js';
|
|
2
|
+
export { A as ASPProof, a as ASPRoot, b as ASP_TREE_DEPTH, C as CIRCUIT_CDN_BASE, c as CIRCUIT_VERSION, d as CircuitArtifactCache, e as CircuitArtifacts, f as CircuitCacheStatus, g as CircuitType, h as Commitment, D as DEMO_ASP_ID, i as DEMO_ASP_NAME, j as DownloadProgress, E as EncryptedNote, M as MergeParams, k as MergeRecord, l as MerkleProofWithNote, N as NOTE_VERSION, m as Note, n as NoteWithAmount, o as Nullifier, P as PlonkProvingStage, p as Proof, q as ProofResult, r as ProofWorkerManager, s as ProofWorkerRequest, t as ProofWorkerResponse, R as RATE_PRECISION, u as ResolvedCircuitArtifacts, S as STATE_TREE_DEPTH, v as SWAP_EVENTS_ABI, w as SWAP_ORDER_CANCELLED_EVENT, x as SWAP_ORDER_CLAIMED_EVENT, y as SWAP_ORDER_FILLED_EVENT, z as SWAP_ORDER_PLACED_EVENT, B as ShieldParams, F as SpendableNote, G as StarkNote, H as StarkProof, I as StarkStealthMetaAddress, J as Stealth1x2CircuitInputs, K as Stealth2x2CircuitInputs, L as StealthAddress, O as StealthCircuitInputs, Q as StealthCircuitType, T as StealthMetaAddress, U as SwapFillEvent, V as SwapFillParams, W as SwapOrder, X as SwapOrderEvent, Y as SwapOrderParams, Z as TransferBuildResult, _ as TransferContext, $ as TransferParams, a0 as TransferStage, a1 as UPPCircuitInputs, a2 as UPPCircuitType, a3 as UPPTransferCircuitInputs, a4 as UPPWithdrawCircuitInputs, a5 as WithdrawParams, a6 as buildASPTree, a7 as buildTransfer, a8 as buildUPPTransferCircuitInputs, a9 as computeCancelKeyHash, aa as computeFillPercentage, ab as computeGiveAmount, ac as computeMultiOriginASPRoot, ad as computeNullifier, ae as computeRate, af as computeSingleOriginASPRoot, ag as computeTakeAmount, ah as computeTotalBuyAmount, ai as createDemoASPRoot, aj as filterOrdersByASP, ak as filterOrdersByTokenPair, al as formatOutputForContract, am as formatProofForContract, an as formatRate, ao as generateASPProof, ap as generateCancelSecret, aq as generateMultiOriginASPProof, ar as generateProof, as as generateSingleOriginASPProof, at as generateStealthProof, au as generateUPPProof, av as generateUPPProofAsync, aw as getCancelSecret, ax as getMerkleProofsForNotes, ay as getOwnOrderIds, az as getStealthCircuitArtifacts, aA as getUPPCircuitArtifacts, aB as isFillerASPAccepted, aC as isOrderActive, aD as removeCancelSecret, aE as storeCancelSecret, aF as syncMerkleTree, aG as verifyASPProof, aH as verifyProof } from '../transfer-BGzySIhC.js';
|
|
3
3
|
export { S as STARK_AMOUNT_SCALE } from '../stark-BcTD1OaJ.js';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import '../types-mLybMxNR.js';
|
package/dist/core/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export { NOTE_VERSION, createNote, createUPPClient, decryptNote, encryptNote } from '../chunk-
|
|
2
|
-
export { buildTransfer, buildUPPTransferCircuitInputs, computeNullifier, formatOutputForContract, getMerkleProofsForNotes, syncMerkleTree } from '../chunk-
|
|
3
|
-
export { ASP_TREE_DEPTH, STATE_TREE_DEPTH, formatProofForContract, generateProof, generateStealthProof, generateUPPProof, getStealthCircuitArtifacts, getUPPCircuitArtifacts, verifyProof } from '../chunk-
|
|
1
|
+
export { NOTE_VERSION, createNote, createUPPClient, decryptNote, encryptNote } from '../chunk-UMWY4ICQ.js';
|
|
2
|
+
export { buildTransfer, buildUPPTransferCircuitInputs, computeNullifier, formatOutputForContract, getMerkleProofsForNotes, syncMerkleTree } from '../chunk-TVF6FYTQ.js';
|
|
3
|
+
export { ASP_TREE_DEPTH, STATE_TREE_DEPTH, formatProofForContract, generateProof, generateStealthProof, generateUPPProof, getStealthCircuitArtifacts, getUPPCircuitArtifacts, verifyProof } from '../chunk-KR4GB6VC.js';
|
|
4
|
+
export { ADDRESS_VERSION, DirectAccountAdapter, NoteStore, ProofWorkerManager, RATE_PRECISION, STARK_ADDRESS_VERSION, STARK_STEALTH_ADDRESS_PREFIX, STEALTH_ADDRESS_PREFIX, SWAP_EVENTS_ABI, SWAP_ORDER_CANCELLED_EVENT, SWAP_ORDER_CLAIMED_EVENT, SWAP_ORDER_FILLED_EVENT, SWAP_ORDER_PLACED_EVENT, StorableAccountAdapter, computeCancelKeyHash, computeFillPercentage, computeGiveAmount, computeNoteEncryptionKey, computeRate, computeTakeAmount, computeTotalBuyAmount, createOneTimeKeys, decodeStarkStealthAddress, decodeStealthAddress, detectAddressType, encodeStarkStealthAddress, encodeStealthAddress, filterOrdersByASP, filterOrdersByTokenPair, formatRate, generateCancelSecret, generateStarkStealthAddress, generateStealthAddress, generateUPPProofAsync, getCancelSecret, getOwnOrderIds, isFillerASPAccepted, isOrderActive, isValidStarkStealthAddress, isValidStealthAddress, removeCancelSecret, storeCancelSecret, verifyOwnership } from '../chunk-Q6BLTPWV.js';
|
|
5
|
+
export { DEMO_ASP_ID, DEMO_ASP_NAME, buildASPTree, computeMultiOriginASPRoot, computeSingleOriginASPRoot, createDemoASPRoot, generateASPProof, generateMultiOriginASPProof, generateSingleOriginASPProof, verifyASPProof } from '../chunk-6IEYWJVS.js';
|
|
6
|
+
export { CIRCUIT_CDN_BASE, CIRCUIT_VERSION, CircuitArtifactCache } from '../chunk-2BSIUEPO.js';
|
|
4
7
|
export { STARK_AMOUNT_SCALE } from '../chunk-7T4CUE6E.js';
|
|
5
8
|
import '../chunk-GPF72JFR.js';
|
|
6
9
|
import '../chunk-6TFDBBAQ.js';
|
|
7
|
-
export { ADDRESS_VERSION, DirectAccountAdapter, NoteStore, ProofWorkerManager, RATE_PRECISION, STARK_ADDRESS_VERSION, STARK_STEALTH_ADDRESS_PREFIX, STEALTH_ADDRESS_PREFIX, SWAP_EVENTS_ABI, SWAP_ORDER_CANCELLED_EVENT, SWAP_ORDER_CLAIMED_EVENT, SWAP_ORDER_FILLED_EVENT, SWAP_ORDER_PLACED_EVENT, StorableAccountAdapter, computeCancelKeyHash, computeFillPercentage, computeGiveAmount, computeNoteEncryptionKey, computeRate, computeTakeAmount, computeTotalBuyAmount, createOneTimeKeys, decodeStarkStealthAddress, decodeStealthAddress, detectAddressType, encodeStarkStealthAddress, encodeStealthAddress, filterOrdersByASP, filterOrdersByTokenPair, formatRate, generateCancelSecret, generateStarkStealthAddress, generateStealthAddress, generateUPPProofAsync, getCancelSecret, getOwnOrderIds, isFillerASPAccepted, isOrderActive, isValidStarkStealthAddress, isValidStealthAddress, removeCancelSecret, storeCancelSecret, verifyOwnership } from '../chunk-C7DUABSG.js';
|
|
8
|
-
export { DEMO_ASP_ID, DEMO_ASP_NAME, buildASPTree, computeMultiOriginASPRoot, computeSingleOriginASPRoot, createDemoASPRoot, generateASPProof, generateMultiOriginASPProof, generateSingleOriginASPProof, verifyASPProof } from '../chunk-6IEYWJVS.js';
|
|
9
10
|
import '../chunk-UQIM2KT3.js';
|
|
10
11
|
import '../chunk-5QSSX3KR.js';
|
|
11
12
|
import '../chunk-Z6ZWNWWR.js';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunkVVW5VVY3_cjs = require('../chunk-VVW5VVY3.cjs');
|
|
4
|
+
require('../chunk-G7VZBCD6.cjs');
|
|
5
|
+
|
|
3
6
|
// src/core/proof-worker-entry.ts
|
|
4
7
|
var ctx = globalThis;
|
|
5
8
|
var snarkjsModule = null;
|
|
@@ -8,20 +11,17 @@ async function loadSnarkjs() {
|
|
|
8
11
|
snarkjsModule = await import('snarkjs');
|
|
9
12
|
return snarkjsModule;
|
|
10
13
|
}
|
|
11
|
-
function getArtifactUrls(circuitType, baseUrl) {
|
|
12
|
-
const base = baseUrl.endsWith("/") ? baseUrl : baseUrl + "/";
|
|
13
|
-
return {
|
|
14
|
-
wasm: `${base}${circuitType}.wasm`,
|
|
15
|
-
zkey: `${base}${circuitType}.zkey`
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
14
|
ctx.onmessage = async (e) => {
|
|
19
15
|
const { type, id, circuitType, inputs, baseUrl } = e.data;
|
|
20
16
|
if (type !== "prove") return;
|
|
21
17
|
try {
|
|
18
|
+
ctx.postMessage({ type: "progress", id, stage: "downloading", message: "Checking circuit cache..." });
|
|
19
|
+
const cache = chunkVVW5VVY3_cjs.CircuitArtifactCache.shared();
|
|
20
|
+
const artifacts = await cache.getArtifacts(circuitType, baseUrl || void 0, (p) => {
|
|
21
|
+
ctx.postMessage({ type: "download-progress", id, progress: p });
|
|
22
|
+
});
|
|
22
23
|
ctx.postMessage({ type: "progress", id, stage: "loading", message: "Loading circuit artifacts..." });
|
|
23
24
|
const snarkjs = await loadSnarkjs();
|
|
24
|
-
const artifacts = getArtifactUrls(circuitType, baseUrl);
|
|
25
25
|
const logger = {
|
|
26
26
|
debug: (msg) => {
|
|
27
27
|
if (msg.includes("ROUND 1")) ctx.postMessage({ type: "progress", id, stage: "round1", message: "Computing wire polynomials..." });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/core/proof-worker-entry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/core/proof-worker-entry.ts"],"names":["CircuitArtifactCache"],"mappings":";;;;;;AAiBA,IAAM,GAAA,GAAM,UAAA;AAEZ,IAAI,aAAA,GAAqB,IAAA;AAEzB,eAAe,WAAA,GAAc;AAC3B,EAAA,IAAI,eAAe,OAAO,aAAA;AAC1B,EAAA,aAAA,GAAgB,MAAM,OAAO,SAAS,CAAA;AACtC,EAAA,OAAO,aAAA;AACT;AAEA,GAAA,CAAI,SAAA,GAAY,OAAO,CAAA,KAAoB;AACzC,EAAA,MAAM,EAAE,IAAA,EAAM,EAAA,EAAI,aAAa,MAAA,EAAQ,OAAA,KAAY,CAAA,CAAE,IAAA;AACrD,EAAA,IAAI,SAAS,OAAA,EAAS;AAEtB,EAAA,IAAI;AAEF,IAAA,GAAA,CAAI,WAAA,CAAY,EAAE,IAAA,EAAM,UAAA,EAAY,IAAI,KAAA,EAAO,aAAA,EAAe,OAAA,EAAS,2BAAA,EAA6B,CAAA;AAEpG,IAAA,MAAM,KAAA,GAAQA,uCAAqB,MAAA,EAAO;AAC1C,IAAA,MAAM,SAAA,GAAY,MAAM,KAAA,CAAM,YAAA,CAAa,aAA+B,OAAA,IAAW,KAAA,CAAA,EAAW,CAAC,CAAA,KAAM;AACrG,MAAA,GAAA,CAAI,YAAY,EAAE,IAAA,EAAM,qBAAqB,EAAA,EAAI,QAAA,EAAU,GAAG,CAAA;AAAA,IAChE,CAAC,CAAA;AAED,IAAA,GAAA,CAAI,WAAA,CAAY,EAAE,IAAA,EAAM,UAAA,EAAY,IAAI,KAAA,EAAO,SAAA,EA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AM;AAAA,MAAC,CAAA;AAAA,MACb,OAAO,MAAM;AAAA,MAAC;AAAA,KAChB;AAEA,IAAA,GAAA,CAAI,WAAA,CAAY,EAAE,IAAA,EAAM,UAAA,EAAY,IAAI,KAAA,EAAO,SAAA,EAAW,OAAA,EAAS,sBAAA,EAAwB,CAAA;AAG3F,IAAA,MAAM,MAAA,GAAS,MAAM,OAAA,CAAQ,KAAA,CAAM,SAAA,CAAU,QAAQ,SAAA,CAAU,IAAA,EAAM,SAAA,CAAU,IAAA,EAAM,MAAM,CAAA;AAE3F,IAAA,GAAA,CAAI,WAAA,CAAY;AAAA,MACd,IAAA,EAAM,QAAA;AAAA,MACN,EAAA;AAAA,MACA,KAAA,EAAO;AAAA,QACL,OAAO,EAAE,KAAA,EAAO,OAAO,KAAA,EAAO,aAAA,EAAe,OAAO,aAAA,EAAc;AAAA,QAClE,eAAe,MAAA,CAAO;AAAA;AACxB,KACD,CAAA;AAAA,EACH,SAAS,GAAA,EAAU;AACjB,IAAA,GAAA,CAAI,WAAA,CAAY;AAAA,MACd,IAAA,EAAM,OAAA;AAAA,MACN,EAAA;AAAA,MACA,OAAA,EAAS,GAAA,EAAK,OAAA,IAAW,MAAA,CAAO,GAAG;AAAA,KACpC,CAAA;AAAA,EACH;AACF,CAAA","file":"proof-worker-entry.cjs","sourcesContent":["/**\n * Web Worker entry point for PLONK proof generation.\n *\n * This file runs inside a Web Worker context. It dynamically imports snarkjs\n * and handles proof generation requests from the main thread.\n *\n * Circuit artifacts are cached in IndexedDB — downloaded once, reused on\n * subsequent proof requests. Download progress is reported to the main thread.\n *\n * Usage (from consumer):\n * new Worker(new URL('@permissionless-technologies/upp-sdk/worker', import.meta.url))\n */\n\nimport { CircuitArtifactCache } from './circuit-cache.js'\nimport type { UPPCircuitType } from './proof.js'\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst ctx = globalThis as any\n\nlet snarkjsModule: any = null\n\nasync function loadSnarkjs() {\n if (snarkjsModule) return snarkjsModule\n snarkjsModule = await import('snarkjs')\n return snarkjsModule\n}\n\nctx.onmessage = async (e: MessageEvent) => {\n const { type, id, circuitType, inputs, baseUrl } = e.data\n if (type !== 'prove') return\n\n try {\n // Load circuit artifacts from cache (or download with progress)\n ctx.postMessage({ type: 'progress', id, stage: 'downloading', message: 'Checking circuit cache...' })\n\n const cache = CircuitArtifactCache.shared()\n const artifacts = await cache.getArtifacts(circuitType as UPPCircuitType, baseUrl || undefined, (p) => {\n ctx.postMessage({ type: 'download-progress', id, progress: p })\n })\n\n ctx.postMessage({ type: 'progress', id, stage: 'loading', message: 'Loading circuit artifacts...' })\n\n const snarkjs = await loadSnarkjs()\n\n const logger = {\n debug: (msg: string) => {\n if (msg.includes('ROUND 1')) ctx.postMessage({ type: 'progress', id, stage: 'round1', message: 'Computing wire polynomials...' })\n else if (msg.includes('ROUND 2')) ctx.postMessage({ type: 'progress', id, stage: 'round2', message: 'Computing permutation polynomial...' })\n else if (msg.includes('ROUND 3')) ctx.postMessage({ type: 'progress', id, stage: 'round3', message: 'Computing quotient polynomial...' })\n else if (msg.includes('ROUND 4')) ctx.postMessage({ type: 'progress', id, stage: 'round4', message: 'Computing evaluations...' })\n else if (msg.includes('ROUND 5')) ctx.postMessage({ type: 'progress', id, stage: 'round5', message: 'Computing opening proofs...' })\n else if (msg.includes('PROVER FINISHED')) ctx.postMessage({ type: 'progress', id, stage: 'done', message: 'Proof complete' })\n },\n info: () => {},\n warn: () => {},\n error: () => {},\n }\n\n ctx.postMessage({ type: 'progress', id, stage: 'witness', message: 'Computing witness...' })\n\n // Pass Uint8Array directly — snarkjs/fastfile accepts it without fetching\n const result = await snarkjs.plonk.fullProve(inputs, artifacts.wasm, artifacts.zkey, logger)\n\n ctx.postMessage({\n type: 'result',\n id,\n proof: {\n proof: { proof: result.proof, publicSignals: result.publicSignals },\n publicSignals: result.publicSignals,\n },\n })\n } catch (err: any) {\n ctx.postMessage({\n type: 'error',\n id,\n message: err?.message || String(err),\n })\n }\n}\n"]}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { CircuitArtifactCache } from '../chunk-2BSIUEPO.js';
|
|
2
|
+
import '../chunk-Z6ZWNWWR.js';
|
|
3
|
+
|
|
1
4
|
// src/core/proof-worker-entry.ts
|
|
2
5
|
var ctx = globalThis;
|
|
3
6
|
var snarkjsModule = null;
|
|
@@ -6,20 +9,17 @@ async function loadSnarkjs() {
|
|
|
6
9
|
snarkjsModule = await import('snarkjs');
|
|
7
10
|
return snarkjsModule;
|
|
8
11
|
}
|
|
9
|
-
function getArtifactUrls(circuitType, baseUrl) {
|
|
10
|
-
const base = baseUrl.endsWith("/") ? baseUrl : baseUrl + "/";
|
|
11
|
-
return {
|
|
12
|
-
wasm: `${base}${circuitType}.wasm`,
|
|
13
|
-
zkey: `${base}${circuitType}.zkey`
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
12
|
ctx.onmessage = async (e) => {
|
|
17
13
|
const { type, id, circuitType, inputs, baseUrl } = e.data;
|
|
18
14
|
if (type !== "prove") return;
|
|
19
15
|
try {
|
|
16
|
+
ctx.postMessage({ type: "progress", id, stage: "downloading", message: "Checking circuit cache..." });
|
|
17
|
+
const cache = CircuitArtifactCache.shared();
|
|
18
|
+
const artifacts = await cache.getArtifacts(circuitType, baseUrl || void 0, (p) => {
|
|
19
|
+
ctx.postMessage({ type: "download-progress", id, progress: p });
|
|
20
|
+
});
|
|
20
21
|
ctx.postMessage({ type: "progress", id, stage: "loading", message: "Loading circuit artifacts..." });
|
|
21
22
|
const snarkjs = await loadSnarkjs();
|
|
22
|
-
const artifacts = getArtifactUrls(circuitType, baseUrl);
|
|
23
23
|
const logger = {
|
|
24
24
|
debug: (msg) => {
|
|
25
25
|
if (msg.includes("ROUND 1")) ctx.postMessage({ type: "progress", id, stage: "round1", message: "Computing wire polynomials..." });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/core/proof-worker-entry.ts"],"names":[],"mappings":"
|
|
1
|
+
{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CAAU,QAAQ,SAAA,CAAU,IAAA,EAAM,SAAA,CAAU,IAAA,EAAM,MAAM,CAAA;AAE3F,IAAA,GAAA,CAAI,WAAA,CAAY;AAAA,MACd,IAAA,EAAM,QAAA;AAAA,MACN,EAAA;AAAA,MACA,KAAA,EAAO;AAAA,QACL,OAAO,EAAE,KAAA,EAAO,OAAO,KAAA,EAAO,aAAA,EAAe,OAAO,aAAA,EAAc;AAAA,QAClE,eAAe,MAAA,CAAO;AAAA;AACxB,KACD,CAAA;AAAA,EACH,SAAS,GAAA,EAAU;AACjB,IAAA,GAAA,CAAI,WAAA,CAAY;AAAA,MACd,IAAA,EAAM,OAAA;AAAA,MACN,EAAA;AAAA,MACA,OAAA,EAAS,GAAA,EAAK,OAAA,IAAW,MAAA,CAAO,GAAG;AAAA,KACpC,CAAA;AAAA,EACH;AACF,CAAA","file":"proof-worker-entry.js","sourcesContent":["/**\n * Web Worker entry point for PLONK proof generation.\n *\n * This file runs inside a Web Worker context. It dynamically imports snarkjs\n * and handles proof generation requests from the main thread.\n *\n * Circuit artifacts are cached in IndexedDB — downloaded once, reused on\n * subsequent proof requests. Download progress is reported to the main thread.\n *\n * Usage (from consumer):\n * new Worker(new URL('@permissionless-technologies/upp-sdk/worker', import.meta.url))\n */\n\nimport { CircuitArtifactCache } from './circuit-cache.js'\nimport type { UPPCircuitType } from './proof.js'\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst ctx = globalThis as any\n\nlet snarkjsModule: any = null\n\nasync function loadSnarkjs() {\n if (snarkjsModule) return snarkjsModule\n snarkjsModule = await import('snarkjs')\n return snarkjsModule\n}\n\nctx.onmessage = async (e: MessageEvent) => {\n const { type, id, circuitType, inputs, baseUrl } = e.data\n if (type !== 'prove') return\n\n try {\n // Load circuit artifacts from cache (or download with progress)\n ctx.postMessage({ type: 'progress', id, stage: 'downloading', message: 'Checking circuit cache...' })\n\n const cache = CircuitArtifactCache.shared()\n const artifacts = await cache.getArtifacts(circuitType as UPPCircuitType, baseUrl || undefined, (p) => {\n ctx.postMessage({ type: 'download-progress', id, progress: p })\n })\n\n ctx.postMessage({ type: 'progress', id, stage: 'loading', message: 'Loading circuit artifacts...' })\n\n const snarkjs = await loadSnarkjs()\n\n const logger = {\n debug: (msg: string) => {\n if (msg.includes('ROUND 1')) ctx.postMessage({ type: 'progress', id, stage: 'round1', message: 'Computing wire polynomials...' })\n else if (msg.includes('ROUND 2')) ctx.postMessage({ type: 'progress', id, stage: 'round2', message: 'Computing permutation polynomial...' })\n else if (msg.includes('ROUND 3')) ctx.postMessage({ type: 'progress', id, stage: 'round3', message: 'Computing quotient polynomial...' })\n else if (msg.includes('ROUND 4')) ctx.postMessage({ type: 'progress', id, stage: 'round4', message: 'Computing evaluations...' })\n else if (msg.includes('ROUND 5')) ctx.postMessage({ type: 'progress', id, stage: 'round5', message: 'Computing opening proofs...' })\n else if (msg.includes('PROVER FINISHED')) ctx.postMessage({ type: 'progress', id, stage: 'done', message: 'Proof complete' })\n },\n info: () => {},\n warn: () => {},\n error: () => {},\n }\n\n ctx.postMessage({ type: 'progress', id, stage: 'witness', message: 'Computing witness...' })\n\n // Pass Uint8Array directly — snarkjs/fastfile accepts it without fetching\n const result = await snarkjs.plonk.fullProve(inputs, artifacts.wasm, artifacts.zkey, logger)\n\n ctx.postMessage({\n type: 'result',\n id,\n proof: {\n proof: { proof: result.proof, publicSignals: result.publicSignals },\n publicSignals: result.publicSignals,\n },\n })\n } catch (err: any) {\n ctx.postMessage({\n type: 'error',\n id,\n message: err?.message || String(err),\n })\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PublicClient, WalletClient, Address, Hex } from 'viem';
|
|
2
|
-
import {
|
|
2
|
+
import { B as ShieldParams, m as Note, $ as TransferParams, M as MergeParams, a5 as WithdrawParams, E as EncryptedNote } from './transfer-BhB-UuBP.cjs';
|
|
3
3
|
import { M as MasterKeys, O as OneTimeKeys, b as StarkMasterKeys } from './types-CJSbxv4q.cjs';
|
|
4
4
|
import { a as M31Digest } from './keccak-m31-B_AqBbRF.cjs';
|
|
5
5
|
import { P as Point } from './merkle-mteVOlDf.cjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PublicClient, WalletClient, Address, Hex } from 'viem';
|
|
2
|
-
import {
|
|
2
|
+
import { B as ShieldParams, m as Note, $ as TransferParams, M as MergeParams, a5 as WithdrawParams, E as EncryptedNote } from './transfer-BGzySIhC.js';
|
|
3
3
|
import { M as MasterKeys, O as OneTimeKeys, b as StarkMasterKeys } from './types-mLybMxNR.js';
|
|
4
4
|
import { a as M31Digest } from './keccak-m31-B_AqBbRF.js';
|
|
5
5
|
import { P as Point } from './merkle-mteVOlDf.js';
|