@noir-lang/acvm_js 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/nodejs/acvm_js.d.ts +141 -0
- package/nodejs/acvm_js.js +1077 -0
- package/nodejs/acvm_js_bg.wasm +0 -0
- package/nodejs/acvm_js_bg.wasm.d.ts +24 -0
- package/package.json +24 -0
- package/web/acvm_js.d.ts +189 -0
- package/web/acvm_js.js +1055 -0
- package/web/acvm_js_bg.wasm +0 -0
- package/web/acvm_js_bg.wasm.d.ts +24 -0
|
@@ -0,0 +1,1077 @@
|
|
|
1
|
+
let imports = {};
|
|
2
|
+
imports['__wbindgen_placeholder__'] = module.exports;
|
|
3
|
+
let wasm;
|
|
4
|
+
const { TextDecoder, TextEncoder } = require(`util`);
|
|
5
|
+
|
|
6
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
7
|
+
|
|
8
|
+
cachedTextDecoder.decode();
|
|
9
|
+
|
|
10
|
+
let cachedUint8Memory0 = null;
|
|
11
|
+
|
|
12
|
+
function getUint8Memory0() {
|
|
13
|
+
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
14
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
15
|
+
}
|
|
16
|
+
return cachedUint8Memory0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function getStringFromWasm0(ptr, len) {
|
|
20
|
+
ptr = ptr >>> 0;
|
|
21
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const heap = new Array(128).fill(undefined);
|
|
25
|
+
|
|
26
|
+
heap.push(undefined, null, true, false);
|
|
27
|
+
|
|
28
|
+
let heap_next = heap.length;
|
|
29
|
+
|
|
30
|
+
function addHeapObject(obj) {
|
|
31
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
32
|
+
const idx = heap_next;
|
|
33
|
+
heap_next = heap[idx];
|
|
34
|
+
|
|
35
|
+
heap[idx] = obj;
|
|
36
|
+
return idx;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function getObject(idx) { return heap[idx]; }
|
|
40
|
+
|
|
41
|
+
function dropObject(idx) {
|
|
42
|
+
if (idx < 132) return;
|
|
43
|
+
heap[idx] = heap_next;
|
|
44
|
+
heap_next = idx;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function takeObject(idx) {
|
|
48
|
+
const ret = getObject(idx);
|
|
49
|
+
dropObject(idx);
|
|
50
|
+
return ret;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function isLikeNone(x) {
|
|
54
|
+
return x === undefined || x === null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
let cachedFloat64Memory0 = null;
|
|
58
|
+
|
|
59
|
+
function getFloat64Memory0() {
|
|
60
|
+
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
61
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
62
|
+
}
|
|
63
|
+
return cachedFloat64Memory0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
let cachedInt32Memory0 = null;
|
|
67
|
+
|
|
68
|
+
function getInt32Memory0() {
|
|
69
|
+
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
70
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
71
|
+
}
|
|
72
|
+
return cachedInt32Memory0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
let WASM_VECTOR_LEN = 0;
|
|
76
|
+
|
|
77
|
+
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
78
|
+
|
|
79
|
+
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
80
|
+
? function (arg, view) {
|
|
81
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
82
|
+
}
|
|
83
|
+
: function (arg, view) {
|
|
84
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
85
|
+
view.set(buf);
|
|
86
|
+
return {
|
|
87
|
+
read: arg.length,
|
|
88
|
+
written: buf.length
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
93
|
+
|
|
94
|
+
if (realloc === undefined) {
|
|
95
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
96
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
97
|
+
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
98
|
+
WASM_VECTOR_LEN = buf.length;
|
|
99
|
+
return ptr;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
let len = arg.length;
|
|
103
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
104
|
+
|
|
105
|
+
const mem = getUint8Memory0();
|
|
106
|
+
|
|
107
|
+
let offset = 0;
|
|
108
|
+
|
|
109
|
+
for (; offset < len; offset++) {
|
|
110
|
+
const code = arg.charCodeAt(offset);
|
|
111
|
+
if (code > 0x7F) break;
|
|
112
|
+
mem[ptr + offset] = code;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (offset !== len) {
|
|
116
|
+
if (offset !== 0) {
|
|
117
|
+
arg = arg.slice(offset);
|
|
118
|
+
}
|
|
119
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
120
|
+
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
121
|
+
const ret = encodeString(arg, view);
|
|
122
|
+
|
|
123
|
+
offset += ret.written;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
WASM_VECTOR_LEN = offset;
|
|
127
|
+
return ptr;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
let cachedBigInt64Memory0 = null;
|
|
131
|
+
|
|
132
|
+
function getBigInt64Memory0() {
|
|
133
|
+
if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
|
|
134
|
+
cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
|
|
135
|
+
}
|
|
136
|
+
return cachedBigInt64Memory0;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function debugString(val) {
|
|
140
|
+
// primitive types
|
|
141
|
+
const type = typeof val;
|
|
142
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
143
|
+
return `${val}`;
|
|
144
|
+
}
|
|
145
|
+
if (type == 'string') {
|
|
146
|
+
return `"${val}"`;
|
|
147
|
+
}
|
|
148
|
+
if (type == 'symbol') {
|
|
149
|
+
const description = val.description;
|
|
150
|
+
if (description == null) {
|
|
151
|
+
return 'Symbol';
|
|
152
|
+
} else {
|
|
153
|
+
return `Symbol(${description})`;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (type == 'function') {
|
|
157
|
+
const name = val.name;
|
|
158
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
159
|
+
return `Function(${name})`;
|
|
160
|
+
} else {
|
|
161
|
+
return 'Function';
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
// objects
|
|
165
|
+
if (Array.isArray(val)) {
|
|
166
|
+
const length = val.length;
|
|
167
|
+
let debug = '[';
|
|
168
|
+
if (length > 0) {
|
|
169
|
+
debug += debugString(val[0]);
|
|
170
|
+
}
|
|
171
|
+
for(let i = 1; i < length; i++) {
|
|
172
|
+
debug += ', ' + debugString(val[i]);
|
|
173
|
+
}
|
|
174
|
+
debug += ']';
|
|
175
|
+
return debug;
|
|
176
|
+
}
|
|
177
|
+
// Test for built-in
|
|
178
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
179
|
+
let className;
|
|
180
|
+
if (builtInMatches.length > 1) {
|
|
181
|
+
className = builtInMatches[1];
|
|
182
|
+
} else {
|
|
183
|
+
// Failed to match the standard '[object ClassName]'
|
|
184
|
+
return toString.call(val);
|
|
185
|
+
}
|
|
186
|
+
if (className == 'Object') {
|
|
187
|
+
// we're a user defined class or Object
|
|
188
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
189
|
+
// easier than looping through ownProperties of `val`.
|
|
190
|
+
try {
|
|
191
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
192
|
+
} catch (_) {
|
|
193
|
+
return 'Object';
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
// errors
|
|
197
|
+
if (val instanceof Error) {
|
|
198
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
199
|
+
}
|
|
200
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
201
|
+
return className;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
205
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
206
|
+
const real = (...args) => {
|
|
207
|
+
// First up with a closure we increment the internal reference
|
|
208
|
+
// count. This ensures that the Rust closure environment won't
|
|
209
|
+
// be deallocated while we're invoking it.
|
|
210
|
+
state.cnt++;
|
|
211
|
+
const a = state.a;
|
|
212
|
+
state.a = 0;
|
|
213
|
+
try {
|
|
214
|
+
return f(a, state.b, ...args);
|
|
215
|
+
} finally {
|
|
216
|
+
if (--state.cnt === 0) {
|
|
217
|
+
wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
|
|
218
|
+
|
|
219
|
+
} else {
|
|
220
|
+
state.a = a;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
real.original = state;
|
|
225
|
+
|
|
226
|
+
return real;
|
|
227
|
+
}
|
|
228
|
+
function __wbg_adapter_54(arg0, arg1, arg2) {
|
|
229
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8fdacd768a9ff6b4(arg0, arg1, addHeapObject(arg2));
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Returns the `BuildInfo` object containing information about how the installed package was built.
|
|
234
|
+
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
235
|
+
*/
|
|
236
|
+
module.exports.buildInfo = function() {
|
|
237
|
+
const ret = wasm.buildInfo();
|
|
238
|
+
return takeObject(ret);
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
function _assertClass(instance, klass) {
|
|
242
|
+
if (!(instance instanceof klass)) {
|
|
243
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
244
|
+
}
|
|
245
|
+
return instance.ptr;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
249
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
250
|
+
getUint8Memory0().set(arg, ptr / 1);
|
|
251
|
+
WASM_VECTOR_LEN = arg.length;
|
|
252
|
+
return ptr;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
256
|
+
*
|
|
257
|
+
* @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
|
|
258
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
259
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
260
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
261
|
+
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
262
|
+
*/
|
|
263
|
+
module.exports.executeCircuitWithBlackBoxSolver = function(solver, circuit, initial_witness, foreign_call_handler) {
|
|
264
|
+
_assertClass(solver, WasmBlackBoxFunctionSolver);
|
|
265
|
+
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
|
|
266
|
+
const len0 = WASM_VECTOR_LEN;
|
|
267
|
+
const ret = wasm.executeCircuitWithBlackBoxSolver(solver.__wbg_ptr, ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
268
|
+
return takeObject(ret);
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
273
|
+
*
|
|
274
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
275
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
276
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
277
|
+
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
278
|
+
*/
|
|
279
|
+
module.exports.executeCircuit = function(circuit, initial_witness, foreign_call_handler) {
|
|
280
|
+
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
|
|
281
|
+
const len0 = WASM_VECTOR_LEN;
|
|
282
|
+
const ret = wasm.executeCircuit(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
283
|
+
return takeObject(ret);
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* @returns {Promise<WasmBlackBoxFunctionSolver>}
|
|
288
|
+
*/
|
|
289
|
+
module.exports.createBlackBoxSolver = function() {
|
|
290
|
+
const ret = wasm.createBlackBoxSolver();
|
|
291
|
+
return takeObject(ret);
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
|
|
296
|
+
*
|
|
297
|
+
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
298
|
+
* @returns {WitnessMap} The decompressed witness map.
|
|
299
|
+
*/
|
|
300
|
+
module.exports.decompressWitness = function(compressed_witness) {
|
|
301
|
+
try {
|
|
302
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
303
|
+
const ptr0 = passArray8ToWasm0(compressed_witness, wasm.__wbindgen_malloc);
|
|
304
|
+
const len0 = WASM_VECTOR_LEN;
|
|
305
|
+
wasm.decompressWitness(retptr, ptr0, len0);
|
|
306
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
307
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
308
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
309
|
+
if (r2) {
|
|
310
|
+
throw takeObject(r1);
|
|
311
|
+
}
|
|
312
|
+
return takeObject(r0);
|
|
313
|
+
} finally {
|
|
314
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
319
|
+
ptr = ptr >>> 0;
|
|
320
|
+
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
324
|
+
*
|
|
325
|
+
* @param {Uint8Array} compressed_witness - A witness map.
|
|
326
|
+
* @returns {WitnessMap} A compressed witness map
|
|
327
|
+
*/
|
|
328
|
+
module.exports.compressWitness = function(witness_map) {
|
|
329
|
+
try {
|
|
330
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
331
|
+
wasm.compressWitness(retptr, addHeapObject(witness_map));
|
|
332
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
333
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
334
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
335
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
336
|
+
if (r3) {
|
|
337
|
+
throw takeObject(r2);
|
|
338
|
+
}
|
|
339
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
340
|
+
wasm.__wbindgen_free(r0, r1 * 1);
|
|
341
|
+
return v1;
|
|
342
|
+
} finally {
|
|
343
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
344
|
+
}
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Sets the package's logging level.
|
|
349
|
+
*
|
|
350
|
+
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
351
|
+
*/
|
|
352
|
+
module.exports.initLogLevel = function(level) {
|
|
353
|
+
wasm.initLogLevel(addHeapObject(level));
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
|
|
358
|
+
*
|
|
359
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
360
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
361
|
+
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
|
|
362
|
+
* @param {Uint8Array} circuit
|
|
363
|
+
* @param {WitnessMap} solved_witness
|
|
364
|
+
* @returns {WitnessMap}
|
|
365
|
+
*/
|
|
366
|
+
module.exports.getPublicWitness = function(circuit, solved_witness) {
|
|
367
|
+
try {
|
|
368
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
369
|
+
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
|
|
370
|
+
const len0 = WASM_VECTOR_LEN;
|
|
371
|
+
wasm.getPublicWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
|
|
372
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
373
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
374
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
375
|
+
if (r2) {
|
|
376
|
+
throw takeObject(r1);
|
|
377
|
+
}
|
|
378
|
+
return takeObject(r0);
|
|
379
|
+
} finally {
|
|
380
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
|
|
386
|
+
*
|
|
387
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
388
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
389
|
+
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
|
|
390
|
+
* @param {Uint8Array} circuit
|
|
391
|
+
* @param {WitnessMap} solved_witness
|
|
392
|
+
* @returns {WitnessMap}
|
|
393
|
+
*/
|
|
394
|
+
module.exports.getPublicParametersWitness = function(circuit, solved_witness) {
|
|
395
|
+
try {
|
|
396
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
397
|
+
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
|
|
398
|
+
const len0 = WASM_VECTOR_LEN;
|
|
399
|
+
wasm.getPublicParametersWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
|
|
400
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
401
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
402
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
403
|
+
if (r2) {
|
|
404
|
+
throw takeObject(r1);
|
|
405
|
+
}
|
|
406
|
+
return takeObject(r0);
|
|
407
|
+
} finally {
|
|
408
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
|
|
414
|
+
*
|
|
415
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
416
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
417
|
+
* @returns {WitnessMap} A witness map containing the circuit's return values.
|
|
418
|
+
* @param {Uint8Array} circuit
|
|
419
|
+
* @param {WitnessMap} witness_map
|
|
420
|
+
* @returns {WitnessMap}
|
|
421
|
+
*/
|
|
422
|
+
module.exports.getReturnWitness = function(circuit, witness_map) {
|
|
423
|
+
try {
|
|
424
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
425
|
+
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
|
|
426
|
+
const len0 = WASM_VECTOR_LEN;
|
|
427
|
+
wasm.getReturnWitness(retptr, ptr0, len0, addHeapObject(witness_map));
|
|
428
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
429
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
430
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
431
|
+
if (r2) {
|
|
432
|
+
throw takeObject(r1);
|
|
433
|
+
}
|
|
434
|
+
return takeObject(r0);
|
|
435
|
+
} finally {
|
|
436
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
function handleError(f, args) {
|
|
441
|
+
try {
|
|
442
|
+
return f.apply(this, args);
|
|
443
|
+
} catch (e) {
|
|
444
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
function __wbg_adapter_148(arg0, arg1, arg2, arg3) {
|
|
448
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h2def3b115f9d10e4(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* A struct representing a Trap
|
|
453
|
+
*/
|
|
454
|
+
class Trap {
|
|
455
|
+
|
|
456
|
+
__destroy_into_raw() {
|
|
457
|
+
const ptr = this.__wbg_ptr;
|
|
458
|
+
this.__wbg_ptr = 0;
|
|
459
|
+
|
|
460
|
+
return ptr;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
free() {
|
|
464
|
+
const ptr = this.__destroy_into_raw();
|
|
465
|
+
wasm.__wbg_trap_free(ptr);
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* @returns {Symbol}
|
|
469
|
+
*/
|
|
470
|
+
static __wbgd_downcast_token() {
|
|
471
|
+
const ret = wasm.trap___wbgd_downcast_token();
|
|
472
|
+
return takeObject(ret);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
module.exports.Trap = Trap;
|
|
476
|
+
/**
|
|
477
|
+
*/
|
|
478
|
+
class WasmBlackBoxFunctionSolver {
|
|
479
|
+
|
|
480
|
+
static __wrap(ptr) {
|
|
481
|
+
ptr = ptr >>> 0;
|
|
482
|
+
const obj = Object.create(WasmBlackBoxFunctionSolver.prototype);
|
|
483
|
+
obj.__wbg_ptr = ptr;
|
|
484
|
+
|
|
485
|
+
return obj;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
__destroy_into_raw() {
|
|
489
|
+
const ptr = this.__wbg_ptr;
|
|
490
|
+
this.__wbg_ptr = 0;
|
|
491
|
+
|
|
492
|
+
return ptr;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
free() {
|
|
496
|
+
const ptr = this.__destroy_into_raw();
|
|
497
|
+
wasm.__wbg_wasmblackboxfunctionsolver_free(ptr);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
module.exports.WasmBlackBoxFunctionSolver = WasmBlackBoxFunctionSolver;
|
|
501
|
+
|
|
502
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
503
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
504
|
+
return addHeapObject(ret);
|
|
505
|
+
};
|
|
506
|
+
|
|
507
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
508
|
+
takeObject(arg0);
|
|
509
|
+
};
|
|
510
|
+
|
|
511
|
+
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
512
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
513
|
+
return addHeapObject(ret);
|
|
514
|
+
};
|
|
515
|
+
|
|
516
|
+
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
517
|
+
const ret = getObject(arg0);
|
|
518
|
+
return addHeapObject(ret);
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
module.exports.__wbg_wasmblackboxfunctionsolver_new = function(arg0) {
|
|
522
|
+
const ret = WasmBlackBoxFunctionSolver.__wrap(arg0);
|
|
523
|
+
return addHeapObject(ret);
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
module.exports.__wbindgen_number_get = function(arg0, arg1) {
|
|
527
|
+
const obj = getObject(arg1);
|
|
528
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
529
|
+
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
530
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
534
|
+
const ret = getObject(arg0) === undefined;
|
|
535
|
+
return ret;
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
module.exports.__wbindgen_is_array = function(arg0) {
|
|
539
|
+
const ret = Array.isArray(getObject(arg0));
|
|
540
|
+
return ret;
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
544
|
+
const obj = takeObject(arg0).original;
|
|
545
|
+
if (obj.cnt-- == 1) {
|
|
546
|
+
obj.a = 0;
|
|
547
|
+
return true;
|
|
548
|
+
}
|
|
549
|
+
const ret = false;
|
|
550
|
+
return ret;
|
|
551
|
+
};
|
|
552
|
+
|
|
553
|
+
module.exports.__wbg_constructor_95333db3bb3f7aa0 = function(arg0) {
|
|
554
|
+
const ret = new Error(takeObject(arg0));
|
|
555
|
+
return addHeapObject(ret);
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
559
|
+
const obj = getObject(arg1);
|
|
560
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
561
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
562
|
+
var len1 = WASM_VECTOR_LEN;
|
|
563
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
564
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
module.exports.__wbg_new_dd47653ba06d189d = function() {
|
|
568
|
+
const ret = new Map();
|
|
569
|
+
return addHeapObject(ret);
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
module.exports.__wbindgen_number_new = function(arg0) {
|
|
573
|
+
const ret = arg0;
|
|
574
|
+
return addHeapObject(ret);
|
|
575
|
+
};
|
|
576
|
+
|
|
577
|
+
module.exports.__wbindgen_is_string = function(arg0) {
|
|
578
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
579
|
+
return ret;
|
|
580
|
+
};
|
|
581
|
+
|
|
582
|
+
module.exports.__wbg_new_abda76e883ba8a5f = function() {
|
|
583
|
+
const ret = new Error();
|
|
584
|
+
return addHeapObject(ret);
|
|
585
|
+
};
|
|
586
|
+
|
|
587
|
+
module.exports.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
|
|
588
|
+
const ret = getObject(arg1).stack;
|
|
589
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
590
|
+
const len1 = WASM_VECTOR_LEN;
|
|
591
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
592
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
596
|
+
let deferred0_0;
|
|
597
|
+
let deferred0_1;
|
|
598
|
+
try {
|
|
599
|
+
deferred0_0 = arg0;
|
|
600
|
+
deferred0_1 = arg1;
|
|
601
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
602
|
+
} finally {
|
|
603
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
604
|
+
}
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
608
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
609
|
+
return addHeapObject(ret);
|
|
610
|
+
};
|
|
611
|
+
|
|
612
|
+
module.exports.__wbindgen_shr = function(arg0, arg1) {
|
|
613
|
+
const ret = getObject(arg0) >> getObject(arg1);
|
|
614
|
+
return addHeapObject(ret);
|
|
615
|
+
};
|
|
616
|
+
|
|
617
|
+
module.exports.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
618
|
+
const ret = getObject(arg0) === getObject(arg1);
|
|
619
|
+
return ret;
|
|
620
|
+
};
|
|
621
|
+
|
|
622
|
+
module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
623
|
+
const ret = arg0;
|
|
624
|
+
return addHeapObject(ret);
|
|
625
|
+
};
|
|
626
|
+
|
|
627
|
+
module.exports.__wbindgen_bigint_from_u128 = function(arg0, arg1) {
|
|
628
|
+
const ret = BigInt.asUintN(64, arg0) << BigInt(64) | BigInt.asUintN(64, arg1);
|
|
629
|
+
return addHeapObject(ret);
|
|
630
|
+
};
|
|
631
|
+
|
|
632
|
+
module.exports.__wbindgen_ge = function(arg0, arg1) {
|
|
633
|
+
const ret = getObject(arg0) >= getObject(arg1);
|
|
634
|
+
return ret;
|
|
635
|
+
};
|
|
636
|
+
|
|
637
|
+
module.exports.__wbindgen_is_bigint = function(arg0) {
|
|
638
|
+
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
639
|
+
return ret;
|
|
640
|
+
};
|
|
641
|
+
|
|
642
|
+
module.exports.__wbindgen_is_object = function(arg0) {
|
|
643
|
+
const val = getObject(arg0);
|
|
644
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
645
|
+
return ret;
|
|
646
|
+
};
|
|
647
|
+
|
|
648
|
+
module.exports.__wbindgen_is_function = function(arg0) {
|
|
649
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
650
|
+
return ret;
|
|
651
|
+
};
|
|
652
|
+
|
|
653
|
+
module.exports.__wbg_instanceof_Global_68951a6a6244ac6e = function(arg0) {
|
|
654
|
+
let result;
|
|
655
|
+
try {
|
|
656
|
+
result = getObject(arg0) instanceof WebAssembly.Global;
|
|
657
|
+
} catch {
|
|
658
|
+
result = false;
|
|
659
|
+
}
|
|
660
|
+
const ret = result;
|
|
661
|
+
return ret;
|
|
662
|
+
};
|
|
663
|
+
|
|
664
|
+
module.exports.__wbg_static_accessor_SYMBOL_45d4d15e3c4aeb33 = function() {
|
|
665
|
+
const ret = Symbol;
|
|
666
|
+
return addHeapObject(ret);
|
|
667
|
+
};
|
|
668
|
+
|
|
669
|
+
module.exports.__wbindgen_is_symbol = function(arg0) {
|
|
670
|
+
const ret = typeof(getObject(arg0)) === 'symbol';
|
|
671
|
+
return ret;
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
module.exports.__wbg_getRandomValues_37fa2ca9e4e07fab = function() { return handleError(function (arg0, arg1) {
|
|
675
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
|
676
|
+
}, arguments) };
|
|
677
|
+
|
|
678
|
+
module.exports.__wbg_randomFillSync_dc1e9a60c158336d = function() { return handleError(function (arg0, arg1) {
|
|
679
|
+
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
680
|
+
}, arguments) };
|
|
681
|
+
|
|
682
|
+
module.exports.__wbg_crypto_c48a774b022d20ac = function(arg0) {
|
|
683
|
+
const ret = getObject(arg0).crypto;
|
|
684
|
+
return addHeapObject(ret);
|
|
685
|
+
};
|
|
686
|
+
|
|
687
|
+
module.exports.__wbg_process_298734cf255a885d = function(arg0) {
|
|
688
|
+
const ret = getObject(arg0).process;
|
|
689
|
+
return addHeapObject(ret);
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
module.exports.__wbg_versions_e2e78e134e3e5d01 = function(arg0) {
|
|
693
|
+
const ret = getObject(arg0).versions;
|
|
694
|
+
return addHeapObject(ret);
|
|
695
|
+
};
|
|
696
|
+
|
|
697
|
+
module.exports.__wbg_node_1cd7a5d853dbea79 = function(arg0) {
|
|
698
|
+
const ret = getObject(arg0).node;
|
|
699
|
+
return addHeapObject(ret);
|
|
700
|
+
};
|
|
701
|
+
|
|
702
|
+
module.exports.__wbg_msCrypto_bcb970640f50a1e8 = function(arg0) {
|
|
703
|
+
const ret = getObject(arg0).msCrypto;
|
|
704
|
+
return addHeapObject(ret);
|
|
705
|
+
};
|
|
706
|
+
|
|
707
|
+
module.exports.__wbg_require_8f08ceecec0f4fee = function() { return handleError(function () {
|
|
708
|
+
const ret = module.require;
|
|
709
|
+
return addHeapObject(ret);
|
|
710
|
+
}, arguments) };
|
|
711
|
+
|
|
712
|
+
module.exports.__wbg_debug_9b8701f894da9929 = function(arg0, arg1, arg2, arg3) {
|
|
713
|
+
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
714
|
+
};
|
|
715
|
+
|
|
716
|
+
module.exports.__wbg_error_788ae33f81d3b84b = function(arg0) {
|
|
717
|
+
console.error(getObject(arg0));
|
|
718
|
+
};
|
|
719
|
+
|
|
720
|
+
module.exports.__wbg_error_d9bce418caafb712 = function(arg0, arg1, arg2, arg3) {
|
|
721
|
+
console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
722
|
+
};
|
|
723
|
+
|
|
724
|
+
module.exports.__wbg_info_bb52f40b06f679de = function(arg0, arg1, arg2, arg3) {
|
|
725
|
+
console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
726
|
+
};
|
|
727
|
+
|
|
728
|
+
module.exports.__wbg_log_ea7093e35e3efd07 = function(arg0, arg1, arg2, arg3) {
|
|
729
|
+
console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
730
|
+
};
|
|
731
|
+
|
|
732
|
+
module.exports.__wbg_warn_dfc0e0cf544a13bd = function(arg0, arg1, arg2, arg3) {
|
|
733
|
+
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
734
|
+
};
|
|
735
|
+
|
|
736
|
+
module.exports.__wbg_get_44be0491f933a435 = function(arg0, arg1) {
|
|
737
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
738
|
+
return addHeapObject(ret);
|
|
739
|
+
};
|
|
740
|
+
|
|
741
|
+
module.exports.__wbg_length_fff51ee6522a1a18 = function(arg0) {
|
|
742
|
+
const ret = getObject(arg0).length;
|
|
743
|
+
return ret;
|
|
744
|
+
};
|
|
745
|
+
|
|
746
|
+
module.exports.__wbg_new_898a68150f225f2e = function() {
|
|
747
|
+
const ret = new Array();
|
|
748
|
+
return addHeapObject(ret);
|
|
749
|
+
};
|
|
750
|
+
|
|
751
|
+
module.exports.__wbg_BigInt_025925c4804d8575 = function(arg0) {
|
|
752
|
+
const ret = BigInt(getObject(arg0));
|
|
753
|
+
return addHeapObject(ret);
|
|
754
|
+
};
|
|
755
|
+
|
|
756
|
+
module.exports.__wbg_newnoargs_581967eacc0e2604 = function(arg0, arg1) {
|
|
757
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
758
|
+
return addHeapObject(ret);
|
|
759
|
+
};
|
|
760
|
+
|
|
761
|
+
module.exports.__wbg_get_97b561fb56f034b5 = function() { return handleError(function (arg0, arg1) {
|
|
762
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
763
|
+
return addHeapObject(ret);
|
|
764
|
+
}, arguments) };
|
|
765
|
+
|
|
766
|
+
module.exports.__wbg_call_cb65541d95d71282 = function() { return handleError(function (arg0, arg1) {
|
|
767
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
768
|
+
return addHeapObject(ret);
|
|
769
|
+
}, arguments) };
|
|
770
|
+
|
|
771
|
+
module.exports.__wbg_new_b51585de1b234aff = function() {
|
|
772
|
+
const ret = new Object();
|
|
773
|
+
return addHeapObject(ret);
|
|
774
|
+
};
|
|
775
|
+
|
|
776
|
+
module.exports.__wbg_self_1ff1d729e9aae938 = function() { return handleError(function () {
|
|
777
|
+
const ret = self.self;
|
|
778
|
+
return addHeapObject(ret);
|
|
779
|
+
}, arguments) };
|
|
780
|
+
|
|
781
|
+
module.exports.__wbg_window_5f4faef6c12b79ec = function() { return handleError(function () {
|
|
782
|
+
const ret = window.window;
|
|
783
|
+
return addHeapObject(ret);
|
|
784
|
+
}, arguments) };
|
|
785
|
+
|
|
786
|
+
module.exports.__wbg_globalThis_1d39714405582d3c = function() { return handleError(function () {
|
|
787
|
+
const ret = globalThis.globalThis;
|
|
788
|
+
return addHeapObject(ret);
|
|
789
|
+
}, arguments) };
|
|
790
|
+
|
|
791
|
+
module.exports.__wbg_global_651f05c6a0944d1c = function() { return handleError(function () {
|
|
792
|
+
const ret = global.global;
|
|
793
|
+
return addHeapObject(ret);
|
|
794
|
+
}, arguments) };
|
|
795
|
+
|
|
796
|
+
module.exports.__wbg_newwithlength_3ec098a360da1909 = function(arg0) {
|
|
797
|
+
const ret = new Array(arg0 >>> 0);
|
|
798
|
+
return addHeapObject(ret);
|
|
799
|
+
};
|
|
800
|
+
|
|
801
|
+
module.exports.__wbg_set_502d29070ea18557 = function(arg0, arg1, arg2) {
|
|
802
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
803
|
+
};
|
|
804
|
+
|
|
805
|
+
module.exports.__wbg_from_d7c216d4616bb368 = function(arg0) {
|
|
806
|
+
const ret = Array.from(getObject(arg0));
|
|
807
|
+
return addHeapObject(ret);
|
|
808
|
+
};
|
|
809
|
+
|
|
810
|
+
module.exports.__wbg_push_ca1c26067ef907ac = function(arg0, arg1) {
|
|
811
|
+
const ret = getObject(arg0).push(getObject(arg1));
|
|
812
|
+
return ret;
|
|
813
|
+
};
|
|
814
|
+
|
|
815
|
+
module.exports.__wbg_byteLength_0488a7a303dccf40 = function(arg0) {
|
|
816
|
+
const ret = getObject(arg0).byteLength;
|
|
817
|
+
return ret;
|
|
818
|
+
};
|
|
819
|
+
|
|
820
|
+
module.exports.__wbg_toString_26c114c5f3052ff5 = function(arg0, arg1, arg2) {
|
|
821
|
+
const ret = getObject(arg1).toString(arg2);
|
|
822
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
823
|
+
const len1 = WASM_VECTOR_LEN;
|
|
824
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
825
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
826
|
+
};
|
|
827
|
+
|
|
828
|
+
module.exports.__wbg_new_d258248ed531ff54 = function(arg0, arg1) {
|
|
829
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
830
|
+
return addHeapObject(ret);
|
|
831
|
+
};
|
|
832
|
+
|
|
833
|
+
module.exports.__wbg_setcause_a60925f08b71876d = function(arg0, arg1) {
|
|
834
|
+
getObject(arg0).cause = getObject(arg1);
|
|
835
|
+
};
|
|
836
|
+
|
|
837
|
+
module.exports.__wbg_instanceof_Function_3021b2be9300e7a7 = function(arg0) {
|
|
838
|
+
let result;
|
|
839
|
+
try {
|
|
840
|
+
result = getObject(arg0) instanceof Function;
|
|
841
|
+
} catch {
|
|
842
|
+
result = false;
|
|
843
|
+
}
|
|
844
|
+
const ret = result;
|
|
845
|
+
return ret;
|
|
846
|
+
};
|
|
847
|
+
|
|
848
|
+
module.exports.__wbg_call_01734de55d61e11d = function() { return handleError(function (arg0, arg1, arg2) {
|
|
849
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
850
|
+
return addHeapObject(ret);
|
|
851
|
+
}, arguments) };
|
|
852
|
+
|
|
853
|
+
module.exports.__wbg_call_4c92f6aec1e1d6e6 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
854
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
855
|
+
return addHeapObject(ret);
|
|
856
|
+
}, arguments) };
|
|
857
|
+
|
|
858
|
+
module.exports.__wbg_bind_f9d2c8ec337bbbe7 = function(arg0, arg1, arg2) {
|
|
859
|
+
const ret = getObject(arg0).bind(getObject(arg1), getObject(arg2));
|
|
860
|
+
return addHeapObject(ret);
|
|
861
|
+
};
|
|
862
|
+
|
|
863
|
+
module.exports.__wbg_bind_60a9a80cada2f33c = function(arg0, arg1, arg2, arg3) {
|
|
864
|
+
const ret = getObject(arg0).bind(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
865
|
+
return addHeapObject(ret);
|
|
866
|
+
};
|
|
867
|
+
|
|
868
|
+
module.exports.__wbg_forEach_d3ffcb118358250b = function(arg0, arg1, arg2) {
|
|
869
|
+
try {
|
|
870
|
+
var state0 = {a: arg1, b: arg2};
|
|
871
|
+
var cb0 = (arg0, arg1) => {
|
|
872
|
+
const a = state0.a;
|
|
873
|
+
state0.a = 0;
|
|
874
|
+
try {
|
|
875
|
+
return __wbg_adapter_148(a, state0.b, arg0, arg1);
|
|
876
|
+
} finally {
|
|
877
|
+
state0.a = a;
|
|
878
|
+
}
|
|
879
|
+
};
|
|
880
|
+
getObject(arg0).forEach(cb0);
|
|
881
|
+
} finally {
|
|
882
|
+
state0.a = state0.b = 0;
|
|
883
|
+
}
|
|
884
|
+
};
|
|
885
|
+
|
|
886
|
+
module.exports.__wbg_set_bedc3d02d0f05eb0 = function(arg0, arg1, arg2) {
|
|
887
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
888
|
+
return addHeapObject(ret);
|
|
889
|
+
};
|
|
890
|
+
|
|
891
|
+
module.exports.__wbg_constructor_47e9bb352faf1649 = function(arg0) {
|
|
892
|
+
const ret = getObject(arg0).constructor;
|
|
893
|
+
return addHeapObject(ret);
|
|
894
|
+
};
|
|
895
|
+
|
|
896
|
+
module.exports.__wbg_new_43f1b47c28813cbd = function(arg0, arg1) {
|
|
897
|
+
try {
|
|
898
|
+
var state0 = {a: arg0, b: arg1};
|
|
899
|
+
var cb0 = (arg0, arg1) => {
|
|
900
|
+
const a = state0.a;
|
|
901
|
+
state0.a = 0;
|
|
902
|
+
try {
|
|
903
|
+
return __wbg_adapter_148(a, state0.b, arg0, arg1);
|
|
904
|
+
} finally {
|
|
905
|
+
state0.a = a;
|
|
906
|
+
}
|
|
907
|
+
};
|
|
908
|
+
const ret = new Promise(cb0);
|
|
909
|
+
return addHeapObject(ret);
|
|
910
|
+
} finally {
|
|
911
|
+
state0.a = state0.b = 0;
|
|
912
|
+
}
|
|
913
|
+
};
|
|
914
|
+
|
|
915
|
+
module.exports.__wbg_resolve_53698b95aaf7fcf8 = function(arg0) {
|
|
916
|
+
const ret = Promise.resolve(getObject(arg0));
|
|
917
|
+
return addHeapObject(ret);
|
|
918
|
+
};
|
|
919
|
+
|
|
920
|
+
module.exports.__wbg_then_f7e06ee3c11698eb = function(arg0, arg1) {
|
|
921
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
922
|
+
return addHeapObject(ret);
|
|
923
|
+
};
|
|
924
|
+
|
|
925
|
+
module.exports.__wbg_then_b2267541e2a73865 = function(arg0, arg1, arg2) {
|
|
926
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
927
|
+
return addHeapObject(ret);
|
|
928
|
+
};
|
|
929
|
+
|
|
930
|
+
module.exports.__wbg_buffer_085ec1f694018c4f = function(arg0) {
|
|
931
|
+
const ret = getObject(arg0).buffer;
|
|
932
|
+
return addHeapObject(ret);
|
|
933
|
+
};
|
|
934
|
+
|
|
935
|
+
module.exports.__wbg_newwithbyteoffsetandlength_6da8e527659b86aa = function(arg0, arg1, arg2) {
|
|
936
|
+
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
937
|
+
return addHeapObject(ret);
|
|
938
|
+
};
|
|
939
|
+
|
|
940
|
+
module.exports.__wbg_new_8125e318e6245eed = function(arg0) {
|
|
941
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
942
|
+
return addHeapObject(ret);
|
|
943
|
+
};
|
|
944
|
+
|
|
945
|
+
module.exports.__wbg_set_5cf90238115182c3 = function(arg0, arg1, arg2) {
|
|
946
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
947
|
+
};
|
|
948
|
+
|
|
949
|
+
module.exports.__wbg_length_72e2208bbc0efc61 = function(arg0) {
|
|
950
|
+
const ret = getObject(arg0).length;
|
|
951
|
+
return ret;
|
|
952
|
+
};
|
|
953
|
+
|
|
954
|
+
module.exports.__wbg_newwithlength_e5d69174d6984cd7 = function(arg0) {
|
|
955
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
956
|
+
return addHeapObject(ret);
|
|
957
|
+
};
|
|
958
|
+
|
|
959
|
+
module.exports.__wbg_subarray_13db269f57aa838d = function(arg0, arg1, arg2) {
|
|
960
|
+
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
961
|
+
return addHeapObject(ret);
|
|
962
|
+
};
|
|
963
|
+
|
|
964
|
+
module.exports.__wbg_compile_0ef211355a4ebea3 = function(arg0) {
|
|
965
|
+
const ret = WebAssembly.compile(getObject(arg0));
|
|
966
|
+
return addHeapObject(ret);
|
|
967
|
+
};
|
|
968
|
+
|
|
969
|
+
module.exports.__wbg_instantiate_8900c71988551df8 = function(arg0, arg1) {
|
|
970
|
+
const ret = WebAssembly.instantiate(getObject(arg0), getObject(arg1));
|
|
971
|
+
return addHeapObject(ret);
|
|
972
|
+
};
|
|
973
|
+
|
|
974
|
+
module.exports.__wbg_exports_9484b00cdfd311fc = function(arg0) {
|
|
975
|
+
const ret = getObject(arg0).exports;
|
|
976
|
+
return addHeapObject(ret);
|
|
977
|
+
};
|
|
978
|
+
|
|
979
|
+
module.exports.__wbg_exports_b7984a3120d6aba2 = function(arg0) {
|
|
980
|
+
const ret = WebAssembly.Module.exports(getObject(arg0));
|
|
981
|
+
return addHeapObject(ret);
|
|
982
|
+
};
|
|
983
|
+
|
|
984
|
+
module.exports.__wbg_instanceof_Table_ba74319dfec929b1 = function(arg0) {
|
|
985
|
+
let result;
|
|
986
|
+
try {
|
|
987
|
+
result = getObject(arg0) instanceof WebAssembly.Table;
|
|
988
|
+
} catch {
|
|
989
|
+
result = false;
|
|
990
|
+
}
|
|
991
|
+
const ret = result;
|
|
992
|
+
return ret;
|
|
993
|
+
};
|
|
994
|
+
|
|
995
|
+
module.exports.__wbg_get_9bb402f6a9f0b436 = function() { return handleError(function (arg0, arg1) {
|
|
996
|
+
const ret = getObject(arg0).get(arg1 >>> 0);
|
|
997
|
+
return addHeapObject(ret);
|
|
998
|
+
}, arguments) };
|
|
999
|
+
|
|
1000
|
+
module.exports.__wbg_instanceof_Memory_6b2a8e33c4176794 = function(arg0) {
|
|
1001
|
+
let result;
|
|
1002
|
+
try {
|
|
1003
|
+
result = getObject(arg0) instanceof WebAssembly.Memory;
|
|
1004
|
+
} catch {
|
|
1005
|
+
result = false;
|
|
1006
|
+
}
|
|
1007
|
+
const ret = result;
|
|
1008
|
+
return ret;
|
|
1009
|
+
};
|
|
1010
|
+
|
|
1011
|
+
module.exports.__wbg_new_5514c0d576222fc2 = function() { return handleError(function (arg0) {
|
|
1012
|
+
const ret = new WebAssembly.Memory(getObject(arg0));
|
|
1013
|
+
return addHeapObject(ret);
|
|
1014
|
+
}, arguments) };
|
|
1015
|
+
|
|
1016
|
+
module.exports.__wbg_apply_f9ecfcbfefaf7349 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1017
|
+
const ret = Reflect.apply(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
1018
|
+
return addHeapObject(ret);
|
|
1019
|
+
}, arguments) };
|
|
1020
|
+
|
|
1021
|
+
module.exports.__wbg_getPrototypeOf_2782f7ac7c421741 = function() { return handleError(function (arg0) {
|
|
1022
|
+
const ret = Reflect.getPrototypeOf(getObject(arg0));
|
|
1023
|
+
return addHeapObject(ret);
|
|
1024
|
+
}, arguments) };
|
|
1025
|
+
|
|
1026
|
+
module.exports.__wbg_set_092e06b0f9d71865 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1027
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
1028
|
+
return ret;
|
|
1029
|
+
}, arguments) };
|
|
1030
|
+
|
|
1031
|
+
module.exports.__wbg_parse_670c19d4e984792e = function() { return handleError(function (arg0, arg1) {
|
|
1032
|
+
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
1033
|
+
return addHeapObject(ret);
|
|
1034
|
+
}, arguments) };
|
|
1035
|
+
|
|
1036
|
+
module.exports.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
1037
|
+
const v = getObject(arg1);
|
|
1038
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
1039
|
+
getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
|
|
1040
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
1041
|
+
};
|
|
1042
|
+
|
|
1043
|
+
module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
|
1044
|
+
const ret = debugString(getObject(arg1));
|
|
1045
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1046
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1047
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1048
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1049
|
+
};
|
|
1050
|
+
|
|
1051
|
+
module.exports.__wbindgen_throw = function(arg0, arg1) {
|
|
1052
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1053
|
+
};
|
|
1054
|
+
|
|
1055
|
+
module.exports.__wbindgen_memory = function() {
|
|
1056
|
+
const ret = wasm.memory;
|
|
1057
|
+
return addHeapObject(ret);
|
|
1058
|
+
};
|
|
1059
|
+
|
|
1060
|
+
module.exports.__wbindgen_function_table = function() {
|
|
1061
|
+
const ret = wasm.__wbindgen_export_2;
|
|
1062
|
+
return addHeapObject(ret);
|
|
1063
|
+
};
|
|
1064
|
+
|
|
1065
|
+
module.exports.__wbindgen_closure_wrapper765 = function(arg0, arg1, arg2) {
|
|
1066
|
+
const ret = makeMutClosure(arg0, arg1, 228, __wbg_adapter_54);
|
|
1067
|
+
return addHeapObject(ret);
|
|
1068
|
+
};
|
|
1069
|
+
|
|
1070
|
+
const path = require('path').join(__dirname, 'acvm_js_bg.wasm');
|
|
1071
|
+
const bytes = require('fs').readFileSync(path);
|
|
1072
|
+
|
|
1073
|
+
const wasmModule = new WebAssembly.Module(bytes);
|
|
1074
|
+
const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
|
|
1075
|
+
wasm = wasmInstance.exports;
|
|
1076
|
+
module.exports.__wasm = wasm;
|
|
1077
|
+
|