@noir-lang/acvm_js 0.28.0-20a160c → 0.28.0-88682da

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.
@@ -161,16 +161,16 @@ export type BuildInfo = {
161
161
 
162
162
 
163
163
 
164
- export type LogLevel = "OFF" | "ERROR" | "WARN" | "INFO" | "DEBUG" | "TRACE";
165
-
166
-
167
-
168
164
  export type ExecutionError = Error & {
169
165
  callStack?: string[];
170
166
  };
171
167
 
172
168
 
173
169
 
170
+ export type LogLevel = "OFF" | "ERROR" | "WARN" | "INFO" | "DEBUG" | "TRACE";
171
+
172
+
173
+
174
174
  // Map from witness index to hex string value of witness.
175
175
  export type WitnessMap = Map<number, string>;
176
176
 
package/nodejs/acvm_js.js CHANGED
@@ -3,28 +3,12 @@ imports['__wbindgen_placeholder__'] = module.exports;
3
3
  let wasm;
4
4
  const { TextDecoder, TextEncoder } = require(`util`);
5
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
6
  const heap = new Array(128).fill(undefined);
25
7
 
26
8
  heap.push(undefined, null, true, false);
27
9
 
10
+ function getObject(idx) { return heap[idx]; }
11
+
28
12
  let heap_next = heap.length;
29
13
 
30
14
  function addHeapObject(obj) {
@@ -36,8 +20,6 @@ function addHeapObject(obj) {
36
20
  return idx;
37
21
  }
38
22
 
39
- function getObject(idx) { return heap[idx]; }
40
-
41
23
  function dropObject(idx) {
42
24
  if (idx < 132) return;
43
25
  heap[idx] = heap_next;
@@ -50,6 +32,24 @@ function takeObject(idx) {
50
32
  return ret;
51
33
  }
52
34
 
35
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
36
+
37
+ cachedTextDecoder.decode();
38
+
39
+ let cachedUint8Memory0 = null;
40
+
41
+ function getUint8Memory0() {
42
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
43
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
44
+ }
45
+ return cachedUint8Memory0;
46
+ }
47
+
48
+ function getStringFromWasm0(ptr, len) {
49
+ ptr = ptr >>> 0;
50
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
51
+ }
52
+
53
53
  function isLikeNone(x) {
54
54
  return x === undefined || x === null;
55
55
  }
@@ -627,11 +627,6 @@ class WasmBlackBoxFunctionSolver {
627
627
  }
628
628
  module.exports.WasmBlackBoxFunctionSolver = WasmBlackBoxFunctionSolver;
629
629
 
630
- module.exports.__wbindgen_error_new = function(arg0, arg1) {
631
- const ret = new Error(getStringFromWasm0(arg0, arg1));
632
- return addHeapObject(ret);
633
- };
634
-
635
630
  module.exports.__wbindgen_object_clone_ref = function(arg0) {
636
631
  const ret = getObject(arg0);
637
632
  return addHeapObject(ret);
@@ -641,6 +636,21 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
641
636
  takeObject(arg0);
642
637
  };
643
638
 
639
+ module.exports.__wbindgen_error_new = function(arg0, arg1) {
640
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
641
+ return addHeapObject(ret);
642
+ };
643
+
644
+ module.exports.__wbindgen_is_string = function(arg0) {
645
+ const ret = typeof(getObject(arg0)) === 'string';
646
+ return ret;
647
+ };
648
+
649
+ module.exports.__wbindgen_is_array = function(arg0) {
650
+ const ret = Array.isArray(getObject(arg0));
651
+ return ret;
652
+ };
653
+
644
654
  module.exports.__wbg_wasmblackboxfunctionsolver_new = function(arg0) {
645
655
  const ret = WasmBlackBoxFunctionSolver.__wrap(arg0);
646
656
  return addHeapObject(ret);
@@ -663,9 +673,9 @@ module.exports.__wbindgen_number_get = function(arg0, arg1) {
663
673
  getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
664
674
  };
665
675
 
666
- module.exports.__wbindgen_is_array = function(arg0) {
667
- const ret = Array.isArray(getObject(arg0));
668
- return ret;
676
+ module.exports.__wbg_constructor_bd5b3ba6619fce81 = function(arg0) {
677
+ const ret = new Error(takeObject(arg0));
678
+ return addHeapObject(ret);
669
679
  };
670
680
 
671
681
  module.exports.__wbindgen_string_get = function(arg0, arg1) {
@@ -677,11 +687,6 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
677
687
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
678
688
  };
679
689
 
680
- module.exports.__wbg_constructor_bd5b3ba6619fce81 = function(arg0) {
681
- const ret = new Error(takeObject(arg0));
682
- return addHeapObject(ret);
683
- };
684
-
685
690
  module.exports.__wbindgen_cb_drop = function(arg0) {
686
691
  const obj = takeObject(arg0).original;
687
692
  if (obj.cnt-- == 1) {
@@ -702,11 +707,6 @@ module.exports.__wbindgen_number_new = function(arg0) {
702
707
  return addHeapObject(ret);
703
708
  };
704
709
 
705
- module.exports.__wbindgen_is_string = function(arg0) {
706
- const ret = typeof(getObject(arg0)) === 'string';
707
- return ret;
708
- };
709
-
710
710
  module.exports.__wbg_new_abda76e883ba8a5f = function() {
711
711
  const ret = new Error();
712
712
  return addHeapObject(ret);
@@ -1190,8 +1190,8 @@ module.exports.__wbindgen_function_table = function() {
1190
1190
  return addHeapObject(ret);
1191
1191
  };
1192
1192
 
1193
- module.exports.__wbindgen_closure_wrapper613 = function(arg0, arg1, arg2) {
1194
- const ret = makeMutClosure(arg0, arg1, 194, __wbg_adapter_54);
1193
+ module.exports.__wbindgen_closure_wrapper605 = function(arg0, arg1, arg2) {
1194
+ const ret = makeMutClosure(arg0, arg1, 193, __wbg_adapter_54);
1195
1195
  return addHeapObject(ret);
1196
1196
  };
1197
1197
 
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noir-lang/acvm_js",
3
- "version": "0.28.0-20a160c",
3
+ "version": "0.28.0-88682da",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/noir-lang/acvm.git"
package/web/acvm_js.d.ts CHANGED
@@ -161,16 +161,16 @@ export type BuildInfo = {
161
161
 
162
162
 
163
163
 
164
- export type LogLevel = "OFF" | "ERROR" | "WARN" | "INFO" | "DEBUG" | "TRACE";
165
-
166
-
167
-
168
164
  export type ExecutionError = Error & {
169
165
  callStack?: string[];
170
166
  };
171
167
 
172
168
 
173
169
 
170
+ export type LogLevel = "OFF" | "ERROR" | "WARN" | "INFO" | "DEBUG" | "TRACE";
171
+
172
+
173
+
174
174
  // Map from witness index to hex string value of witness.
175
175
  export type WitnessMap = Map<number, string>;
176
176
 
package/web/acvm_js.js CHANGED
@@ -1,27 +1,11 @@
1
1
  let wasm;
2
2
 
3
- const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
4
-
5
- if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
6
-
7
- let cachedUint8Memory0 = null;
8
-
9
- function getUint8Memory0() {
10
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
11
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
12
- }
13
- return cachedUint8Memory0;
14
- }
15
-
16
- function getStringFromWasm0(ptr, len) {
17
- ptr = ptr >>> 0;
18
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
19
- }
20
-
21
3
  const heap = new Array(128).fill(undefined);
22
4
 
23
5
  heap.push(undefined, null, true, false);
24
6
 
7
+ function getObject(idx) { return heap[idx]; }
8
+
25
9
  let heap_next = heap.length;
26
10
 
27
11
  function addHeapObject(obj) {
@@ -33,8 +17,6 @@ function addHeapObject(obj) {
33
17
  return idx;
34
18
  }
35
19
 
36
- function getObject(idx) { return heap[idx]; }
37
-
38
20
  function dropObject(idx) {
39
21
  if (idx < 132) return;
40
22
  heap[idx] = heap_next;
@@ -47,6 +29,24 @@ function takeObject(idx) {
47
29
  return ret;
48
30
  }
49
31
 
32
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
33
+
34
+ if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
35
+
36
+ let cachedUint8Memory0 = null;
37
+
38
+ function getUint8Memory0() {
39
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
40
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
41
+ }
42
+ return cachedUint8Memory0;
43
+ }
44
+
45
+ function getStringFromWasm0(ptr, len) {
46
+ ptr = ptr >>> 0;
47
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
48
+ }
49
+
50
50
  function isLikeNone(x) {
51
51
  return x === undefined || x === null;
52
52
  }
@@ -656,10 +656,6 @@ async function __wbg_load(module, imports) {
656
656
  function __wbg_get_imports() {
657
657
  const imports = {};
658
658
  imports.wbg = {};
659
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
660
- const ret = new Error(getStringFromWasm0(arg0, arg1));
661
- return addHeapObject(ret);
662
- };
663
659
  imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
664
660
  const ret = getObject(arg0);
665
661
  return addHeapObject(ret);
@@ -667,6 +663,18 @@ function __wbg_get_imports() {
667
663
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
668
664
  takeObject(arg0);
669
665
  };
666
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
667
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
668
+ return addHeapObject(ret);
669
+ };
670
+ imports.wbg.__wbindgen_is_string = function(arg0) {
671
+ const ret = typeof(getObject(arg0)) === 'string';
672
+ return ret;
673
+ };
674
+ imports.wbg.__wbindgen_is_array = function(arg0) {
675
+ const ret = Array.isArray(getObject(arg0));
676
+ return ret;
677
+ };
670
678
  imports.wbg.__wbg_wasmblackboxfunctionsolver_new = function(arg0) {
671
679
  const ret = WasmBlackBoxFunctionSolver.__wrap(arg0);
672
680
  return addHeapObject(ret);
@@ -685,9 +693,9 @@ function __wbg_get_imports() {
685
693
  getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
686
694
  getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
687
695
  };
688
- imports.wbg.__wbindgen_is_array = function(arg0) {
689
- const ret = Array.isArray(getObject(arg0));
690
- return ret;
696
+ imports.wbg.__wbg_constructor_bd5b3ba6619fce81 = function(arg0) {
697
+ const ret = new Error(takeObject(arg0));
698
+ return addHeapObject(ret);
691
699
  };
692
700
  imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
693
701
  const obj = getObject(arg1);
@@ -697,10 +705,6 @@ function __wbg_get_imports() {
697
705
  getInt32Memory0()[arg0 / 4 + 1] = len1;
698
706
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
699
707
  };
700
- imports.wbg.__wbg_constructor_bd5b3ba6619fce81 = function(arg0) {
701
- const ret = new Error(takeObject(arg0));
702
- return addHeapObject(ret);
703
- };
704
708
  imports.wbg.__wbindgen_cb_drop = function(arg0) {
705
709
  const obj = takeObject(arg0).original;
706
710
  if (obj.cnt-- == 1) {
@@ -718,10 +722,6 @@ function __wbg_get_imports() {
718
722
  const ret = arg0;
719
723
  return addHeapObject(ret);
720
724
  };
721
- imports.wbg.__wbindgen_is_string = function(arg0) {
722
- const ret = typeof(getObject(arg0)) === 'string';
723
- return ret;
724
- };
725
725
  imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
726
726
  const ret = new Error();
727
727
  return addHeapObject(ret);
@@ -1120,8 +1120,8 @@ function __wbg_get_imports() {
1120
1120
  const ret = wasm.__wbindgen_export_2;
1121
1121
  return addHeapObject(ret);
1122
1122
  };
1123
- imports.wbg.__wbindgen_closure_wrapper613 = function(arg0, arg1, arg2) {
1124
- const ret = makeMutClosure(arg0, arg1, 194, __wbg_adapter_54);
1123
+ imports.wbg.__wbindgen_closure_wrapper605 = function(arg0, arg1, arg2) {
1124
+ const ret = makeMutClosure(arg0, arg1, 193, __wbg_adapter_54);
1125
1125
  return addHeapObject(ret);
1126
1126
  };
1127
1127
 
Binary file