@noir-lang/acvm_js 1.0.0-beta.3-3bc52e4.nightly → 1.0.0-beta.3-826b18a.nightly
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/nodejs/acvm_js.d.ts +105 -135
- package/nodejs/acvm_js.js +533 -565
- package/nodejs/acvm_js_bg.wasm +0 -0
- package/nodejs/acvm_js_bg.wasm.d.ts +29 -26
- package/package.json +1 -1
- package/web/acvm_js.d.ts +136 -163
- package/web/acvm_js.js +524 -552
- package/web/acvm_js_bg.wasm +0 -0
- package/web/acvm_js_bg.wasm.d.ts +29 -26
package/nodejs/acvm_js.js
CHANGED
|
@@ -1,39 +1,44 @@
|
|
|
1
|
+
|
|
1
2
|
let imports = {};
|
|
2
3
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
3
4
|
let wasm;
|
|
4
|
-
const {
|
|
5
|
+
const { TextDecoder, TextEncoder } = require(`util`);
|
|
6
|
+
|
|
7
|
+
function addToExternrefTable0(obj) {
|
|
8
|
+
const idx = wasm.__externref_table_alloc();
|
|
9
|
+
wasm.__wbindgen_export_2.set(idx, obj);
|
|
10
|
+
return idx;
|
|
11
|
+
}
|
|
5
12
|
|
|
6
|
-
|
|
13
|
+
function handleError(f, args) {
|
|
14
|
+
try {
|
|
15
|
+
return f.apply(this, args);
|
|
16
|
+
} catch (e) {
|
|
17
|
+
const idx = addToExternrefTable0(e);
|
|
18
|
+
wasm.__wbindgen_exn_store(idx);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
7
21
|
|
|
8
|
-
|
|
22
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
9
23
|
|
|
10
|
-
|
|
24
|
+
cachedTextDecoder.decode();
|
|
11
25
|
|
|
12
|
-
let
|
|
26
|
+
let cachedUint8ArrayMemory0 = null;
|
|
13
27
|
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
|
|
28
|
+
function getUint8ArrayMemory0() {
|
|
29
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
30
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
31
|
+
}
|
|
32
|
+
return cachedUint8ArrayMemory0;
|
|
18
33
|
}
|
|
19
34
|
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return ret;
|
|
35
|
+
function getStringFromWasm0(ptr, len) {
|
|
36
|
+
ptr = ptr >>> 0;
|
|
37
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
24
38
|
}
|
|
25
39
|
|
|
26
40
|
let WASM_VECTOR_LEN = 0;
|
|
27
41
|
|
|
28
|
-
let cachedUint8Memory0 = null;
|
|
29
|
-
|
|
30
|
-
function getUint8Memory0() {
|
|
31
|
-
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
32
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
33
|
-
}
|
|
34
|
-
return cachedUint8Memory0;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
42
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
38
43
|
|
|
39
44
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -53,16 +58,16 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
53
58
|
|
|
54
59
|
if (realloc === undefined) {
|
|
55
60
|
const buf = cachedTextEncoder.encode(arg);
|
|
56
|
-
const ptr = malloc(buf.length) >>> 0;
|
|
57
|
-
|
|
61
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
62
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
58
63
|
WASM_VECTOR_LEN = buf.length;
|
|
59
64
|
return ptr;
|
|
60
65
|
}
|
|
61
66
|
|
|
62
67
|
let len = arg.length;
|
|
63
|
-
let ptr = malloc(len) >>> 0;
|
|
68
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
64
69
|
|
|
65
|
-
const mem =
|
|
70
|
+
const mem = getUint8ArrayMemory0();
|
|
66
71
|
|
|
67
72
|
let offset = 0;
|
|
68
73
|
|
|
@@ -76,55 +81,60 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
76
81
|
if (offset !== 0) {
|
|
77
82
|
arg = arg.slice(offset);
|
|
78
83
|
}
|
|
79
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3) >>> 0;
|
|
80
|
-
const view =
|
|
84
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
85
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
81
86
|
const ret = encodeString(arg, view);
|
|
82
87
|
|
|
83
88
|
offset += ret.written;
|
|
89
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
84
90
|
}
|
|
85
91
|
|
|
86
92
|
WASM_VECTOR_LEN = offset;
|
|
87
93
|
return ptr;
|
|
88
94
|
}
|
|
89
95
|
|
|
90
|
-
|
|
91
|
-
return x === undefined || x === null;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
let cachedInt32Memory0 = null;
|
|
96
|
+
let cachedDataViewMemory0 = null;
|
|
95
97
|
|
|
96
|
-
function
|
|
97
|
-
if (
|
|
98
|
-
|
|
98
|
+
function getDataViewMemory0() {
|
|
99
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
100
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
99
101
|
}
|
|
100
|
-
return
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function addHeapObject(obj) {
|
|
104
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
105
|
-
const idx = heap_next;
|
|
106
|
-
heap_next = heap[idx];
|
|
107
|
-
|
|
108
|
-
heap[idx] = obj;
|
|
109
|
-
return idx;
|
|
102
|
+
return cachedDataViewMemory0;
|
|
110
103
|
}
|
|
111
104
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
cachedTextDecoder.decode();
|
|
115
|
-
|
|
116
|
-
function getStringFromWasm0(ptr, len) {
|
|
117
|
-
ptr = ptr >>> 0;
|
|
118
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
105
|
+
function isLikeNone(x) {
|
|
106
|
+
return x === undefined || x === null;
|
|
119
107
|
}
|
|
120
108
|
|
|
121
|
-
|
|
109
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
110
|
+
? { register: () => {}, unregister: () => {} }
|
|
111
|
+
: new FinalizationRegistry(state => {
|
|
112
|
+
wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b)
|
|
113
|
+
});
|
|
122
114
|
|
|
123
|
-
function
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
115
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
116
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
117
|
+
const real = (...args) => {
|
|
118
|
+
// First up with a closure we increment the internal reference
|
|
119
|
+
// count. This ensures that the Rust closure environment won't
|
|
120
|
+
// be deallocated while we're invoking it.
|
|
121
|
+
state.cnt++;
|
|
122
|
+
const a = state.a;
|
|
123
|
+
state.a = 0;
|
|
124
|
+
try {
|
|
125
|
+
return f(a, state.b, ...args);
|
|
126
|
+
} finally {
|
|
127
|
+
if (--state.cnt === 0) {
|
|
128
|
+
wasm.__wbindgen_export_6.get(state.dtor)(a, state.b);
|
|
129
|
+
CLOSURE_DTORS.unregister(state);
|
|
130
|
+
} else {
|
|
131
|
+
state.a = a;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
real.original = state;
|
|
136
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
137
|
+
return real;
|
|
128
138
|
}
|
|
129
139
|
|
|
130
140
|
function debugString(val) {
|
|
@@ -168,7 +178,7 @@ function debugString(val) {
|
|
|
168
178
|
// Test for built-in
|
|
169
179
|
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
170
180
|
let className;
|
|
171
|
-
if (builtInMatches.length > 1) {
|
|
181
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
172
182
|
className = builtInMatches[1];
|
|
173
183
|
} else {
|
|
174
184
|
// Failed to match the standard '[object ClassName]'
|
|
@@ -192,278 +202,231 @@ function debugString(val) {
|
|
|
192
202
|
return className;
|
|
193
203
|
}
|
|
194
204
|
|
|
195
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
196
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
197
|
-
const real = (...args) => {
|
|
198
|
-
// First up with a closure we increment the internal reference
|
|
199
|
-
// count. This ensures that the Rust closure environment won't
|
|
200
|
-
// be deallocated while we're invoking it.
|
|
201
|
-
state.cnt++;
|
|
202
|
-
const a = state.a;
|
|
203
|
-
state.a = 0;
|
|
204
|
-
try {
|
|
205
|
-
return f(a, state.b, ...args);
|
|
206
|
-
} finally {
|
|
207
|
-
if (--state.cnt === 0) {
|
|
208
|
-
wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
|
|
209
|
-
|
|
210
|
-
} else {
|
|
211
|
-
state.a = a;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
real.original = state;
|
|
216
|
-
|
|
217
|
-
return real;
|
|
218
|
-
}
|
|
219
|
-
function __wbg_adapter_22(arg0, arg1, arg2) {
|
|
220
|
-
wasm.wasm_bindgen__convert__closures__invoke1_mut__hec5660d9489c77a2(arg0, arg1, addHeapObject(arg2));
|
|
221
|
-
}
|
|
222
|
-
|
|
223
205
|
function passArray8ToWasm0(arg, malloc) {
|
|
224
|
-
const ptr = malloc(arg.length * 1) >>> 0;
|
|
225
|
-
|
|
206
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
207
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
226
208
|
WASM_VECTOR_LEN = arg.length;
|
|
227
209
|
return ptr;
|
|
228
210
|
}
|
|
229
211
|
/**
|
|
230
|
-
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
231
|
-
*
|
|
232
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
233
|
-
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
234
|
-
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
235
|
-
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
236
|
-
*/
|
|
212
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
213
|
+
*
|
|
214
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
215
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
216
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
217
|
+
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
218
|
+
*/
|
|
237
219
|
module.exports.executeCircuit = function(program, initial_witness, foreign_call_handler) {
|
|
238
220
|
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
239
221
|
const len0 = WASM_VECTOR_LEN;
|
|
240
|
-
const ret = wasm.executeCircuit(ptr0, len0,
|
|
241
|
-
return
|
|
222
|
+
const ret = wasm.executeCircuit(ptr0, len0, initial_witness, foreign_call_handler);
|
|
223
|
+
return ret;
|
|
242
224
|
};
|
|
243
225
|
|
|
244
226
|
/**
|
|
245
|
-
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
246
|
-
* This method also extracts the public return values from the solved witness into its own return witness.
|
|
247
|
-
*
|
|
248
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
249
|
-
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
250
|
-
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
251
|
-
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
|
|
252
|
-
*/
|
|
227
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
228
|
+
* This method also extracts the public return values from the solved witness into its own return witness.
|
|
229
|
+
*
|
|
230
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
231
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
232
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
233
|
+
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
|
|
234
|
+
*/
|
|
253
235
|
module.exports.executeCircuitWithReturnWitness = function(program, initial_witness, foreign_call_handler) {
|
|
254
236
|
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
255
237
|
const len0 = WASM_VECTOR_LEN;
|
|
256
|
-
const ret = wasm.executeCircuitWithReturnWitness(ptr0, len0,
|
|
257
|
-
return
|
|
238
|
+
const ret = wasm.executeCircuitWithReturnWitness(ptr0, len0, initial_witness, foreign_call_handler);
|
|
239
|
+
return ret;
|
|
258
240
|
};
|
|
259
241
|
|
|
260
242
|
/**
|
|
261
|
-
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
262
|
-
*
|
|
263
|
-
* @param {Uint8Array} program - A serialized representation of an ACIR program
|
|
264
|
-
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
|
|
265
|
-
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
|
|
266
|
-
* @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
|
|
267
|
-
*/
|
|
243
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
244
|
+
*
|
|
245
|
+
* @param {Uint8Array} program - A serialized representation of an ACIR program
|
|
246
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
|
|
247
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
|
|
248
|
+
* @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
|
|
249
|
+
*/
|
|
268
250
|
module.exports.executeProgram = function(program, initial_witness, foreign_call_handler) {
|
|
269
251
|
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
270
252
|
const len0 = WASM_VECTOR_LEN;
|
|
271
|
-
const ret = wasm.executeProgram(ptr0, len0,
|
|
272
|
-
return
|
|
253
|
+
const ret = wasm.executeProgram(ptr0, len0, initial_witness, foreign_call_handler);
|
|
254
|
+
return ret;
|
|
273
255
|
};
|
|
274
256
|
|
|
257
|
+
function takeFromExternrefTable0(idx) {
|
|
258
|
+
const value = wasm.__wbindgen_export_2.get(idx);
|
|
259
|
+
wasm.__externref_table_dealloc(idx);
|
|
260
|
+
return value;
|
|
261
|
+
}
|
|
275
262
|
/**
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
263
|
+
* Sets the package's logging level.
|
|
264
|
+
*
|
|
265
|
+
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
266
|
+
*/
|
|
267
|
+
module.exports.initLogLevel = function(filter) {
|
|
268
|
+
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
269
|
+
const len0 = WASM_VECTOR_LEN;
|
|
270
|
+
const ret = wasm.initLogLevel(ptr0, len0);
|
|
271
|
+
if (ret[1]) {
|
|
272
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
273
|
+
}
|
|
282
274
|
};
|
|
283
275
|
|
|
284
276
|
/**
|
|
285
|
-
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
|
|
286
|
-
*
|
|
287
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
288
|
-
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
289
|
-
* @returns {WitnessMap} A witness map containing the circuit's return values.
|
|
290
|
-
* @param {Uint8Array} program
|
|
291
|
-
* @param {WitnessMap} witness_map
|
|
292
|
-
* @returns {WitnessMap}
|
|
293
|
-
*/
|
|
277
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
|
|
278
|
+
*
|
|
279
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
280
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
281
|
+
* @returns {WitnessMap} A witness map containing the circuit's return values.
|
|
282
|
+
* @param {Uint8Array} program
|
|
283
|
+
* @param {WitnessMap} witness_map
|
|
284
|
+
* @returns {WitnessMap}
|
|
285
|
+
*/
|
|
294
286
|
module.exports.getReturnWitness = function(program, witness_map) {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
301
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
302
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
303
|
-
if (r2) {
|
|
304
|
-
throw takeObject(r1);
|
|
305
|
-
}
|
|
306
|
-
return takeObject(r0);
|
|
307
|
-
} finally {
|
|
308
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
287
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
288
|
+
const len0 = WASM_VECTOR_LEN;
|
|
289
|
+
const ret = wasm.getReturnWitness(ptr0, len0, witness_map);
|
|
290
|
+
if (ret[2]) {
|
|
291
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
309
292
|
}
|
|
293
|
+
return takeFromExternrefTable0(ret[0]);
|
|
310
294
|
};
|
|
311
295
|
|
|
312
296
|
/**
|
|
313
|
-
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
|
|
314
|
-
*
|
|
315
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
316
|
-
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
317
|
-
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
|
|
318
|
-
* @param {Uint8Array} program
|
|
319
|
-
* @param {WitnessMap} solved_witness
|
|
320
|
-
* @returns {WitnessMap}
|
|
321
|
-
*/
|
|
297
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
|
|
298
|
+
*
|
|
299
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
300
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
301
|
+
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
|
|
302
|
+
* @param {Uint8Array} program
|
|
303
|
+
* @param {WitnessMap} solved_witness
|
|
304
|
+
* @returns {WitnessMap}
|
|
305
|
+
*/
|
|
322
306
|
module.exports.getPublicParametersWitness = function(program, solved_witness) {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
329
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
330
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
331
|
-
if (r2) {
|
|
332
|
-
throw takeObject(r1);
|
|
333
|
-
}
|
|
334
|
-
return takeObject(r0);
|
|
335
|
-
} finally {
|
|
336
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
307
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
308
|
+
const len0 = WASM_VECTOR_LEN;
|
|
309
|
+
const ret = wasm.getPublicParametersWitness(ptr0, len0, solved_witness);
|
|
310
|
+
if (ret[2]) {
|
|
311
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
337
312
|
}
|
|
313
|
+
return takeFromExternrefTable0(ret[0]);
|
|
338
314
|
};
|
|
339
315
|
|
|
340
316
|
/**
|
|
341
|
-
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
|
|
342
|
-
*
|
|
343
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
344
|
-
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
345
|
-
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
|
|
346
|
-
* @param {Uint8Array} program
|
|
347
|
-
* @param {WitnessMap} solved_witness
|
|
348
|
-
* @returns {WitnessMap}
|
|
349
|
-
*/
|
|
317
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
|
|
318
|
+
*
|
|
319
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
320
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
321
|
+
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
|
|
322
|
+
* @param {Uint8Array} program
|
|
323
|
+
* @param {WitnessMap} solved_witness
|
|
324
|
+
* @returns {WitnessMap}
|
|
325
|
+
*/
|
|
350
326
|
module.exports.getPublicWitness = function(program, solved_witness) {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
357
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
358
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
359
|
-
if (r2) {
|
|
360
|
-
throw takeObject(r1);
|
|
361
|
-
}
|
|
362
|
-
return takeObject(r0);
|
|
363
|
-
} finally {
|
|
364
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
327
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
328
|
+
const len0 = WASM_VECTOR_LEN;
|
|
329
|
+
const ret = wasm.getPublicWitness(ptr0, len0, solved_witness);
|
|
330
|
+
if (ret[2]) {
|
|
331
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
365
332
|
}
|
|
333
|
+
return takeFromExternrefTable0(ret[0]);
|
|
366
334
|
};
|
|
367
335
|
|
|
368
336
|
/**
|
|
369
|
-
*
|
|
370
|
-
* @
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
337
|
+
* Returns the `BuildInfo` object containing information about how the installed package was built.
|
|
338
|
+
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
339
|
+
*/
|
|
340
|
+
module.exports.buildInfo = function() {
|
|
341
|
+
const ret = wasm.buildInfo();
|
|
342
|
+
return ret;
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
347
|
+
* @param {string} lhs
|
|
348
|
+
* @param {string} rhs
|
|
349
|
+
* @returns {string}
|
|
350
|
+
*/
|
|
374
351
|
module.exports.and = function(lhs, rhs) {
|
|
375
|
-
const ret = wasm.and(
|
|
376
|
-
return
|
|
352
|
+
const ret = wasm.and(lhs, rhs);
|
|
353
|
+
return ret;
|
|
377
354
|
};
|
|
378
355
|
|
|
379
356
|
/**
|
|
380
|
-
* Performs a bitwise XOR operation between `lhs` and `rhs`
|
|
381
|
-
* @param {string} lhs
|
|
382
|
-
* @param {string} rhs
|
|
383
|
-
* @returns {string}
|
|
384
|
-
*/
|
|
357
|
+
* Performs a bitwise XOR operation between `lhs` and `rhs`
|
|
358
|
+
* @param {string} lhs
|
|
359
|
+
* @param {string} rhs
|
|
360
|
+
* @returns {string}
|
|
361
|
+
*/
|
|
385
362
|
module.exports.xor = function(lhs, rhs) {
|
|
386
|
-
const ret = wasm.xor(
|
|
387
|
-
return
|
|
363
|
+
const ret = wasm.xor(lhs, rhs);
|
|
364
|
+
return ret;
|
|
388
365
|
};
|
|
389
366
|
|
|
390
|
-
let
|
|
367
|
+
let cachedUint32ArrayMemory0 = null;
|
|
391
368
|
|
|
392
|
-
function
|
|
393
|
-
if (
|
|
394
|
-
|
|
369
|
+
function getUint32ArrayMemory0() {
|
|
370
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
371
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
395
372
|
}
|
|
396
|
-
return
|
|
373
|
+
return cachedUint32ArrayMemory0;
|
|
397
374
|
}
|
|
398
375
|
|
|
399
376
|
function passArray32ToWasm0(arg, malloc) {
|
|
400
|
-
const ptr = malloc(arg.length * 4) >>> 0;
|
|
401
|
-
|
|
377
|
+
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
378
|
+
getUint32ArrayMemory0().set(arg, ptr / 4);
|
|
402
379
|
WASM_VECTOR_LEN = arg.length;
|
|
403
380
|
return ptr;
|
|
404
381
|
}
|
|
405
382
|
|
|
406
383
|
function getArrayU32FromWasm0(ptr, len) {
|
|
407
384
|
ptr = ptr >>> 0;
|
|
408
|
-
return
|
|
385
|
+
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
409
386
|
}
|
|
410
387
|
/**
|
|
411
|
-
* Sha256 compression function
|
|
412
|
-
* @param {Uint32Array} inputs
|
|
413
|
-
* @param {Uint32Array} state
|
|
414
|
-
* @returns {Uint32Array}
|
|
415
|
-
*/
|
|
388
|
+
* Sha256 compression function
|
|
389
|
+
* @param {Uint32Array} inputs
|
|
390
|
+
* @param {Uint32Array} state
|
|
391
|
+
* @returns {Uint32Array}
|
|
392
|
+
*/
|
|
416
393
|
module.exports.sha256_compression = function(inputs, state) {
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
426
|
-
var v3 = getArrayU32FromWasm0(r0, r1).slice();
|
|
427
|
-
wasm.__wbindgen_free(r0, r1 * 4);
|
|
428
|
-
return v3;
|
|
429
|
-
} finally {
|
|
430
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
431
|
-
}
|
|
394
|
+
const ptr0 = passArray32ToWasm0(inputs, wasm.__wbindgen_malloc);
|
|
395
|
+
const len0 = WASM_VECTOR_LEN;
|
|
396
|
+
const ptr1 = passArray32ToWasm0(state, wasm.__wbindgen_malloc);
|
|
397
|
+
const len1 = WASM_VECTOR_LEN;
|
|
398
|
+
const ret = wasm.sha256_compression(ptr0, len0, ptr1, len1);
|
|
399
|
+
var v3 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
|
|
400
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
401
|
+
return v3;
|
|
432
402
|
};
|
|
433
403
|
|
|
434
404
|
function getArrayU8FromWasm0(ptr, len) {
|
|
435
405
|
ptr = ptr >>> 0;
|
|
436
|
-
return
|
|
406
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
437
407
|
}
|
|
438
408
|
/**
|
|
439
|
-
* Calculates the Blake2s256 hash of the input bytes
|
|
440
|
-
* @param {Uint8Array} inputs
|
|
441
|
-
* @returns {Uint8Array}
|
|
442
|
-
*/
|
|
409
|
+
* Calculates the Blake2s256 hash of the input bytes
|
|
410
|
+
* @param {Uint8Array} inputs
|
|
411
|
+
* @returns {Uint8Array}
|
|
412
|
+
*/
|
|
443
413
|
module.exports.blake2s256 = function(inputs) {
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
451
|
-
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
452
|
-
wasm.__wbindgen_free(r0, r1 * 1);
|
|
453
|
-
return v2;
|
|
454
|
-
} finally {
|
|
455
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
456
|
-
}
|
|
414
|
+
const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
|
|
415
|
+
const len0 = WASM_VECTOR_LEN;
|
|
416
|
+
const ret = wasm.blake2s256(ptr0, len0);
|
|
417
|
+
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
418
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
419
|
+
return v2;
|
|
457
420
|
};
|
|
458
421
|
|
|
459
422
|
/**
|
|
460
|
-
* Verifies a ECDSA signature over the secp256k1 curve.
|
|
461
|
-
* @param {Uint8Array} hashed_msg
|
|
462
|
-
* @param {Uint8Array} public_key_x_bytes
|
|
463
|
-
* @param {Uint8Array} public_key_y_bytes
|
|
464
|
-
* @param {Uint8Array} signature
|
|
465
|
-
* @returns {boolean}
|
|
466
|
-
*/
|
|
423
|
+
* Verifies a ECDSA signature over the secp256k1 curve.
|
|
424
|
+
* @param {Uint8Array} hashed_msg
|
|
425
|
+
* @param {Uint8Array} public_key_x_bytes
|
|
426
|
+
* @param {Uint8Array} public_key_y_bytes
|
|
427
|
+
* @param {Uint8Array} signature
|
|
428
|
+
* @returns {boolean}
|
|
429
|
+
*/
|
|
467
430
|
module.exports.ecdsa_secp256k1_verify = function(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
|
|
468
431
|
const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
|
|
469
432
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -478,13 +441,13 @@ module.exports.ecdsa_secp256k1_verify = function(hashed_msg, public_key_x_bytes,
|
|
|
478
441
|
};
|
|
479
442
|
|
|
480
443
|
/**
|
|
481
|
-
* Verifies a ECDSA signature over the secp256r1 curve.
|
|
482
|
-
* @param {Uint8Array} hashed_msg
|
|
483
|
-
* @param {Uint8Array} public_key_x_bytes
|
|
484
|
-
* @param {Uint8Array} public_key_y_bytes
|
|
485
|
-
* @param {Uint8Array} signature
|
|
486
|
-
* @returns {boolean}
|
|
487
|
-
*/
|
|
444
|
+
* Verifies a ECDSA signature over the secp256r1 curve.
|
|
445
|
+
* @param {Uint8Array} hashed_msg
|
|
446
|
+
* @param {Uint8Array} public_key_x_bytes
|
|
447
|
+
* @param {Uint8Array} public_key_y_bytes
|
|
448
|
+
* @param {Uint8Array} signature
|
|
449
|
+
* @returns {boolean}
|
|
450
|
+
*/
|
|
488
451
|
module.exports.ecdsa_secp256r1_verify = function(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
|
|
489
452
|
const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
|
|
490
453
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -499,219 +462,120 @@ module.exports.ecdsa_secp256r1_verify = function(hashed_msg, public_key_x_bytes,
|
|
|
499
462
|
};
|
|
500
463
|
|
|
501
464
|
/**
|
|
502
|
-
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
503
|
-
*
|
|
504
|
-
* @param {WitnessMap} witness_map - A witness map.
|
|
505
|
-
* @returns {Uint8Array} A compressed witness map
|
|
506
|
-
*/
|
|
465
|
+
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
466
|
+
*
|
|
467
|
+
* @param {WitnessMap} witness_map - A witness map.
|
|
468
|
+
* @returns {Uint8Array} A compressed witness map
|
|
469
|
+
*/
|
|
507
470
|
module.exports.compressWitness = function(witness_map) {
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
512
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
513
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
514
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
515
|
-
if (r3) {
|
|
516
|
-
throw takeObject(r2);
|
|
517
|
-
}
|
|
518
|
-
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
519
|
-
wasm.__wbindgen_free(r0, r1 * 1);
|
|
520
|
-
return v1;
|
|
521
|
-
} finally {
|
|
522
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
471
|
+
const ret = wasm.compressWitness(witness_map);
|
|
472
|
+
if (ret[3]) {
|
|
473
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
523
474
|
}
|
|
475
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
476
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
477
|
+
return v1;
|
|
524
478
|
};
|
|
525
479
|
|
|
526
480
|
/**
|
|
527
|
-
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
|
|
528
|
-
* This should be used to only fetch the witness map for the main function.
|
|
529
|
-
*
|
|
530
|
-
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
531
|
-
* @returns {WitnessMap} The decompressed witness map.
|
|
532
|
-
*/
|
|
481
|
+
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
|
|
482
|
+
* This should be used to only fetch the witness map for the main function.
|
|
483
|
+
*
|
|
484
|
+
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
485
|
+
* @returns {WitnessMap} The decompressed witness map.
|
|
486
|
+
*/
|
|
533
487
|
module.exports.decompressWitness = function(compressed_witness) {
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
540
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
541
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
542
|
-
if (r2) {
|
|
543
|
-
throw takeObject(r1);
|
|
544
|
-
}
|
|
545
|
-
return takeObject(r0);
|
|
546
|
-
} finally {
|
|
547
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
488
|
+
const ptr0 = passArray8ToWasm0(compressed_witness, wasm.__wbindgen_malloc);
|
|
489
|
+
const len0 = WASM_VECTOR_LEN;
|
|
490
|
+
const ret = wasm.decompressWitness(ptr0, len0);
|
|
491
|
+
if (ret[2]) {
|
|
492
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
548
493
|
}
|
|
494
|
+
return takeFromExternrefTable0(ret[0]);
|
|
549
495
|
};
|
|
550
496
|
|
|
551
497
|
/**
|
|
552
|
-
* Compresses a `WitnessStack` into the binary format outputted by Nargo.
|
|
553
|
-
*
|
|
554
|
-
* @param {WitnessStack} witness_stack - A witness stack.
|
|
555
|
-
* @returns {Uint8Array} A compressed witness stack
|
|
556
|
-
*/
|
|
498
|
+
* Compresses a `WitnessStack` into the binary format outputted by Nargo.
|
|
499
|
+
*
|
|
500
|
+
* @param {WitnessStack} witness_stack - A witness stack.
|
|
501
|
+
* @returns {Uint8Array} A compressed witness stack
|
|
502
|
+
*/
|
|
557
503
|
module.exports.compressWitnessStack = function(witness_stack) {
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
562
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
563
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
564
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
565
|
-
if (r3) {
|
|
566
|
-
throw takeObject(r2);
|
|
567
|
-
}
|
|
568
|
-
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
569
|
-
wasm.__wbindgen_free(r0, r1 * 1);
|
|
570
|
-
return v1;
|
|
571
|
-
} finally {
|
|
572
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
504
|
+
const ret = wasm.compressWitnessStack(witness_stack);
|
|
505
|
+
if (ret[3]) {
|
|
506
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
573
507
|
}
|
|
508
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
509
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
510
|
+
return v1;
|
|
574
511
|
};
|
|
575
512
|
|
|
576
513
|
/**
|
|
577
|
-
* Decompresses a compressed witness stack as outputted by Nargo into a `WitnessStack`.
|
|
578
|
-
*
|
|
579
|
-
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
580
|
-
* @returns {WitnessStack} The decompressed witness stack.
|
|
581
|
-
*/
|
|
514
|
+
* Decompresses a compressed witness stack as outputted by Nargo into a `WitnessStack`.
|
|
515
|
+
*
|
|
516
|
+
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
517
|
+
* @returns {WitnessStack} The decompressed witness stack.
|
|
518
|
+
*/
|
|
582
519
|
module.exports.decompressWitnessStack = function(compressed_witness) {
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
589
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
590
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
591
|
-
if (r2) {
|
|
592
|
-
throw takeObject(r1);
|
|
593
|
-
}
|
|
594
|
-
return takeObject(r0);
|
|
595
|
-
} finally {
|
|
596
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
597
|
-
}
|
|
598
|
-
};
|
|
599
|
-
|
|
600
|
-
/**
|
|
601
|
-
* Sets the package's logging level.
|
|
602
|
-
*
|
|
603
|
-
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
604
|
-
*/
|
|
605
|
-
module.exports.initLogLevel = function(filter) {
|
|
606
|
-
try {
|
|
607
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
608
|
-
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
609
|
-
const len0 = WASM_VECTOR_LEN;
|
|
610
|
-
wasm.initLogLevel(retptr, ptr0, len0);
|
|
611
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
612
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
613
|
-
if (r1) {
|
|
614
|
-
throw takeObject(r0);
|
|
615
|
-
}
|
|
616
|
-
} finally {
|
|
617
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
520
|
+
const ptr0 = passArray8ToWasm0(compressed_witness, wasm.__wbindgen_malloc);
|
|
521
|
+
const len0 = WASM_VECTOR_LEN;
|
|
522
|
+
const ret = wasm.decompressWitnessStack(ptr0, len0);
|
|
523
|
+
if (ret[2]) {
|
|
524
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
618
525
|
}
|
|
526
|
+
return takeFromExternrefTable0(ret[0]);
|
|
619
527
|
};
|
|
620
528
|
|
|
621
|
-
function
|
|
622
|
-
wasm.
|
|
529
|
+
function __wbg_adapter_30(arg0, arg1, arg2) {
|
|
530
|
+
wasm.closure269_externref_shim(arg0, arg1, arg2);
|
|
623
531
|
}
|
|
624
532
|
|
|
625
|
-
function
|
|
626
|
-
|
|
627
|
-
return f.apply(this, args);
|
|
628
|
-
} catch (e) {
|
|
629
|
-
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
function __wbg_adapter_92(arg0, arg1, arg2, arg3) {
|
|
633
|
-
wasm.wasm_bindgen__convert__closures__invoke2_mut__h7636f3796134b93b(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
533
|
+
function __wbg_adapter_89(arg0, arg1, arg2, arg3, arg4) {
|
|
534
|
+
wasm.closure834_externref_shim(arg0, arg1, arg2, arg3, arg4);
|
|
634
535
|
}
|
|
635
536
|
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
}
|
|
537
|
+
function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
|
|
538
|
+
wasm.closure838_externref_shim(arg0, arg1, arg2, arg3);
|
|
539
|
+
}
|
|
639
540
|
|
|
640
|
-
module.exports.
|
|
641
|
-
const ret =
|
|
541
|
+
module.exports.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
|
|
542
|
+
const ret = arg0.call(arg1);
|
|
642
543
|
return ret;
|
|
643
|
-
};
|
|
544
|
+
}, arguments) };
|
|
644
545
|
|
|
645
|
-
module.exports.
|
|
646
|
-
const ret =
|
|
546
|
+
module.exports.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
547
|
+
const ret = arg0.call(arg1, arg2);
|
|
647
548
|
return ret;
|
|
648
|
-
};
|
|
649
|
-
|
|
650
|
-
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
651
|
-
const obj = getObject(arg1);
|
|
652
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
653
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
654
|
-
var len1 = WASM_VECTOR_LEN;
|
|
655
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
656
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
657
|
-
};
|
|
658
|
-
|
|
659
|
-
module.exports.__wbg_new_9f82ec4c0bc017c1 = function() {
|
|
660
|
-
const ret = new Map();
|
|
661
|
-
return addHeapObject(ret);
|
|
662
|
-
};
|
|
663
|
-
|
|
664
|
-
module.exports.__wbindgen_number_new = function(arg0) {
|
|
665
|
-
const ret = arg0;
|
|
666
|
-
return addHeapObject(ret);
|
|
667
|
-
};
|
|
668
|
-
|
|
669
|
-
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
670
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
671
|
-
return addHeapObject(ret);
|
|
672
|
-
};
|
|
549
|
+
}, arguments) };
|
|
673
550
|
|
|
674
|
-
module.exports.
|
|
675
|
-
const
|
|
676
|
-
if (obj.cnt-- == 1) {
|
|
677
|
-
obj.a = 0;
|
|
678
|
-
return true;
|
|
679
|
-
}
|
|
680
|
-
const ret = false;
|
|
551
|
+
module.exports.__wbg_call_833bed5770ea2041 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
552
|
+
const ret = arg0.call(arg1, arg2, arg3);
|
|
681
553
|
return ret;
|
|
682
|
-
};
|
|
554
|
+
}, arguments) };
|
|
683
555
|
|
|
684
|
-
module.exports.
|
|
685
|
-
const ret = new Error(
|
|
686
|
-
return
|
|
556
|
+
module.exports.__wbg_constructor_003f4a4118e07291 = function(arg0) {
|
|
557
|
+
const ret = new Error(arg0);
|
|
558
|
+
return ret;
|
|
687
559
|
};
|
|
688
560
|
|
|
689
|
-
module.exports.
|
|
690
|
-
const ret = new
|
|
691
|
-
return
|
|
561
|
+
module.exports.__wbg_constructor_c456dcccc52847dd = function(arg0) {
|
|
562
|
+
const ret = new Error(arg0);
|
|
563
|
+
return ret;
|
|
692
564
|
};
|
|
693
565
|
|
|
694
|
-
module.exports.
|
|
695
|
-
|
|
696
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
697
|
-
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
698
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
566
|
+
module.exports.__wbg_debug_3cb59063b29f58c1 = function(arg0) {
|
|
567
|
+
console.debug(arg0);
|
|
699
568
|
};
|
|
700
569
|
|
|
701
|
-
module.exports.
|
|
702
|
-
|
|
703
|
-
return addHeapObject(ret);
|
|
570
|
+
module.exports.__wbg_debug_e17b51583ca6a632 = function(arg0, arg1, arg2, arg3) {
|
|
571
|
+
console.debug(arg0, arg1, arg2, arg3);
|
|
704
572
|
};
|
|
705
573
|
|
|
706
|
-
module.exports.
|
|
707
|
-
|
|
708
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
709
|
-
const len1 = WASM_VECTOR_LEN;
|
|
710
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
711
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
574
|
+
module.exports.__wbg_error_524f506f44df1645 = function(arg0) {
|
|
575
|
+
console.error(arg0);
|
|
712
576
|
};
|
|
713
577
|
|
|
714
|
-
module.exports.
|
|
578
|
+
module.exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
715
579
|
let deferred0_0;
|
|
716
580
|
let deferred0_1;
|
|
717
581
|
try {
|
|
@@ -719,206 +583,308 @@ module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
|
719
583
|
deferred0_1 = arg1;
|
|
720
584
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
721
585
|
} finally {
|
|
722
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1);
|
|
586
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
723
587
|
}
|
|
724
588
|
};
|
|
725
589
|
|
|
726
|
-
module.exports.
|
|
727
|
-
console.
|
|
728
|
-
};
|
|
729
|
-
|
|
730
|
-
module.exports.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
|
|
731
|
-
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
732
|
-
};
|
|
733
|
-
|
|
734
|
-
module.exports.__wbg_error_a7e23606158b68b9 = function(arg0) {
|
|
735
|
-
console.error(getObject(arg0));
|
|
736
|
-
};
|
|
737
|
-
|
|
738
|
-
module.exports.__wbg_error_50f42b952a595a23 = function(arg0, arg1, arg2, arg3) {
|
|
739
|
-
console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
740
|
-
};
|
|
741
|
-
|
|
742
|
-
module.exports.__wbg_info_05db236d79f1b785 = function(arg0) {
|
|
743
|
-
console.info(getObject(arg0));
|
|
744
|
-
};
|
|
745
|
-
|
|
746
|
-
module.exports.__wbg_info_24d8f53d98f12b95 = function(arg0, arg1, arg2, arg3) {
|
|
747
|
-
console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
748
|
-
};
|
|
749
|
-
|
|
750
|
-
module.exports.__wbg_warn_9bdd743e9f5fe1e0 = function(arg0) {
|
|
751
|
-
console.warn(getObject(arg0));
|
|
590
|
+
module.exports.__wbg_error_80de38b3f7cc3c3c = function(arg0, arg1, arg2, arg3) {
|
|
591
|
+
console.error(arg0, arg1, arg2, arg3);
|
|
752
592
|
};
|
|
753
593
|
|
|
754
|
-
module.exports.
|
|
755
|
-
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
756
|
-
};
|
|
757
|
-
|
|
758
|
-
module.exports.__wbg_get_7303ed2ef026b2f5 = function(arg0, arg1) {
|
|
759
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
760
|
-
return addHeapObject(ret);
|
|
761
|
-
};
|
|
762
|
-
|
|
763
|
-
module.exports.__wbg_length_820c786973abdd8a = function(arg0) {
|
|
764
|
-
const ret = getObject(arg0).length;
|
|
765
|
-
return ret;
|
|
766
|
-
};
|
|
767
|
-
|
|
768
|
-
module.exports.__wbg_new_0394642eae39db16 = function() {
|
|
769
|
-
const ret = new Array();
|
|
770
|
-
return addHeapObject(ret);
|
|
771
|
-
};
|
|
772
|
-
|
|
773
|
-
module.exports.__wbg_new_0f2b71ca2f2a6029 = function() {
|
|
774
|
-
const ret = new Map();
|
|
775
|
-
return addHeapObject(ret);
|
|
776
|
-
};
|
|
777
|
-
|
|
778
|
-
module.exports.__wbg_from_6bc98a09a0b58bb1 = function(arg0) {
|
|
779
|
-
const ret = Array.from(getObject(arg0));
|
|
780
|
-
return addHeapObject(ret);
|
|
781
|
-
};
|
|
782
|
-
|
|
783
|
-
module.exports.__wbg_forEach_5ae261259d7517c8 = function(arg0, arg1, arg2) {
|
|
594
|
+
module.exports.__wbg_forEach_d6a05ca96422eff9 = function(arg0, arg1, arg2) {
|
|
784
595
|
try {
|
|
785
596
|
var state0 = {a: arg1, b: arg2};
|
|
786
597
|
var cb0 = (arg0, arg1, arg2) => {
|
|
787
598
|
const a = state0.a;
|
|
788
599
|
state0.a = 0;
|
|
789
600
|
try {
|
|
790
|
-
return
|
|
601
|
+
return __wbg_adapter_89(a, state0.b, arg0, arg1, arg2);
|
|
791
602
|
} finally {
|
|
792
603
|
state0.a = a;
|
|
793
604
|
}
|
|
794
605
|
};
|
|
795
|
-
|
|
606
|
+
arg0.forEach(cb0);
|
|
796
607
|
} finally {
|
|
797
608
|
state0.a = state0.b = 0;
|
|
798
609
|
}
|
|
799
610
|
};
|
|
800
611
|
|
|
801
|
-
module.exports.
|
|
802
|
-
const ret = getObject(arg0).push(getObject(arg1));
|
|
803
|
-
return ret;
|
|
804
|
-
};
|
|
805
|
-
|
|
806
|
-
module.exports.__wbg_reverse_a322332d916e2705 = function(arg0) {
|
|
807
|
-
const ret = getObject(arg0).reverse();
|
|
808
|
-
return addHeapObject(ret);
|
|
809
|
-
};
|
|
810
|
-
|
|
811
|
-
module.exports.__wbg_new_87297f22973157c8 = function(arg0, arg1) {
|
|
812
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
813
|
-
return addHeapObject(ret);
|
|
814
|
-
};
|
|
815
|
-
|
|
816
|
-
module.exports.__wbg_setcause_394738aae0ce9341 = function(arg0, arg1) {
|
|
817
|
-
getObject(arg0).cause = getObject(arg1);
|
|
818
|
-
};
|
|
819
|
-
|
|
820
|
-
module.exports.__wbg_call_587b30eea3e09332 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
821
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
822
|
-
return addHeapObject(ret);
|
|
823
|
-
}, arguments) };
|
|
824
|
-
|
|
825
|
-
module.exports.__wbg_call_4c73e4aecced6a7d = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
826
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
827
|
-
return addHeapObject(ret);
|
|
828
|
-
}, arguments) };
|
|
829
|
-
|
|
830
|
-
module.exports.__wbg_forEach_942772130a8d06a6 = function(arg0, arg1, arg2) {
|
|
612
|
+
module.exports.__wbg_forEach_e1cf6f7c8ecb7dae = function(arg0, arg1, arg2) {
|
|
831
613
|
try {
|
|
832
614
|
var state0 = {a: arg1, b: arg2};
|
|
833
615
|
var cb0 = (arg0, arg1) => {
|
|
834
616
|
const a = state0.a;
|
|
835
617
|
state0.a = 0;
|
|
836
618
|
try {
|
|
837
|
-
return
|
|
619
|
+
return __wbg_adapter_110(a, state0.b, arg0, arg1);
|
|
838
620
|
} finally {
|
|
839
621
|
state0.a = a;
|
|
840
622
|
}
|
|
841
623
|
};
|
|
842
|
-
|
|
624
|
+
arg0.forEach(cb0);
|
|
843
625
|
} finally {
|
|
844
626
|
state0.a = state0.b = 0;
|
|
845
627
|
}
|
|
846
628
|
};
|
|
847
629
|
|
|
848
|
-
module.exports.
|
|
849
|
-
const ret =
|
|
850
|
-
return
|
|
630
|
+
module.exports.__wbg_fromEntries_524679eecb0bdc2e = function() { return handleError(function (arg0) {
|
|
631
|
+
const ret = Object.fromEntries(arg0);
|
|
632
|
+
return ret;
|
|
633
|
+
}, arguments) };
|
|
634
|
+
|
|
635
|
+
module.exports.__wbg_from_2a5d3e218e67aa85 = function(arg0) {
|
|
636
|
+
const ret = Array.from(arg0);
|
|
637
|
+
return ret;
|
|
851
638
|
};
|
|
852
639
|
|
|
853
|
-
module.exports.
|
|
854
|
-
const ret =
|
|
855
|
-
return
|
|
856
|
-
}
|
|
640
|
+
module.exports.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
|
|
641
|
+
const ret = arg0[arg1 >>> 0];
|
|
642
|
+
return ret;
|
|
643
|
+
};
|
|
644
|
+
|
|
645
|
+
module.exports.__wbg_info_033d8b8a0838f1d3 = function(arg0, arg1, arg2, arg3) {
|
|
646
|
+
console.info(arg0, arg1, arg2, arg3);
|
|
647
|
+
};
|
|
857
648
|
|
|
858
|
-
module.exports.
|
|
859
|
-
|
|
860
|
-
|
|
649
|
+
module.exports.__wbg_info_3daf2e093e091b66 = function(arg0) {
|
|
650
|
+
console.info(arg0);
|
|
651
|
+
};
|
|
652
|
+
|
|
653
|
+
module.exports.__wbg_length_e2d2a49132c1b256 = function(arg0) {
|
|
654
|
+
const ret = arg0.length;
|
|
655
|
+
return ret;
|
|
861
656
|
};
|
|
862
657
|
|
|
863
|
-
module.exports.
|
|
658
|
+
module.exports.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
|
|
864
659
|
try {
|
|
865
660
|
var state0 = {a: arg0, b: arg1};
|
|
866
661
|
var cb0 = (arg0, arg1) => {
|
|
867
662
|
const a = state0.a;
|
|
868
663
|
state0.a = 0;
|
|
869
664
|
try {
|
|
870
|
-
return
|
|
665
|
+
return __wbg_adapter_110(a, state0.b, arg0, arg1);
|
|
871
666
|
} finally {
|
|
872
667
|
state0.a = a;
|
|
873
668
|
}
|
|
874
669
|
};
|
|
875
670
|
const ret = new Promise(cb0);
|
|
876
|
-
return
|
|
671
|
+
return ret;
|
|
877
672
|
} finally {
|
|
878
673
|
state0.a = state0.b = 0;
|
|
879
674
|
}
|
|
880
675
|
};
|
|
881
676
|
|
|
882
|
-
module.exports.
|
|
883
|
-
const ret =
|
|
884
|
-
return
|
|
677
|
+
module.exports.__wbg_new_3f4c5c451d69e970 = function() {
|
|
678
|
+
const ret = new Map();
|
|
679
|
+
return ret;
|
|
885
680
|
};
|
|
886
681
|
|
|
887
|
-
module.exports.
|
|
888
|
-
const ret =
|
|
889
|
-
return
|
|
682
|
+
module.exports.__wbg_new_5e0be73521bc8c17 = function() {
|
|
683
|
+
const ret = new Map();
|
|
684
|
+
return ret;
|
|
890
685
|
};
|
|
891
686
|
|
|
892
|
-
module.exports.
|
|
893
|
-
const ret =
|
|
894
|
-
return
|
|
687
|
+
module.exports.__wbg_new_78feb108b6472713 = function() {
|
|
688
|
+
const ret = new Array();
|
|
689
|
+
return ret;
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
module.exports.__wbg_new_8a6f238a6ece86ea = function() {
|
|
693
|
+
const ret = new Error();
|
|
694
|
+
return ret;
|
|
695
|
+
};
|
|
696
|
+
|
|
697
|
+
module.exports.__wbg_new_a324c5957dd8b845 = function() {
|
|
698
|
+
const ret = new Array();
|
|
699
|
+
return ret;
|
|
700
|
+
};
|
|
701
|
+
|
|
702
|
+
module.exports.__wbg_new_c68d7209be747379 = function(arg0, arg1) {
|
|
703
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
704
|
+
return ret;
|
|
705
|
+
};
|
|
706
|
+
|
|
707
|
+
module.exports.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
|
|
708
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
709
|
+
return ret;
|
|
895
710
|
};
|
|
896
711
|
|
|
897
|
-
module.exports.
|
|
712
|
+
module.exports.__wbg_parse_def2e24ef1252aff = function() { return handleError(function (arg0, arg1) {
|
|
898
713
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
899
|
-
return
|
|
714
|
+
return ret;
|
|
900
715
|
}, arguments) };
|
|
901
716
|
|
|
902
|
-
module.exports.
|
|
903
|
-
const ret =
|
|
717
|
+
module.exports.__wbg_push_737cfc8c1432c2c6 = function(arg0, arg1) {
|
|
718
|
+
const ret = arg0.push(arg1);
|
|
719
|
+
return ret;
|
|
720
|
+
};
|
|
721
|
+
|
|
722
|
+
module.exports.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
|
|
723
|
+
queueMicrotask(arg0);
|
|
724
|
+
};
|
|
725
|
+
|
|
726
|
+
module.exports.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
|
|
727
|
+
const ret = arg0.queueMicrotask;
|
|
728
|
+
return ret;
|
|
729
|
+
};
|
|
730
|
+
|
|
731
|
+
module.exports.__wbg_resolve_4851785c9c5f573d = function(arg0) {
|
|
732
|
+
const ret = Promise.resolve(arg0);
|
|
733
|
+
return ret;
|
|
734
|
+
};
|
|
735
|
+
|
|
736
|
+
module.exports.__wbg_reverse_71c11f9686a5c11b = function(arg0) {
|
|
737
|
+
const ret = arg0.reverse();
|
|
738
|
+
return ret;
|
|
739
|
+
};
|
|
740
|
+
|
|
741
|
+
module.exports.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
|
|
742
|
+
const ret = arg0.set(arg1, arg2);
|
|
743
|
+
return ret;
|
|
744
|
+
};
|
|
745
|
+
|
|
746
|
+
module.exports.__wbg_set_bb8cecf6a62b9f46 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
747
|
+
const ret = Reflect.set(arg0, arg1, arg2);
|
|
904
748
|
return ret;
|
|
905
749
|
}, arguments) };
|
|
906
750
|
|
|
751
|
+
module.exports.__wbg_setcause_180f5110152d3ce3 = function(arg0, arg1) {
|
|
752
|
+
arg0.cause = arg1;
|
|
753
|
+
};
|
|
754
|
+
|
|
755
|
+
module.exports.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
756
|
+
const ret = arg1.stack;
|
|
757
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
758
|
+
const len1 = WASM_VECTOR_LEN;
|
|
759
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
760
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
761
|
+
};
|
|
762
|
+
|
|
763
|
+
module.exports.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
|
|
764
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
765
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
766
|
+
};
|
|
767
|
+
|
|
768
|
+
module.exports.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
|
|
769
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
770
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
771
|
+
};
|
|
772
|
+
|
|
773
|
+
module.exports.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
|
|
774
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
775
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
776
|
+
};
|
|
777
|
+
|
|
778
|
+
module.exports.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
|
|
779
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
780
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
781
|
+
};
|
|
782
|
+
|
|
783
|
+
module.exports.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
|
|
784
|
+
const ret = arg0.then(arg1);
|
|
785
|
+
return ret;
|
|
786
|
+
};
|
|
787
|
+
|
|
788
|
+
module.exports.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
|
|
789
|
+
const ret = arg0.then(arg1, arg2);
|
|
790
|
+
return ret;
|
|
791
|
+
};
|
|
792
|
+
|
|
793
|
+
module.exports.__wbg_values_fcb8ba8c0aad8b58 = function(arg0) {
|
|
794
|
+
const ret = Object.values(arg0);
|
|
795
|
+
return ret;
|
|
796
|
+
};
|
|
797
|
+
|
|
798
|
+
module.exports.__wbg_warn_4ca3906c248c47c4 = function(arg0) {
|
|
799
|
+
console.warn(arg0);
|
|
800
|
+
};
|
|
801
|
+
|
|
802
|
+
module.exports.__wbg_warn_aaf1f4664a035bd6 = function(arg0, arg1, arg2, arg3) {
|
|
803
|
+
console.warn(arg0, arg1, arg2, arg3);
|
|
804
|
+
};
|
|
805
|
+
|
|
806
|
+
module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
807
|
+
const obj = arg0.original;
|
|
808
|
+
if (obj.cnt-- == 1) {
|
|
809
|
+
obj.a = 0;
|
|
810
|
+
return true;
|
|
811
|
+
}
|
|
812
|
+
const ret = false;
|
|
813
|
+
return ret;
|
|
814
|
+
};
|
|
815
|
+
|
|
816
|
+
module.exports.__wbindgen_closure_wrapper739 = function(arg0, arg1, arg2) {
|
|
817
|
+
const ret = makeMutClosure(arg0, arg1, 270, __wbg_adapter_30);
|
|
818
|
+
return ret;
|
|
819
|
+
};
|
|
820
|
+
|
|
907
821
|
module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
|
908
|
-
const ret = debugString(
|
|
822
|
+
const ret = debugString(arg1);
|
|
909
823
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
910
824
|
const len1 = WASM_VECTOR_LEN;
|
|
911
|
-
|
|
912
|
-
|
|
825
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
826
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
913
827
|
};
|
|
914
828
|
|
|
915
|
-
module.exports.
|
|
916
|
-
|
|
829
|
+
module.exports.__wbindgen_init_externref_table = function() {
|
|
830
|
+
const table = wasm.__wbindgen_export_2;
|
|
831
|
+
const offset = table.grow(4);
|
|
832
|
+
table.set(0, undefined);
|
|
833
|
+
table.set(offset + 0, undefined);
|
|
834
|
+
table.set(offset + 1, null);
|
|
835
|
+
table.set(offset + 2, true);
|
|
836
|
+
table.set(offset + 3, false);
|
|
837
|
+
;
|
|
917
838
|
};
|
|
918
839
|
|
|
919
|
-
module.exports.
|
|
920
|
-
const ret =
|
|
921
|
-
return
|
|
840
|
+
module.exports.__wbindgen_is_array = function(arg0) {
|
|
841
|
+
const ret = Array.isArray(arg0);
|
|
842
|
+
return ret;
|
|
843
|
+
};
|
|
844
|
+
|
|
845
|
+
module.exports.__wbindgen_is_function = function(arg0) {
|
|
846
|
+
const ret = typeof(arg0) === 'function';
|
|
847
|
+
return ret;
|
|
848
|
+
};
|
|
849
|
+
|
|
850
|
+
module.exports.__wbindgen_is_string = function(arg0) {
|
|
851
|
+
const ret = typeof(arg0) === 'string';
|
|
852
|
+
return ret;
|
|
853
|
+
};
|
|
854
|
+
|
|
855
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
856
|
+
const ret = arg0 === undefined;
|
|
857
|
+
return ret;
|
|
858
|
+
};
|
|
859
|
+
|
|
860
|
+
module.exports.__wbindgen_number_get = function(arg0, arg1) {
|
|
861
|
+
const obj = arg1;
|
|
862
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
863
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
864
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
865
|
+
};
|
|
866
|
+
|
|
867
|
+
module.exports.__wbindgen_number_new = function(arg0) {
|
|
868
|
+
const ret = arg0;
|
|
869
|
+
return ret;
|
|
870
|
+
};
|
|
871
|
+
|
|
872
|
+
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
873
|
+
const obj = arg1;
|
|
874
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
875
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
876
|
+
var len1 = WASM_VECTOR_LEN;
|
|
877
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
878
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
879
|
+
};
|
|
880
|
+
|
|
881
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
882
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
883
|
+
return ret;
|
|
884
|
+
};
|
|
885
|
+
|
|
886
|
+
module.exports.__wbindgen_throw = function(arg0, arg1) {
|
|
887
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
922
888
|
};
|
|
923
889
|
|
|
924
890
|
const path = require('path').join(__dirname, 'acvm_js_bg.wasm');
|
|
@@ -929,3 +895,5 @@ const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
|
|
|
929
895
|
wasm = wasmInstance.exports;
|
|
930
896
|
module.exports.__wasm = wasm;
|
|
931
897
|
|
|
898
|
+
wasm.__wbindgen_start();
|
|
899
|
+
|