@permissionless-technologies/upp-sdk 0.4.20 → 0.4.22
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 +7 -3
- package/dist/chunk-2BSIUEPO.js +343 -0
- package/dist/chunk-2BSIUEPO.js.map +1 -0
- 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-2F4NTQRA.js → chunk-D4VCRPKS.js} +2 -2
- package/dist/{chunk-2F4NTQRA.js.map → chunk-D4VCRPKS.js.map} +1 -1
- package/dist/{chunk-FULINHKW.cjs → chunk-DYSU7JYL.cjs} +24 -24
- package/dist/{chunk-FULINHKW.cjs.map → chunk-DYSU7JYL.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-7VPW5T5R.js → chunk-UMWY4ICQ.js} +3 -3
- package/dist/{chunk-7VPW5T5R.js.map → chunk-UMWY4ICQ.js.map} +1 -1
- package/dist/{chunk-HONU4ZCL.cjs → chunk-UYPIWBKM.cjs} +2 -2
- package/dist/{chunk-HONU4ZCL.cjs.map → chunk-UYPIWBKM.cjs.map} +1 -1
- package/dist/chunk-VVW5VVY3.cjs +347 -0
- package/dist/chunk-VVW5VVY3.cjs.map +1 -0
- package/dist/{chunk-NUVI47NL.js → chunk-XDWRMHLY.js} +16 -16
- package/dist/{chunk-NUVI47NL.js.map → chunk-XDWRMHLY.js.map} +1 -1
- package/dist/core/index.cjs +83 -70
- 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 +129 -45
- 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 +97 -25
- 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-IAG5G5U5.cjs → transfer-H6UWWUSN.cjs} +12 -11
- package/dist/{transfer-IAG5G5U5.cjs.map → transfer-H6UWWUSN.cjs.map} +1 -1
- package/dist/{transfer-U5NRG5ZX.js → transfer-MLVRASM3.js} +6 -5
- package/dist/{transfer-U5NRG5ZX.js.map → transfer-MLVRASM3.js.map} +1 -1
- package/package.json +1 -1
- 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
|
|
6
|
-
var chunk5H27F6W6_cjs = require('../chunk-5H27F6W6.cjs');
|
|
7
|
-
var chunkXVIICZKW_cjs = require('../chunk-XVIICZKW.cjs');
|
|
3
|
+
var chunk632LPXPX_cjs = require('../chunk-632LPXPX.cjs');
|
|
4
|
+
var chunkDYSU7JYL_cjs = require('../chunk-DYSU7JYL.cjs');
|
|
5
|
+
var chunkIX7HV5TE_cjs = require('../chunk-IX7HV5TE.cjs');
|
|
8
6
|
var chunkSWTNJPK5_cjs = require('../chunk-SWTNJPK5.cjs');
|
|
9
7
|
require('../chunk-IIUKM5VE.cjs');
|
|
10
8
|
require('../chunk-U3YFYMWF.cjs');
|
|
9
|
+
var chunkIYRCJAME_cjs = require('../chunk-IYRCJAME.cjs');
|
|
10
|
+
var chunkXVIICZKW_cjs = require('../chunk-XVIICZKW.cjs');
|
|
11
|
+
var chunkVVW5VVY3_cjs = require('../chunk-VVW5VVY3.cjs');
|
|
11
12
|
require('../chunk-UFEDJJSH.cjs');
|
|
12
13
|
require('../chunk-HEHXSV47.cjs');
|
|
13
14
|
require('../chunk-G7VZBCD6.cjs');
|
|
@@ -16,255 +17,259 @@ 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 chunkDYSU7JYL_cjs.buildTransfer; }
|
|
40
41
|
});
|
|
41
42
|
Object.defineProperty(exports, "buildUPPTransferCircuitInputs", {
|
|
42
43
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkDYSU7JYL_cjs.buildUPPTransferCircuitInputs; }
|
|
44
45
|
});
|
|
45
46
|
Object.defineProperty(exports, "computeNullifier", {
|
|
46
47
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkDYSU7JYL_cjs.computeNullifier; }
|
|
48
49
|
});
|
|
49
50
|
Object.defineProperty(exports, "formatOutputForContract", {
|
|
50
51
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkDYSU7JYL_cjs.formatOutputForContract; }
|
|
52
53
|
});
|
|
53
54
|
Object.defineProperty(exports, "getMerkleProofsForNotes", {
|
|
54
55
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkDYSU7JYL_cjs.getMerkleProofsForNotes; }
|
|
56
57
|
});
|
|
57
58
|
Object.defineProperty(exports, "syncMerkleTree", {
|
|
58
59
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkDYSU7JYL_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
|
+
get: function () { return chunkIX7HV5TE_cjs.verifyProof; }
|
|
97
|
+
});
|
|
98
|
+
Object.defineProperty(exports, "STARK_AMOUNT_SCALE", {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function () { return chunkSWTNJPK5_cjs.STARK_AMOUNT_SCALE; }
|
|
96
101
|
});
|
|
97
102
|
Object.defineProperty(exports, "ADDRESS_VERSION", {
|
|
98
103
|
enumerable: true,
|
|
99
|
-
get: function () { return
|
|
104
|
+
get: function () { return chunkIYRCJAME_cjs.ADDRESS_VERSION; }
|
|
100
105
|
});
|
|
101
106
|
Object.defineProperty(exports, "DirectAccountAdapter", {
|
|
102
107
|
enumerable: true,
|
|
103
|
-
get: function () { return
|
|
108
|
+
get: function () { return chunkIYRCJAME_cjs.DirectAccountAdapter; }
|
|
104
109
|
});
|
|
105
110
|
Object.defineProperty(exports, "NoteStore", {
|
|
106
111
|
enumerable: true,
|
|
107
|
-
get: function () { return
|
|
112
|
+
get: function () { return chunkIYRCJAME_cjs.NoteStore; }
|
|
108
113
|
});
|
|
109
114
|
Object.defineProperty(exports, "ProofWorkerManager", {
|
|
110
115
|
enumerable: true,
|
|
111
|
-
get: function () { return
|
|
116
|
+
get: function () { return chunkIYRCJAME_cjs.ProofWorkerManager; }
|
|
112
117
|
});
|
|
113
118
|
Object.defineProperty(exports, "RATE_PRECISION", {
|
|
114
119
|
enumerable: true,
|
|
115
|
-
get: function () { return
|
|
120
|
+
get: function () { return chunkIYRCJAME_cjs.RATE_PRECISION; }
|
|
116
121
|
});
|
|
117
122
|
Object.defineProperty(exports, "STARK_ADDRESS_VERSION", {
|
|
118
123
|
enumerable: true,
|
|
119
|
-
get: function () { return
|
|
124
|
+
get: function () { return chunkIYRCJAME_cjs.STARK_ADDRESS_VERSION; }
|
|
120
125
|
});
|
|
121
126
|
Object.defineProperty(exports, "STARK_STEALTH_ADDRESS_PREFIX", {
|
|
122
127
|
enumerable: true,
|
|
123
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunkIYRCJAME_cjs.STARK_STEALTH_ADDRESS_PREFIX; }
|
|
124
129
|
});
|
|
125
130
|
Object.defineProperty(exports, "STEALTH_ADDRESS_PREFIX", {
|
|
126
131
|
enumerable: true,
|
|
127
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkIYRCJAME_cjs.STEALTH_ADDRESS_PREFIX; }
|
|
128
133
|
});
|
|
129
134
|
Object.defineProperty(exports, "SWAP_EVENTS_ABI", {
|
|
130
135
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkIYRCJAME_cjs.SWAP_EVENTS_ABI; }
|
|
132
137
|
});
|
|
133
138
|
Object.defineProperty(exports, "SWAP_ORDER_CANCELLED_EVENT", {
|
|
134
139
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
140
|
+
get: function () { return chunkIYRCJAME_cjs.SWAP_ORDER_CANCELLED_EVENT; }
|
|
136
141
|
});
|
|
137
142
|
Object.defineProperty(exports, "SWAP_ORDER_CLAIMED_EVENT", {
|
|
138
143
|
enumerable: true,
|
|
139
|
-
get: function () { return
|
|
144
|
+
get: function () { return chunkIYRCJAME_cjs.SWAP_ORDER_CLAIMED_EVENT; }
|
|
140
145
|
});
|
|
141
146
|
Object.defineProperty(exports, "SWAP_ORDER_FILLED_EVENT", {
|
|
142
147
|
enumerable: true,
|
|
143
|
-
get: function () { return
|
|
148
|
+
get: function () { return chunkIYRCJAME_cjs.SWAP_ORDER_FILLED_EVENT; }
|
|
144
149
|
});
|
|
145
150
|
Object.defineProperty(exports, "SWAP_ORDER_PLACED_EVENT", {
|
|
146
151
|
enumerable: true,
|
|
147
|
-
get: function () { return
|
|
152
|
+
get: function () { return chunkIYRCJAME_cjs.SWAP_ORDER_PLACED_EVENT; }
|
|
148
153
|
});
|
|
149
154
|
Object.defineProperty(exports, "StorableAccountAdapter", {
|
|
150
155
|
enumerable: true,
|
|
151
|
-
get: function () { return
|
|
156
|
+
get: function () { return chunkIYRCJAME_cjs.StorableAccountAdapter; }
|
|
152
157
|
});
|
|
153
158
|
Object.defineProperty(exports, "computeCancelKeyHash", {
|
|
154
159
|
enumerable: true,
|
|
155
|
-
get: function () { return
|
|
160
|
+
get: function () { return chunkIYRCJAME_cjs.computeCancelKeyHash; }
|
|
156
161
|
});
|
|
157
162
|
Object.defineProperty(exports, "computeFillPercentage", {
|
|
158
163
|
enumerable: true,
|
|
159
|
-
get: function () { return
|
|
164
|
+
get: function () { return chunkIYRCJAME_cjs.computeFillPercentage; }
|
|
160
165
|
});
|
|
161
166
|
Object.defineProperty(exports, "computeGiveAmount", {
|
|
162
167
|
enumerable: true,
|
|
163
|
-
get: function () { return
|
|
168
|
+
get: function () { return chunkIYRCJAME_cjs.computeGiveAmount; }
|
|
164
169
|
});
|
|
165
170
|
Object.defineProperty(exports, "computeNoteEncryptionKey", {
|
|
166
171
|
enumerable: true,
|
|
167
|
-
get: function () { return
|
|
172
|
+
get: function () { return chunkIYRCJAME_cjs.computeNoteEncryptionKey; }
|
|
168
173
|
});
|
|
169
174
|
Object.defineProperty(exports, "computeRate", {
|
|
170
175
|
enumerable: true,
|
|
171
|
-
get: function () { return
|
|
176
|
+
get: function () { return chunkIYRCJAME_cjs.computeRate; }
|
|
172
177
|
});
|
|
173
178
|
Object.defineProperty(exports, "computeTakeAmount", {
|
|
174
179
|
enumerable: true,
|
|
175
|
-
get: function () { return
|
|
180
|
+
get: function () { return chunkIYRCJAME_cjs.computeTakeAmount; }
|
|
176
181
|
});
|
|
177
182
|
Object.defineProperty(exports, "computeTotalBuyAmount", {
|
|
178
183
|
enumerable: true,
|
|
179
|
-
get: function () { return
|
|
184
|
+
get: function () { return chunkIYRCJAME_cjs.computeTotalBuyAmount; }
|
|
180
185
|
});
|
|
181
186
|
Object.defineProperty(exports, "createOneTimeKeys", {
|
|
182
187
|
enumerable: true,
|
|
183
|
-
get: function () { return
|
|
188
|
+
get: function () { return chunkIYRCJAME_cjs.createOneTimeKeys; }
|
|
184
189
|
});
|
|
185
190
|
Object.defineProperty(exports, "decodeStarkStealthAddress", {
|
|
186
191
|
enumerable: true,
|
|
187
|
-
get: function () { return
|
|
192
|
+
get: function () { return chunkIYRCJAME_cjs.decodeStarkStealthAddress; }
|
|
188
193
|
});
|
|
189
194
|
Object.defineProperty(exports, "decodeStealthAddress", {
|
|
190
195
|
enumerable: true,
|
|
191
|
-
get: function () { return
|
|
196
|
+
get: function () { return chunkIYRCJAME_cjs.decodeStealthAddress; }
|
|
192
197
|
});
|
|
193
198
|
Object.defineProperty(exports, "detectAddressType", {
|
|
194
199
|
enumerable: true,
|
|
195
|
-
get: function () { return
|
|
200
|
+
get: function () { return chunkIYRCJAME_cjs.detectAddressType; }
|
|
196
201
|
});
|
|
197
202
|
Object.defineProperty(exports, "encodeStarkStealthAddress", {
|
|
198
203
|
enumerable: true,
|
|
199
|
-
get: function () { return
|
|
204
|
+
get: function () { return chunkIYRCJAME_cjs.encodeStarkStealthAddress; }
|
|
200
205
|
});
|
|
201
206
|
Object.defineProperty(exports, "encodeStealthAddress", {
|
|
202
207
|
enumerable: true,
|
|
203
|
-
get: function () { return
|
|
208
|
+
get: function () { return chunkIYRCJAME_cjs.encodeStealthAddress; }
|
|
204
209
|
});
|
|
205
210
|
Object.defineProperty(exports, "filterOrdersByASP", {
|
|
206
211
|
enumerable: true,
|
|
207
|
-
get: function () { return
|
|
212
|
+
get: function () { return chunkIYRCJAME_cjs.filterOrdersByASP; }
|
|
208
213
|
});
|
|
209
214
|
Object.defineProperty(exports, "filterOrdersByTokenPair", {
|
|
210
215
|
enumerable: true,
|
|
211
|
-
get: function () { return
|
|
216
|
+
get: function () { return chunkIYRCJAME_cjs.filterOrdersByTokenPair; }
|
|
212
217
|
});
|
|
213
218
|
Object.defineProperty(exports, "formatRate", {
|
|
214
219
|
enumerable: true,
|
|
215
|
-
get: function () { return
|
|
220
|
+
get: function () { return chunkIYRCJAME_cjs.formatRate; }
|
|
216
221
|
});
|
|
217
222
|
Object.defineProperty(exports, "generateCancelSecret", {
|
|
218
223
|
enumerable: true,
|
|
219
|
-
get: function () { return
|
|
224
|
+
get: function () { return chunkIYRCJAME_cjs.generateCancelSecret; }
|
|
220
225
|
});
|
|
221
226
|
Object.defineProperty(exports, "generateStarkStealthAddress", {
|
|
222
227
|
enumerable: true,
|
|
223
|
-
get: function () { return
|
|
228
|
+
get: function () { return chunkIYRCJAME_cjs.generateStarkStealthAddress; }
|
|
224
229
|
});
|
|
225
230
|
Object.defineProperty(exports, "generateStealthAddress", {
|
|
226
231
|
enumerable: true,
|
|
227
|
-
get: function () { return
|
|
232
|
+
get: function () { return chunkIYRCJAME_cjs.generateStealthAddress; }
|
|
228
233
|
});
|
|
229
234
|
Object.defineProperty(exports, "generateUPPProofAsync", {
|
|
230
235
|
enumerable: true,
|
|
231
|
-
get: function () { return
|
|
236
|
+
get: function () { return chunkIYRCJAME_cjs.generateUPPProofAsync; }
|
|
232
237
|
});
|
|
233
238
|
Object.defineProperty(exports, "getCancelSecret", {
|
|
234
239
|
enumerable: true,
|
|
235
|
-
get: function () { return
|
|
240
|
+
get: function () { return chunkIYRCJAME_cjs.getCancelSecret; }
|
|
236
241
|
});
|
|
237
242
|
Object.defineProperty(exports, "getOwnOrderIds", {
|
|
238
243
|
enumerable: true,
|
|
239
|
-
get: function () { return
|
|
244
|
+
get: function () { return chunkIYRCJAME_cjs.getOwnOrderIds; }
|
|
240
245
|
});
|
|
241
246
|
Object.defineProperty(exports, "isFillerASPAccepted", {
|
|
242
247
|
enumerable: true,
|
|
243
|
-
get: function () { return
|
|
248
|
+
get: function () { return chunkIYRCJAME_cjs.isFillerASPAccepted; }
|
|
244
249
|
});
|
|
245
250
|
Object.defineProperty(exports, "isOrderActive", {
|
|
246
251
|
enumerable: true,
|
|
247
|
-
get: function () { return
|
|
252
|
+
get: function () { return chunkIYRCJAME_cjs.isOrderActive; }
|
|
248
253
|
});
|
|
249
254
|
Object.defineProperty(exports, "isValidStarkStealthAddress", {
|
|
250
255
|
enumerable: true,
|
|
251
|
-
get: function () { return
|
|
256
|
+
get: function () { return chunkIYRCJAME_cjs.isValidStarkStealthAddress; }
|
|
252
257
|
});
|
|
253
258
|
Object.defineProperty(exports, "isValidStealthAddress", {
|
|
254
259
|
enumerable: true,
|
|
255
|
-
get: function () { return
|
|
260
|
+
get: function () { return chunkIYRCJAME_cjs.isValidStealthAddress; }
|
|
256
261
|
});
|
|
257
262
|
Object.defineProperty(exports, "removeCancelSecret", {
|
|
258
263
|
enumerable: true,
|
|
259
|
-
get: function () { return
|
|
264
|
+
get: function () { return chunkIYRCJAME_cjs.removeCancelSecret; }
|
|
260
265
|
});
|
|
261
266
|
Object.defineProperty(exports, "storeCancelSecret", {
|
|
262
267
|
enumerable: true,
|
|
263
|
-
get: function () { return
|
|
268
|
+
get: function () { return chunkIYRCJAME_cjs.storeCancelSecret; }
|
|
264
269
|
});
|
|
265
270
|
Object.defineProperty(exports, "verifyOwnership", {
|
|
266
271
|
enumerable: true,
|
|
267
|
-
get: function () { return
|
|
272
|
+
get: function () { return chunkIYRCJAME_cjs.verifyOwnership; }
|
|
268
273
|
});
|
|
269
274
|
Object.defineProperty(exports, "DEMO_ASP_ID", {
|
|
270
275
|
enumerable: true,
|
|
@@ -306,9 +311,17 @@ Object.defineProperty(exports, "verifyASPProof", {
|
|
|
306
311
|
enumerable: true,
|
|
307
312
|
get: function () { return chunkXVIICZKW_cjs.verifyASPProof; }
|
|
308
313
|
});
|
|
309
|
-
Object.defineProperty(exports, "
|
|
314
|
+
Object.defineProperty(exports, "CIRCUIT_CDN_BASE", {
|
|
310
315
|
enumerable: true,
|
|
311
|
-
get: function () { return
|
|
316
|
+
get: function () { return chunkVVW5VVY3_cjs.CIRCUIT_CDN_BASE; }
|
|
317
|
+
});
|
|
318
|
+
Object.defineProperty(exports, "CIRCUIT_VERSION", {
|
|
319
|
+
enumerable: true,
|
|
320
|
+
get: function () { return chunkVVW5VVY3_cjs.CIRCUIT_VERSION; }
|
|
321
|
+
});
|
|
322
|
+
Object.defineProperty(exports, "CircuitArtifactCache", {
|
|
323
|
+
enumerable: true,
|
|
324
|
+
get: function () { return chunkVVW5VVY3_cjs.CircuitArtifactCache; }
|
|
312
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-
|
|
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-C7DUABSG.js';
|
|
5
|
-
export { DEMO_ASP_ID, DEMO_ASP_NAME, buildASPTree, computeMultiOriginASPRoot, computeSingleOriginASPRoot, createDemoASPRoot, generateASPProof, generateMultiOriginASPProof, generateSingleOriginASPProof, verifyASPProof } from '../chunk-6IEYWJVS.js';
|
|
1
|
+
export { NOTE_VERSION, createNote, createUPPClient, decryptNote, encryptNote } from '../chunk-UMWY4ICQ.js';
|
|
2
|
+
export { buildTransfer, buildUPPTransferCircuitInputs, computeNullifier, formatOutputForContract, getMerkleProofsForNotes, syncMerkleTree } from '../chunk-XDWRMHLY.js';
|
|
3
|
+
export { ASP_TREE_DEPTH, STATE_TREE_DEPTH, formatProofForContract, generateProof, generateStealthProof, generateUPPProof, getStealthCircuitArtifacts, getUPPCircuitArtifacts, verifyProof } from '../chunk-KR4GB6VC.js';
|
|
6
4
|
export { STARK_AMOUNT_SCALE } from '../chunk-7T4CUE6E.js';
|
|
7
5
|
import '../chunk-GPF72JFR.js';
|
|
8
6
|
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-Q6BLTPWV.js';
|
|
8
|
+
export { DEMO_ASP_ID, DEMO_ASP_NAME, buildASPTree, computeMultiOriginASPRoot, computeSingleOriginASPRoot, createDemoASPRoot, generateASPProof, generateMultiOriginASPProof, generateSingleOriginASPProof, verifyASPProof } from '../chunk-6IEYWJVS.js';
|
|
9
|
+
export { CIRCUIT_CDN_BASE, CIRCUIT_VERSION, CircuitArtifactCache } from '../chunk-2BSIUEPO.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,EAAW,OAAA,EAAS,8BAAA,EAAgC,CAAA;AAEnG,IAAA,MAAM,OAAA,GAAU,MAAM,WAAA,EAAY;AAElC,IAAA,MAAM,M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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
|
+
{"version":3,"sources":["../../src/core/proof-worker-entry.ts"],"names":[],"mappings":";;;;AAiBA,IAAM,GAAA,GAAM,UAAA;AAEZ,IAAI,aAAA,GA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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';
|