@enclave-e3/wasm 0.1.4 → 0.1.6

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.
@@ -1,20 +1,5 @@
1
1
  let wasm;
2
2
 
3
- function addToExternrefTable0(obj) {
4
- const idx = wasm.__externref_table_alloc();
5
- wasm.__wbindgen_export_2.set(idx, obj);
6
- return idx;
7
- }
8
-
9
- function handleError(f, args) {
10
- try {
11
- return f.apply(this, args);
12
- } catch (e) {
13
- const idx = addToExternrefTable0(e);
14
- wasm.__wbindgen_exn_store(idx);
15
- }
16
- }
17
-
18
3
  let cachedUint8ArrayMemory0 = null;
19
4
 
20
5
  function getUint8ArrayMemory0() {
@@ -24,16 +9,16 @@ function getUint8ArrayMemory0() {
24
9
  return cachedUint8ArrayMemory0;
25
10
  }
26
11
 
27
- let cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
12
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
28
13
 
29
- if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
14
+ cachedTextDecoder.decode();
30
15
 
31
16
  const MAX_SAFARI_DECODE_BYTES = 2146435072;
32
17
  let numBytesDecoded = 0;
33
18
  function decodeText(ptr, len) {
34
19
  numBytesDecoded += len;
35
20
  if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
36
- cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
21
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
37
22
  cachedTextDecoder.decode();
38
23
  numBytesDecoded = len;
39
24
  }
@@ -45,8 +30,82 @@ function getStringFromWasm0(ptr, len) {
45
30
  return decodeText(ptr, len);
46
31
  }
47
32
 
48
- function isLikeNone(x) {
49
- return x === undefined || x === null;
33
+ let WASM_VECTOR_LEN = 0;
34
+
35
+ const cachedTextEncoder = new TextEncoder();
36
+
37
+ if (!('encodeInto' in cachedTextEncoder)) {
38
+ cachedTextEncoder.encodeInto = function (arg, view) {
39
+ const buf = cachedTextEncoder.encode(arg);
40
+ view.set(buf);
41
+ return {
42
+ read: arg.length,
43
+ written: buf.length
44
+ };
45
+ }
46
+ }
47
+
48
+ function passStringToWasm0(arg, malloc, realloc) {
49
+
50
+ if (realloc === undefined) {
51
+ const buf = cachedTextEncoder.encode(arg);
52
+ const ptr = malloc(buf.length, 1) >>> 0;
53
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
54
+ WASM_VECTOR_LEN = buf.length;
55
+ return ptr;
56
+ }
57
+
58
+ let len = arg.length;
59
+ let ptr = malloc(len, 1) >>> 0;
60
+
61
+ const mem = getUint8ArrayMemory0();
62
+
63
+ let offset = 0;
64
+
65
+ for (; offset < len; offset++) {
66
+ const code = arg.charCodeAt(offset);
67
+ if (code > 0x7F) break;
68
+ mem[ptr + offset] = code;
69
+ }
70
+
71
+ if (offset !== len) {
72
+ if (offset !== 0) {
73
+ arg = arg.slice(offset);
74
+ }
75
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
76
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
77
+ const ret = cachedTextEncoder.encodeInto(arg, view);
78
+
79
+ offset += ret.written;
80
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
81
+ }
82
+
83
+ WASM_VECTOR_LEN = offset;
84
+ return ptr;
85
+ }
86
+
87
+ let cachedDataViewMemory0 = null;
88
+
89
+ function getDataViewMemory0() {
90
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
91
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
92
+ }
93
+ return cachedDataViewMemory0;
94
+ }
95
+
96
+ function addToExternrefTable0(obj) {
97
+ const idx = wasm.__externref_table_alloc();
98
+ wasm.__wbindgen_externrefs.set(idx, obj);
99
+ return idx;
100
+ }
101
+
102
+ function handleError(f, args) {
103
+ try {
104
+ return f.apply(this, args);
105
+ } catch (e) {
106
+ const idx = addToExternrefTable0(e);
107
+ wasm.__wbindgen_exn_store(idx);
108
+ }
50
109
  }
51
110
 
52
111
  function getArrayU8FromWasm0(ptr, len) {
@@ -54,7 +113,9 @@ function getArrayU8FromWasm0(ptr, len) {
54
113
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
55
114
  }
56
115
 
57
- let WASM_VECTOR_LEN = 0;
116
+ function isLikeNone(x) {
117
+ return x === undefined || x === null;
118
+ }
58
119
 
59
120
  function passArray8ToWasm0(arg, malloc) {
60
121
  const ptr = malloc(arg.length * 1, 1) >>> 0;
@@ -63,8 +124,24 @@ function passArray8ToWasm0(arg, malloc) {
63
124
  return ptr;
64
125
  }
65
126
 
127
+ let cachedBigUint64ArrayMemory0 = null;
128
+
129
+ function getBigUint64ArrayMemory0() {
130
+ if (cachedBigUint64ArrayMemory0 === null || cachedBigUint64ArrayMemory0.byteLength === 0) {
131
+ cachedBigUint64ArrayMemory0 = new BigUint64Array(wasm.memory.buffer);
132
+ }
133
+ return cachedBigUint64ArrayMemory0;
134
+ }
135
+
136
+ function passArray64ToWasm0(arg, malloc) {
137
+ const ptr = malloc(arg.length * 8, 8) >>> 0;
138
+ getBigUint64ArrayMemory0().set(arg, ptr / 8);
139
+ WASM_VECTOR_LEN = arg.length;
140
+ return ptr;
141
+ }
142
+
66
143
  function takeFromExternrefTable0(idx) {
67
- const value = wasm.__wbindgen_export_2.get(idx);
144
+ const value = wasm.__wbindgen_externrefs.get(idx);
68
145
  wasm.__externref_table_dealloc(idx);
69
146
  return value;
70
147
  }
@@ -90,28 +167,62 @@ function takeFromExternrefTable0(idx) {
90
167
  * @param {Uint8Array} public_key
91
168
  * @param {number} degree
92
169
  * @param {bigint} plaintext_modulus
93
- * @param {bigint} moduli
170
+ * @param {BigUint64Array} moduli
94
171
  * @returns {Uint8Array}
95
172
  */
96
173
  export function bfv_encrypt_number(data, public_key, degree, plaintext_modulus, moduli) {
97
174
  const ptr0 = passArray8ToWasm0(public_key, wasm.__wbindgen_malloc);
98
175
  const len0 = WASM_VECTOR_LEN;
99
- const ret = wasm.bfv_encrypt_number(data, ptr0, len0, degree, plaintext_modulus, moduli);
176
+ const ptr1 = passArray64ToWasm0(moduli, wasm.__wbindgen_malloc);
177
+ const len1 = WASM_VECTOR_LEN;
178
+ const ret = wasm.bfv_encrypt_number(data, ptr0, len0, degree, plaintext_modulus, ptr1, len1);
100
179
  if (ret[3]) {
101
180
  throw takeFromExternrefTable0(ret[2]);
102
181
  }
103
- var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
182
+ var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
104
183
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
105
- return v2;
184
+ return v3;
106
185
  }
107
186
 
108
- let cachedDataViewMemory0 = null;
109
-
110
- function getDataViewMemory0() {
111
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
112
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
187
+ /**
188
+ * A function to encrypt a Vec<u64> value using BFV and default params.
189
+ *
190
+ * # Arguments
191
+ *
192
+ * * `data` - The data to encrypt - must be a Vec<u64>
193
+ * * `public_key` - The public key to be used for encryption
194
+ * * `degree` - Polynomial degree for BFV parameters
195
+ * * `plaintext_modulus` - Plaintext modulus for BFV parameters
196
+ * * `moduli` - Modulus for BFV parameters
197
+ *
198
+ * # Returns
199
+ *
200
+ * Returns a `Result<Vec<u8>, JsValue>` containing the encrypted data and any errors.
201
+ *
202
+ * # Panics
203
+ *
204
+ * Panics if the data cannot be encrypted
205
+ * @param {BigUint64Array} data
206
+ * @param {Uint8Array} public_key
207
+ * @param {number} degree
208
+ * @param {bigint} plaintext_modulus
209
+ * @param {BigUint64Array} moduli
210
+ * @returns {Uint8Array}
211
+ */
212
+ export function bfv_encrypt_vector(data, public_key, degree, plaintext_modulus, moduli) {
213
+ const ptr0 = passArray64ToWasm0(data, wasm.__wbindgen_malloc);
214
+ const len0 = WASM_VECTOR_LEN;
215
+ const ptr1 = passArray8ToWasm0(public_key, wasm.__wbindgen_malloc);
216
+ const len1 = WASM_VECTOR_LEN;
217
+ const ptr2 = passArray64ToWasm0(moduli, wasm.__wbindgen_malloc);
218
+ const len2 = WASM_VECTOR_LEN;
219
+ const ret = wasm.bfv_encrypt_vector(ptr0, len0, ptr1, len1, degree, plaintext_modulus, ptr2, len2);
220
+ if (ret[3]) {
221
+ throw takeFromExternrefTable0(ret[2]);
113
222
  }
114
- return cachedDataViewMemory0;
223
+ var v4 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
224
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
225
+ return v4;
115
226
  }
116
227
 
117
228
  function getArrayJsValueFromWasm0(ptr, len) {
@@ -119,7 +230,7 @@ function getArrayJsValueFromWasm0(ptr, len) {
119
230
  const mem = getDataViewMemory0();
120
231
  const result = [];
121
232
  for (let i = ptr; i < ptr + 4 * len; i += 4) {
122
- result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true)));
233
+ result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
123
234
  }
124
235
  wasm.__externref_drop_slice(ptr, len);
125
236
  return result;
@@ -147,19 +258,111 @@ function getArrayJsValueFromWasm0(ptr, len) {
147
258
  * @param {Uint8Array} public_key
148
259
  * @param {number} degree
149
260
  * @param {bigint} plaintext_modulus
150
- * @param {bigint} moduli
261
+ * @param {BigUint64Array} moduli
151
262
  * @returns {any[]}
152
263
  */
153
264
  export function bfv_verifiable_encrypt_number(data, public_key, degree, plaintext_modulus, moduli) {
154
265
  const ptr0 = passArray8ToWasm0(public_key, wasm.__wbindgen_malloc);
155
266
  const len0 = WASM_VECTOR_LEN;
156
- const ret = wasm.bfv_verifiable_encrypt_number(data, ptr0, len0, degree, plaintext_modulus, moduli);
267
+ const ptr1 = passArray64ToWasm0(moduli, wasm.__wbindgen_malloc);
268
+ const len1 = WASM_VECTOR_LEN;
269
+ const ret = wasm.bfv_verifiable_encrypt_number(data, ptr0, len0, degree, plaintext_modulus, ptr1, len1);
157
270
  if (ret[3]) {
158
271
  throw takeFromExternrefTable0(ret[2]);
159
272
  }
160
- var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
273
+ var v3 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
161
274
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
162
- return v2;
275
+ return v3;
276
+ }
277
+
278
+ /**
279
+ * A function to encrypt a Vec<u64> value using BFV and default params and
280
+ * generate circuit inputs for Greco
281
+ *
282
+ * # Arguments
283
+ *
284
+ * * `data` - The data to encrypt - must be a Vec<u64>
285
+ * * `public_key` - The public key to be used for encryption
286
+ * * `degree` - Polynomial degree for BFV parameters
287
+ * * `plaintext_modulus` - Plaintext modulus for BFV parameters
288
+ * * `moduli` - Modulus for BFV parameters
289
+ *
290
+ * # Returns
291
+ *
292
+ * Returns a `Result<Vec<JsValue>, JsValue>` containing the encrypted data, circuit inputs and any errors.
293
+ *
294
+ * # Panics
295
+ *
296
+ * Panics if the data cannot be encrypted
297
+ * @param {BigUint64Array} data
298
+ * @param {Uint8Array} public_key
299
+ * @param {number} degree
300
+ * @param {bigint} plaintext_modulus
301
+ * @param {BigUint64Array} moduli
302
+ * @returns {any[]}
303
+ */
304
+ export function bfv_verifiable_encrypt_vector(data, public_key, degree, plaintext_modulus, moduli) {
305
+ const ptr0 = passArray64ToWasm0(data, wasm.__wbindgen_malloc);
306
+ const len0 = WASM_VECTOR_LEN;
307
+ const ptr1 = passArray8ToWasm0(public_key, wasm.__wbindgen_malloc);
308
+ const len1 = WASM_VECTOR_LEN;
309
+ const ptr2 = passArray64ToWasm0(moduli, wasm.__wbindgen_malloc);
310
+ const len2 = WASM_VECTOR_LEN;
311
+ const ret = wasm.bfv_verifiable_encrypt_vector(ptr0, len0, ptr1, len1, degree, plaintext_modulus, ptr2, len2);
312
+ if (ret[3]) {
313
+ throw takeFromExternrefTable0(ret[2]);
314
+ }
315
+ var v4 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
316
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
317
+ return v4;
318
+ }
319
+
320
+ /**
321
+ * Retrieves a BFV parameter set by name.
322
+ *
323
+ * # Parameters
324
+ * * `name` - Parameter set identifier (e.g., "SET_8192_1000_4")
325
+ *
326
+ * # Returns
327
+ * A JavaScript object with the following structure:
328
+ * ```typescript
329
+ * {
330
+ * degree: number; // Polynomial degree (e.g., 8192)
331
+ * plaintext_modulus: number; // Plaintext modulus value (e.g., 1000)
332
+ * moduli: bigint[]; // Array of moduli
333
+ * error1_variance: string | null; // Error variance as string or null
334
+ * }
335
+ * ```
336
+ *
337
+ * # Errors
338
+ * Returns error if the parameter set name is invalid or serialization fails.
339
+ * @param {string} name
340
+ * @returns {any}
341
+ */
342
+ export function get_bfv_params(name) {
343
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
344
+ const len0 = WASM_VECTOR_LEN;
345
+ const ret = wasm.get_bfv_params(ptr0, len0);
346
+ if (ret[2]) {
347
+ throw takeFromExternrefTable0(ret[1]);
348
+ }
349
+ return takeFromExternrefTable0(ret[0]);
350
+ }
351
+
352
+ /**
353
+ * Returns all available BFV parameter set identifiers.
354
+ *
355
+ * # Returns
356
+ * Array of parameter set names that can be passed to `get_bfv_params()`.
357
+ * Includes both production-ready sets (e.g., "SET_8192_1000_4") and
358
+ * insecure sets for testing (prefixed with "INSECURE_").
359
+ * @returns {string[]}
360
+ */
361
+ export function get_bfv_params_list() {
362
+ const ret = wasm.get_bfv_params_list();
363
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
364
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
365
+ return v1;
163
366
  }
164
367
 
165
368
  const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
@@ -200,15 +403,42 @@ async function __wbg_load(module, imports) {
200
403
  function __wbg_get_imports() {
201
404
  const imports = {};
202
405
  imports.wbg = {};
203
- imports.wbg.__wbg_buffer_a1a27a0dfa70165d = function(arg0) {
204
- const ret = arg0.buffer;
406
+ imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
407
+ const ret = Error(getStringFromWasm0(arg0, arg1));
408
+ return ret;
409
+ };
410
+ imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
411
+ const ret = String(arg1);
412
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
413
+ const len1 = WASM_VECTOR_LEN;
414
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
415
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
416
+ };
417
+ imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
418
+ const ret = typeof(arg0) === 'function';
419
+ return ret;
420
+ };
421
+ imports.wbg.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
422
+ const val = arg0;
423
+ const ret = typeof(val) === 'object' && val !== null;
424
+ return ret;
425
+ };
426
+ imports.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
427
+ const ret = typeof(arg0) === 'string';
428
+ return ret;
429
+ };
430
+ imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
431
+ const ret = arg0 === undefined;
205
432
  return ret;
206
433
  };
207
- imports.wbg.__wbg_call_f2db6205e5c51dc8 = function() { return handleError(function (arg0, arg1, arg2) {
434
+ imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
435
+ throw new Error(getStringFromWasm0(arg0, arg1));
436
+ };
437
+ imports.wbg.__wbg_call_525440f72fbfc0ea = function() { return handleError(function (arg0, arg1, arg2) {
208
438
  const ret = arg0.call(arg1, arg2);
209
439
  return ret;
210
440
  }, arguments) };
211
- imports.wbg.__wbg_call_fbe8be8bf6436ce5 = function() { return handleError(function (arg0, arg1) {
441
+ imports.wbg.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
212
442
  const ret = arg0.call(arg1);
213
443
  return ret;
214
444
  }, arguments) };
@@ -219,23 +449,27 @@ function __wbg_get_imports() {
219
449
  imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
220
450
  arg0.getRandomValues(arg1);
221
451
  }, arguments) };
452
+ imports.wbg.__wbg_length_69bca3cb64fc8748 = function(arg0) {
453
+ const ret = arg0.length;
454
+ return ret;
455
+ };
222
456
  imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
223
457
  const ret = arg0.msCrypto;
224
458
  return ret;
225
459
  };
226
- imports.wbg.__wbg_new_e52b3efaaa774f96 = function(arg0) {
227
- const ret = new Uint8Array(arg0);
460
+ imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
461
+ const ret = new Object();
228
462
  return ret;
229
463
  };
230
- imports.wbg.__wbg_newnoargs_ff528e72d35de39a = function(arg0, arg1) {
231
- const ret = new Function(getStringFromWasm0(arg0, arg1));
464
+ imports.wbg.__wbg_new_e17d9f43105b08be = function() {
465
+ const ret = new Array();
232
466
  return ret;
233
467
  };
234
- imports.wbg.__wbg_newwithbyteoffsetandlength_3b01ecda099177e8 = function(arg0, arg1, arg2) {
235
- const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
468
+ imports.wbg.__wbg_new_no_args_ee98eee5275000a4 = function(arg0, arg1) {
469
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
236
470
  return ret;
237
471
  };
238
- imports.wbg.__wbg_newwithlength_08f872dc1e3ada2e = function(arg0) {
472
+ imports.wbg.__wbg_new_with_length_01aa0dc35aa13543 = function(arg0) {
239
473
  const ret = new Uint8Array(arg0 >>> 0);
240
474
  return ret;
241
475
  };
@@ -247,6 +481,9 @@ function __wbg_get_imports() {
247
481
  const ret = arg0.process;
248
482
  return ret;
249
483
  };
484
+ imports.wbg.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
485
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
486
+ };
250
487
  imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
251
488
  arg0.randomFillSync(arg1);
252
489
  }, arguments) };
@@ -254,26 +491,29 @@ function __wbg_get_imports() {
254
491
  const ret = module.require;
255
492
  return ret;
256
493
  }, arguments) };
257
- imports.wbg.__wbg_set_fe4e79d1ed3b0e9b = function(arg0, arg1, arg2) {
258
- arg0.set(arg1, arg2 >>> 0);
494
+ imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
495
+ arg0[arg1] = arg2;
496
+ };
497
+ imports.wbg.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
498
+ arg0[arg1 >>> 0] = arg2;
259
499
  };
260
- imports.wbg.__wbg_static_accessor_GLOBAL_487c52c58d65314d = function() {
500
+ imports.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e = function() {
261
501
  const ret = typeof global === 'undefined' ? null : global;
262
502
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
263
503
  };
264
- imports.wbg.__wbg_static_accessor_GLOBAL_THIS_ee9704f328b6b291 = function() {
504
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac = function() {
265
505
  const ret = typeof globalThis === 'undefined' ? null : globalThis;
266
506
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
267
507
  };
268
- imports.wbg.__wbg_static_accessor_SELF_78c9e3071b912620 = function() {
508
+ imports.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b = function() {
269
509
  const ret = typeof self === 'undefined' ? null : self;
270
510
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
271
511
  };
272
- imports.wbg.__wbg_static_accessor_WINDOW_a093d21393777366 = function() {
512
+ imports.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2 = function() {
273
513
  const ret = typeof window === 'undefined' ? null : window;
274
514
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
275
515
  };
276
- imports.wbg.__wbg_subarray_dd4ade7d53bd8e26 = function(arg0, arg1, arg2) {
516
+ imports.wbg.__wbg_subarray_480600f3d6a9f26c = function(arg0, arg1, arg2) {
277
517
  const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
278
518
  return ret;
279
519
  };
@@ -281,61 +521,51 @@ function __wbg_get_imports() {
281
521
  const ret = arg0.versions;
282
522
  return ret;
283
523
  };
284
- imports.wbg.__wbindgen_init_externref_table = function() {
285
- const table = wasm.__wbindgen_export_2;
286
- const offset = table.grow(4);
287
- table.set(0, undefined);
288
- table.set(offset + 0, undefined);
289
- table.set(offset + 1, null);
290
- table.set(offset + 2, true);
291
- table.set(offset + 3, false);
292
- ;
293
- };
294
- imports.wbg.__wbindgen_is_function = function(arg0) {
295
- const ret = typeof(arg0) === 'function';
296
- return ret;
297
- };
298
- imports.wbg.__wbindgen_is_object = function(arg0) {
299
- const val = arg0;
300
- const ret = typeof(val) === 'object' && val !== null;
524
+ imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
525
+ // Cast intrinsic for `Ref(String) -> Externref`.
526
+ const ret = getStringFromWasm0(arg0, arg1);
301
527
  return ret;
302
528
  };
303
- imports.wbg.__wbindgen_is_string = function(arg0) {
304
- const ret = typeof(arg0) === 'string';
529
+ imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
530
+ // Cast intrinsic for `U64 -> Externref`.
531
+ const ret = BigInt.asUintN(64, arg0);
305
532
  return ret;
306
533
  };
307
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
308
- const ret = arg0 === undefined;
534
+ imports.wbg.__wbindgen_cast_77bc3e92745e9a35 = function(arg0, arg1) {
535
+ var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
536
+ wasm.__wbindgen_free(arg0, arg1 * 1, 1);
537
+ // Cast intrinsic for `Vector(U8) -> Externref`.
538
+ const ret = v0;
309
539
  return ret;
310
540
  };
311
- imports.wbg.__wbindgen_memory = function() {
312
- const ret = wasm.memory;
541
+ imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
542
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
543
+ const ret = getArrayU8FromWasm0(arg0, arg1);
313
544
  return ret;
314
545
  };
315
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
316
- const ret = getStringFromWasm0(arg0, arg1);
546
+ imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
547
+ // Cast intrinsic for `F64 -> Externref`.
548
+ const ret = arg0;
317
549
  return ret;
318
550
  };
319
- imports.wbg.__wbindgen_throw = function(arg0, arg1) {
320
- throw new Error(getStringFromWasm0(arg0, arg1));
321
- };
322
- imports.wbg.__wbindgen_uint8_array_new = function(arg0, arg1) {
323
- var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
324
- wasm.__wbindgen_free(arg0, arg1 * 1, 1);
325
- const ret = v0;
326
- return ret;
551
+ imports.wbg.__wbindgen_init_externref_table = function() {
552
+ const table = wasm.__wbindgen_externrefs;
553
+ const offset = table.grow(4);
554
+ table.set(0, undefined);
555
+ table.set(offset + 0, undefined);
556
+ table.set(offset + 1, null);
557
+ table.set(offset + 2, true);
558
+ table.set(offset + 3, false);
559
+ ;
327
560
  };
328
561
 
329
562
  return imports;
330
563
  }
331
564
 
332
- function __wbg_init_memory(imports, memory) {
333
-
334
- }
335
-
336
565
  function __wbg_finalize_init(instance, module) {
337
566
  wasm = instance.exports;
338
567
  __wbg_init.__wbindgen_wasm_module = module;
568
+ cachedBigUint64ArrayMemory0 = null;
339
569
  cachedDataViewMemory0 = null;
340
570
  cachedUint8ArrayMemory0 = null;
341
571
 
@@ -358,8 +588,6 @@ function initSync(module) {
358
588
 
359
589
  const imports = __wbg_get_imports();
360
590
 
361
- __wbg_init_memory(imports);
362
-
363
591
  if (!(module instanceof WebAssembly.Module)) {
364
592
  module = new WebAssembly.Module(module);
365
593
  }
@@ -390,8 +618,6 @@ async function __wbg_init(module_or_path) {
390
618
  module_or_path = fetch(module_or_path);
391
619
  }
392
620
 
393
- __wbg_init_memory(imports);
394
-
395
621
  const { instance, module } = await __wbg_load(await module_or_path, imports);
396
622
 
397
623
  return __wbg_finalize_init(instance, module);