@noir-lang/noirc_abi 0.24.0 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,11 +14,11 @@ export function abiEncode(abi: Abi, inputs: InputMap, return_value?: InputValue)
14
14
  */
15
15
  export function abiDecode(abi: Abi, witness_map: WitnessMap): any;
16
16
 
17
- export type ABIError = Error;
17
+ import { Field, InputValue, InputMap, Visibility, Sign, AbiType, AbiParameter, Abi, WitnessMap } from "@noir-lang/types";
18
+ export { Field, InputValue, InputMap, Visibility, Sign, AbiType, AbiParameter, Abi, WitnessMap } from "@noir-lang/types";
18
19
 
19
20
 
20
21
 
21
- import { Field, InputValue, InputMap, Visibility, Sign, AbiType, AbiParameter, Abi, WitnessMap } from "@noir-lang/types";
22
- export { Field, InputValue, InputMap, Visibility, Sign, AbiType, AbiParameter, Abi, WitnessMap } from "@noir-lang/types";
22
+ export type ABIError = Error;
23
23
 
24
24
 
@@ -11,6 +11,18 @@ 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
+
14
26
  function addHeapObject(obj) {
15
27
  if (heap_next === heap.length) heap.push(heap.length + 1);
16
28
  const idx = heap_next;
@@ -20,16 +32,26 @@ function addHeapObject(obj) {
20
32
  return idx;
21
33
  }
22
34
 
23
- function dropObject(idx) {
24
- if (idx < 132) return;
25
- heap[idx] = heap_next;
26
- heap_next = idx;
35
+ function isLikeNone(x) {
36
+ return x === undefined || x === null;
27
37
  }
28
38
 
29
- function takeObject(idx) {
30
- const ret = getObject(idx);
31
- dropObject(idx);
32
- return ret;
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;
46
+ }
47
+
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;
33
55
  }
34
56
 
35
57
  let WASM_VECTOR_LEN = 0;
@@ -96,28 +118,6 @@ function passStringToWasm0(arg, malloc, realloc) {
96
118
  return ptr;
97
119
  }
98
120
 
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__hd198c74ecdd99d4a(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
173
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h6cdb28bf0237c46b(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
174
174
  }
175
175
 
176
176
  function handleError(f, args) {
@@ -181,12 +181,21 @@ function handleError(f, args) {
181
181
  }
182
182
  }
183
183
 
184
+ module.exports.__wbindgen_object_drop_ref = function(arg0) {
185
+ takeObject(arg0);
186
+ };
187
+
188
+ module.exports.__wbg_constructor_7d94cf626cdc28fa = function(arg0) {
189
+ const ret = new Error(takeObject(arg0));
190
+ return addHeapObject(ret);
191
+ };
192
+
184
193
  module.exports.__wbindgen_is_undefined = function(arg0) {
185
194
  const ret = getObject(arg0) === undefined;
186
195
  return ret;
187
196
  };
188
197
 
189
- module.exports.__wbg_new_b4c89ae60c90e212 = function() {
198
+ module.exports.__wbg_new_e55b0a538ee459d9 = function() {
190
199
  const ret = new Map();
191
200
  return addHeapObject(ret);
192
201
  };
@@ -196,8 +205,11 @@ module.exports.__wbindgen_number_new = function(arg0) {
196
205
  return addHeapObject(ret);
197
206
  };
198
207
 
199
- module.exports.__wbindgen_object_drop_ref = function(arg0) {
200
- takeObject(arg0);
208
+ module.exports.__wbindgen_number_get = function(arg0, arg1) {
209
+ const obj = getObject(arg1);
210
+ const ret = typeof(obj) === 'number' ? obj : undefined;
211
+ getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
212
+ getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
201
213
  };
202
214
 
203
215
  module.exports.__wbindgen_string_get = function(arg0, arg1) {
@@ -209,18 +221,6 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
209
221
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
210
222
  };
211
223
 
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_9ceb886f76658f41 = function(arg0) {
220
- const ret = new Error(takeObject(arg0));
221
- return addHeapObject(ret);
222
- };
223
-
224
224
  module.exports.__wbg_new_abda76e883ba8a5f = function() {
225
225
  const ret = new Error();
226
226
  return addHeapObject(ret);
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__hd198c74ecdd99d4a(a: number, b: number, c: number, d: number): void;
10
+ export function wasm_bindgen__convert__closures__invoke2_mut__h6cdb28bf0237c46b(a: number, b: number, c: number, d: number): void;
11
11
  export function __wbindgen_exn_store(a: number): void;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "contributors": [
4
4
  "The Noir Team <team@noir-lang.org>"
5
5
  ],
6
- "version": "0.24.0",
6
+ "version": "0.25.0",
7
7
  "license": "(MIT OR Apache-2.0)",
8
8
  "homepage": "https://noir-lang.org/",
9
9
  "repository": {
@@ -38,7 +38,7 @@
38
38
  "install:from:nix": "yarn clean && yarn build:nix && cp -rL ./result/noirc_abi_wasm/nodejs ./ && cp -rL ./result/noirc_abi_wasm/web ./"
39
39
  },
40
40
  "dependencies": {
41
- "@noir-lang/types": "0.24.0"
41
+ "@noir-lang/types": "0.25.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@esm-bundle/chai": "^4.3.4-fix.0",
@@ -14,12 +14,12 @@ export function abiEncode(abi: Abi, inputs: InputMap, return_value?: InputValue)
14
14
  */
15
15
  export function abiDecode(abi: Abi, witness_map: WitnessMap): any;
16
16
 
17
- export type ABIError = Error;
17
+ import { Field, InputValue, InputMap, Visibility, Sign, AbiType, AbiParameter, Abi, WitnessMap } from "@noir-lang/types";
18
+ export { Field, InputValue, InputMap, Visibility, Sign, AbiType, AbiParameter, Abi, WitnessMap } from "@noir-lang/types";
18
19
 
19
20
 
20
21
 
21
- import { Field, InputValue, InputMap, Visibility, Sign, AbiType, AbiParameter, Abi, WitnessMap } from "@noir-lang/types";
22
- export { Field, InputValue, InputMap, Visibility, Sign, AbiType, AbiParameter, Abi, WitnessMap } from "@noir-lang/types";
22
+ export type ABIError = Error;
23
23
 
24
24
 
25
25
 
@@ -33,7 +33,7 @@ export interface InitOutput {
33
33
  readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
34
34
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
35
35
  readonly __wbindgen_free: (a: number, b: number) => void;
36
- readonly wasm_bindgen__convert__closures__invoke2_mut__hd198c74ecdd99d4a: (a: number, b: number, c: number, d: number) => void;
36
+ readonly wasm_bindgen__convert__closures__invoke2_mut__h6cdb28bf0237c46b: (a: number, b: number, c: number, d: number) => void;
37
37
  readonly __wbindgen_exn_store: (a: number) => void;
38
38
  }
39
39
 
@@ -8,6 +8,18 @@ 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
+
11
23
  function addHeapObject(obj) {
12
24
  if (heap_next === heap.length) heap.push(heap.length + 1);
13
25
  const idx = heap_next;
@@ -17,16 +29,26 @@ function addHeapObject(obj) {
17
29
  return idx;
18
30
  }
19
31
 
20
- function dropObject(idx) {
21
- if (idx < 132) return;
22
- heap[idx] = heap_next;
23
- heap_next = idx;
32
+ function isLikeNone(x) {
33
+ return x === undefined || x === null;
24
34
  }
25
35
 
26
- function takeObject(idx) {
27
- const ret = getObject(idx);
28
- dropObject(idx);
29
- return ret;
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;
43
+ }
44
+
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;
30
52
  }
31
53
 
32
54
  let WASM_VECTOR_LEN = 0;
@@ -93,28 +115,6 @@ function passStringToWasm0(arg, malloc, realloc) {
93
115
  return ptr;
94
116
  }
95
117
 
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__hd198c74ecdd99d4a(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
170
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h6cdb28bf0237c46b(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
171
171
  }
172
172
 
173
173
  function handleError(f, args) {
@@ -212,11 +212,18 @@ async function __wbg_load(module, imports) {
212
212
  function __wbg_get_imports() {
213
213
  const imports = {};
214
214
  imports.wbg = {};
215
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
216
+ takeObject(arg0);
217
+ };
218
+ imports.wbg.__wbg_constructor_7d94cf626cdc28fa = function(arg0) {
219
+ const ret = new Error(takeObject(arg0));
220
+ return addHeapObject(ret);
221
+ };
215
222
  imports.wbg.__wbindgen_is_undefined = function(arg0) {
216
223
  const ret = getObject(arg0) === undefined;
217
224
  return ret;
218
225
  };
219
- imports.wbg.__wbg_new_b4c89ae60c90e212 = function() {
226
+ imports.wbg.__wbg_new_e55b0a538ee459d9 = function() {
220
227
  const ret = new Map();
221
228
  return addHeapObject(ret);
222
229
  };
@@ -224,8 +231,11 @@ function __wbg_get_imports() {
224
231
  const ret = arg0;
225
232
  return addHeapObject(ret);
226
233
  };
227
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
228
- takeObject(arg0);
234
+ imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
235
+ const obj = getObject(arg1);
236
+ const ret = typeof(obj) === 'number' ? obj : undefined;
237
+ getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
238
+ getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
229
239
  };
230
240
  imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
231
241
  const obj = getObject(arg1);
@@ -235,16 +245,6 @@ function __wbg_get_imports() {
235
245
  getInt32Memory0()[arg0 / 4 + 1] = len1;
236
246
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
237
247
  };
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_9ceb886f76658f41 = function(arg0) {
245
- const ret = new Error(takeObject(arg0));
246
- return addHeapObject(ret);
247
- };
248
248
  imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
249
249
  const ret = new Error();
250
250
  return addHeapObject(ret);
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__hd198c74ecdd99d4a(a: number, b: number, c: number, d: number): void;
10
+ export function wasm_bindgen__convert__closures__invoke2_mut__h6cdb28bf0237c46b(a: number, b: number, c: number, d: number): void;
11
11
  export function __wbindgen_exn_store(a: number): void;