@noir-lang/noirc_abi 0.21.0 → 0.22.0-2fcbef5.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.
@@ -20,7 +20,7 @@ export type WitnessMap = Map<number, string>;
20
20
 
21
21
 
22
22
  export type Field = string | number | boolean;
23
- export type InputValue = Field | Field[] | InputMap;
23
+ export type InputValue = Field | InputMap | (Field | InputMap)[];
24
24
  export type InputMap = { [key: string]: InputValue };
25
25
 
26
26
 
@@ -11,18 +11,6 @@ function getObject(idx) { return heap[idx]; }
11
11
 
12
12
  let heap_next = heap.length;
13
13
 
14
- function dropObject(idx) {
15
- if (idx < 132) return;
16
- heap[idx] = heap_next;
17
- heap_next = idx;
18
- }
19
-
20
- function takeObject(idx) {
21
- const ret = getObject(idx);
22
- dropObject(idx);
23
- return ret;
24
- }
25
-
26
14
  function addHeapObject(obj) {
27
15
  if (heap_next === heap.length) heap.push(heap.length + 1);
28
16
  const idx = heap_next;
@@ -32,26 +20,16 @@ function addHeapObject(obj) {
32
20
  return idx;
33
21
  }
34
22
 
35
- function isLikeNone(x) {
36
- return x === undefined || x === null;
37
- }
38
-
39
- let cachedFloat64Memory0 = null;
40
-
41
- function getFloat64Memory0() {
42
- if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
43
- cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
44
- }
45
- return cachedFloat64Memory0;
23
+ function dropObject(idx) {
24
+ if (idx < 132) return;
25
+ heap[idx] = heap_next;
26
+ heap_next = idx;
46
27
  }
47
28
 
48
- let cachedInt32Memory0 = null;
49
-
50
- function getInt32Memory0() {
51
- if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
52
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
53
- }
54
- return cachedInt32Memory0;
29
+ function takeObject(idx) {
30
+ const ret = getObject(idx);
31
+ dropObject(idx);
32
+ return ret;
55
33
  }
56
34
 
57
35
  let WASM_VECTOR_LEN = 0;
@@ -118,6 +96,28 @@ function passStringToWasm0(arg, malloc, realloc) {
118
96
  return ptr;
119
97
  }
120
98
 
99
+ function isLikeNone(x) {
100
+ return x === undefined || x === null;
101
+ }
102
+
103
+ let cachedInt32Memory0 = null;
104
+
105
+ function getInt32Memory0() {
106
+ if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
107
+ cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
108
+ }
109
+ return cachedInt32Memory0;
110
+ }
111
+
112
+ let cachedFloat64Memory0 = null;
113
+
114
+ function getFloat64Memory0() {
115
+ if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
116
+ cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
117
+ }
118
+ return cachedFloat64Memory0;
119
+ }
120
+
121
121
  let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
122
122
 
123
123
  cachedTextDecoder.decode();
@@ -170,7 +170,7 @@ module.exports.abiDecode = function(abi, witness_map) {
170
170
  };
171
171
 
172
172
  function __wbg_adapter_26(arg0, arg1, arg2, arg3) {
173
- wasm.wasm_bindgen__convert__closures__invoke2_mut__hb71d0e9d93bb5497(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
173
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h69ff64e8ca67251e(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
174
174
  }
175
175
 
176
176
  function handleError(f, args) {
@@ -186,11 +186,7 @@ module.exports.__wbindgen_is_undefined = function(arg0) {
186
186
  return ret;
187
187
  };
188
188
 
189
- module.exports.__wbindgen_object_drop_ref = function(arg0) {
190
- takeObject(arg0);
191
- };
192
-
193
- module.exports.__wbg_new_298583d03ed045c7 = function() {
189
+ module.exports.__wbg_new_6f90e9d9f07c8970 = function() {
194
190
  const ret = new Map();
195
191
  return addHeapObject(ret);
196
192
  };
@@ -200,11 +196,8 @@ module.exports.__wbindgen_number_new = function(arg0) {
200
196
  return addHeapObject(ret);
201
197
  };
202
198
 
203
- module.exports.__wbindgen_number_get = function(arg0, arg1) {
204
- const obj = getObject(arg1);
205
- const ret = typeof(obj) === 'number' ? obj : undefined;
206
- getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
207
- getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
199
+ module.exports.__wbindgen_object_drop_ref = function(arg0) {
200
+ takeObject(arg0);
208
201
  };
209
202
 
210
203
  module.exports.__wbindgen_string_get = function(arg0, arg1) {
@@ -216,7 +209,14 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
216
209
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
217
210
  };
218
211
 
219
- module.exports.__wbg_constructor_9aef944c7c744f2d = function(arg0) {
212
+ module.exports.__wbindgen_number_get = function(arg0, arg1) {
213
+ const obj = getObject(arg1);
214
+ const ret = typeof(obj) === 'number' ? obj : undefined;
215
+ getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
216
+ getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
217
+ };
218
+
219
+ module.exports.__wbg_constructor_e3f475b984203436 = function(arg0) {
220
220
  const ret = new Error(takeObject(arg0));
221
221
  return addHeapObject(ret);
222
222
  };
Binary file
@@ -7,5 +7,5 @@ export function __wbindgen_malloc(a: number): number;
7
7
  export function __wbindgen_realloc(a: number, b: number, c: number): number;
8
8
  export function __wbindgen_add_to_stack_pointer(a: number): number;
9
9
  export function __wbindgen_free(a: number, b: number): void;
10
- export function wasm_bindgen__convert__closures__invoke2_mut__hb71d0e9d93bb5497(a: number, b: number, c: number, d: number): void;
10
+ export function wasm_bindgen__convert__closures__invoke2_mut__h69ff64e8ca67251e(a: number, b: number, c: number, d: number): void;
11
11
  export function __wbindgen_exn_store(a: number): void;
package/package.json CHANGED
@@ -1,10 +1,19 @@
1
1
  {
2
2
  "name": "@noir-lang/noirc_abi",
3
- "collaborators": [
3
+ "contributors": [
4
4
  "The Noir Team <team@noir-lang.org>"
5
5
  ],
6
- "version": "0.21.0",
6
+ "version": "0.22.0-2fcbef5.nightly",
7
7
  "license": "(MIT OR Apache-2.0)",
8
+ "homepage": "https://noir-lang.org/",
9
+ "repository": {
10
+ "url": "https://github.com/noir-lang/noir.git",
11
+ "directory": "tooling/noirc_abi_wasm",
12
+ "type": "git"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/noir-lang/noir/issues"
16
+ },
8
17
  "files": [
9
18
  "nodejs",
10
19
  "web",
@@ -17,10 +26,6 @@
17
26
  "types": "./web/noirc_abi_wasm.d.ts",
18
27
  "module": "./web/noirc_abi_wasm.js",
19
28
  "sideEffects": false,
20
- "repository": {
21
- "type": "git",
22
- "url": "https://github.com/noir-lang/noir.git"
23
- },
24
29
  "scripts": {
25
30
  "build": "bash ./build.sh",
26
31
  "test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha",
@@ -20,7 +20,7 @@ export type WitnessMap = Map<number, string>;
20
20
 
21
21
 
22
22
  export type Field = string | number | boolean;
23
- export type InputValue = Field | Field[] | InputMap;
23
+ export type InputValue = Field | InputMap | (Field | InputMap)[];
24
24
  export type InputMap = { [key: string]: InputValue };
25
25
 
26
26
 
@@ -65,7 +65,7 @@ export interface InitOutput {
65
65
  readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
66
66
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
67
67
  readonly __wbindgen_free: (a: number, b: number) => void;
68
- readonly wasm_bindgen__convert__closures__invoke2_mut__hb71d0e9d93bb5497: (a: number, b: number, c: number, d: number) => void;
68
+ readonly wasm_bindgen__convert__closures__invoke2_mut__h69ff64e8ca67251e: (a: number, b: number, c: number, d: number) => void;
69
69
  readonly __wbindgen_exn_store: (a: number) => void;
70
70
  }
71
71
 
@@ -8,18 +8,6 @@ function getObject(idx) { return heap[idx]; }
8
8
 
9
9
  let heap_next = heap.length;
10
10
 
11
- function dropObject(idx) {
12
- if (idx < 132) return;
13
- heap[idx] = heap_next;
14
- heap_next = idx;
15
- }
16
-
17
- function takeObject(idx) {
18
- const ret = getObject(idx);
19
- dropObject(idx);
20
- return ret;
21
- }
22
-
23
11
  function addHeapObject(obj) {
24
12
  if (heap_next === heap.length) heap.push(heap.length + 1);
25
13
  const idx = heap_next;
@@ -29,26 +17,16 @@ function addHeapObject(obj) {
29
17
  return idx;
30
18
  }
31
19
 
32
- function isLikeNone(x) {
33
- return x === undefined || x === null;
34
- }
35
-
36
- let cachedFloat64Memory0 = null;
37
-
38
- function getFloat64Memory0() {
39
- if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
40
- cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
41
- }
42
- return cachedFloat64Memory0;
20
+ function dropObject(idx) {
21
+ if (idx < 132) return;
22
+ heap[idx] = heap_next;
23
+ heap_next = idx;
43
24
  }
44
25
 
45
- let cachedInt32Memory0 = null;
46
-
47
- function getInt32Memory0() {
48
- if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
49
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
50
- }
51
- return cachedInt32Memory0;
26
+ function takeObject(idx) {
27
+ const ret = getObject(idx);
28
+ dropObject(idx);
29
+ return ret;
52
30
  }
53
31
 
54
32
  let WASM_VECTOR_LEN = 0;
@@ -115,6 +93,28 @@ function passStringToWasm0(arg, malloc, realloc) {
115
93
  return ptr;
116
94
  }
117
95
 
96
+ function isLikeNone(x) {
97
+ return x === undefined || x === null;
98
+ }
99
+
100
+ let cachedInt32Memory0 = null;
101
+
102
+ function getInt32Memory0() {
103
+ if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
104
+ cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
105
+ }
106
+ return cachedInt32Memory0;
107
+ }
108
+
109
+ let cachedFloat64Memory0 = null;
110
+
111
+ function getFloat64Memory0() {
112
+ if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
113
+ cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
114
+ }
115
+ return cachedFloat64Memory0;
116
+ }
117
+
118
118
  const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
119
119
 
120
120
  if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
@@ -167,7 +167,7 @@ export function abiDecode(abi, witness_map) {
167
167
  }
168
168
 
169
169
  function __wbg_adapter_26(arg0, arg1, arg2, arg3) {
170
- wasm.wasm_bindgen__convert__closures__invoke2_mut__hb71d0e9d93bb5497(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
170
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h69ff64e8ca67251e(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
171
171
  }
172
172
 
173
173
  function handleError(f, args) {
@@ -216,10 +216,7 @@ function __wbg_get_imports() {
216
216
  const ret = getObject(arg0) === undefined;
217
217
  return ret;
218
218
  };
219
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
220
- takeObject(arg0);
221
- };
222
- imports.wbg.__wbg_new_298583d03ed045c7 = function() {
219
+ imports.wbg.__wbg_new_6f90e9d9f07c8970 = function() {
223
220
  const ret = new Map();
224
221
  return addHeapObject(ret);
225
222
  };
@@ -227,11 +224,8 @@ function __wbg_get_imports() {
227
224
  const ret = arg0;
228
225
  return addHeapObject(ret);
229
226
  };
230
- imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
231
- const obj = getObject(arg1);
232
- const ret = typeof(obj) === 'number' ? obj : undefined;
233
- getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
234
- getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
227
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
228
+ takeObject(arg0);
235
229
  };
236
230
  imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
237
231
  const obj = getObject(arg1);
@@ -241,7 +235,13 @@ function __wbg_get_imports() {
241
235
  getInt32Memory0()[arg0 / 4 + 1] = len1;
242
236
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
243
237
  };
244
- imports.wbg.__wbg_constructor_9aef944c7c744f2d = function(arg0) {
238
+ imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
239
+ const obj = getObject(arg1);
240
+ const ret = typeof(obj) === 'number' ? obj : undefined;
241
+ getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
242
+ getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
243
+ };
244
+ imports.wbg.__wbg_constructor_e3f475b984203436 = function(arg0) {
245
245
  const ret = new Error(takeObject(arg0));
246
246
  return addHeapObject(ret);
247
247
  };
Binary file
@@ -7,5 +7,5 @@ export function __wbindgen_malloc(a: number): number;
7
7
  export function __wbindgen_realloc(a: number, b: number, c: number): number;
8
8
  export function __wbindgen_add_to_stack_pointer(a: number): number;
9
9
  export function __wbindgen_free(a: number, b: number): void;
10
- export function wasm_bindgen__convert__closures__invoke2_mut__hb71d0e9d93bb5497(a: number, b: number, c: number, d: number): void;
10
+ export function wasm_bindgen__convert__closures__invoke2_mut__h69ff64e8ca67251e(a: number, b: number, c: number, d: number): void;
11
11
  export function __wbindgen_exn_store(a: number): void;