@noir-lang/noirc_abi 0.10.3 → 0.13.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.
package/README.md CHANGED
@@ -15,6 +15,3 @@ If you are within the noir repo and would like to build local changes, you can u
15
15
  ```bash
16
16
  nix build -L #abi_wasm
17
17
  ```
18
-
19
- ## Tracking
20
- Built from [noir-lang/noir@8e93a5f4ccbcdb4fcd0f662d31ba4dd548aeae10](https://github.com/noir-lang/noir/tree/8e93a5f4ccbcdb4fcd0f662d31ba4dd548aeae10)
@@ -18,13 +18,3 @@ export function abiDecode(abi: any, witness_map: WitnessMap): any;
18
18
  export type WitnessMap = Map<number, string>;
19
19
 
20
20
 
21
- /**
22
- * A struct representing a Trap
23
- */
24
- export class Trap {
25
- free(): void;
26
- /**
27
- * @returns {Symbol}
28
- */
29
- static __wbgd_downcast_token(): Symbol;
30
- }
@@ -169,6 +169,10 @@ module.exports.abiDecode = function(abi, witness_map) {
169
169
  }
170
170
  };
171
171
 
172
+ function __wbg_adapter_26(arg0, arg1, arg2, arg3) {
173
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h345d08f7c40b28d9(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
174
+ }
175
+
172
176
  function handleError(f, args) {
173
177
  try {
174
178
  return f.apply(this, args);
@@ -176,35 +180,6 @@ function handleError(f, args) {
176
180
  wasm.__wbindgen_exn_store(addHeapObject(e));
177
181
  }
178
182
  }
179
- function __wbg_adapter_32(arg0, arg1, arg2, arg3) {
180
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h111bd9fa85682cff(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
181
- }
182
-
183
- /**
184
- * A struct representing a Trap
185
- */
186
- class Trap {
187
-
188
- __destroy_into_raw() {
189
- const ptr = this.__wbg_ptr;
190
- this.__wbg_ptr = 0;
191
-
192
- return ptr;
193
- }
194
-
195
- free() {
196
- const ptr = this.__destroy_into_raw();
197
- wasm.__wbg_trap_free(ptr);
198
- }
199
- /**
200
- * @returns {Symbol}
201
- */
202
- static __wbgd_downcast_token() {
203
- const ret = wasm.trap___wbgd_downcast_token();
204
- return takeObject(ret);
205
- }
206
- }
207
- module.exports.Trap = Trap;
208
183
 
209
184
  module.exports.__wbindgen_number_get = function(arg0, arg1) {
210
185
  const obj = getObject(arg1);
@@ -232,7 +207,7 @@ module.exports.__wbindgen_is_null = function(arg0) {
232
207
  return ret;
233
208
  };
234
209
 
235
- module.exports.__wbg_new_08bf5b2e92fba7de = function() {
210
+ module.exports.__wbg_new_b3b0a89b9ad0bb3a = function() {
236
211
  const ret = new Map();
237
212
  return addHeapObject(ret);
238
213
  };
@@ -276,16 +251,6 @@ module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
276
251
  }
277
252
  };
278
253
 
279
- module.exports.__wbg_call_557a2f2deacc4912 = function() { return handleError(function (arg0, arg1) {
280
- const ret = getObject(arg0).call(getObject(arg1));
281
- return addHeapObject(ret);
282
- }, arguments) };
283
-
284
- module.exports.__wbindgen_object_clone_ref = function(arg0) {
285
- const ret = getObject(arg0);
286
- return addHeapObject(ret);
287
- };
288
-
289
254
  module.exports.__wbg_forEach_942772130a8d06a6 = function(arg0, arg1, arg2) {
290
255
  try {
291
256
  var state0 = {a: arg1, b: arg2};
@@ -293,7 +258,7 @@ module.exports.__wbg_forEach_942772130a8d06a6 = function(arg0, arg1, arg2) {
293
258
  const a = state0.a;
294
259
  state0.a = 0;
295
260
  try {
296
- return __wbg_adapter_32(a, state0.b, arg0, arg1);
261
+ return __wbg_adapter_26(a, state0.b, arg0, arg1);
297
262
  } finally {
298
263
  state0.a = a;
299
264
  }
@@ -323,16 +288,6 @@ module.exports.__wbindgen_throw = function(arg0, arg1) {
323
288
  throw new Error(getStringFromWasm0(arg0, arg1));
324
289
  };
325
290
 
326
- module.exports.__wbg_static_accessor_SYMBOL_45d4d15e3c4aeb33 = function() {
327
- const ret = Symbol;
328
- return addHeapObject(ret);
329
- };
330
-
331
- module.exports.__wbindgen_is_symbol = function(arg0) {
332
- const ret = typeof(getObject(arg0)) === 'symbol';
333
- return ret;
334
- };
335
-
336
291
  const path = require('path').join(__dirname, 'noirc_abi_wasm_bg.wasm');
337
292
  const bytes = require('fs').readFileSync(path);
338
293
 
Binary file
@@ -3,11 +3,9 @@
3
3
  export const memory: WebAssembly.Memory;
4
4
  export function abiEncode(a: number, b: number, c: number, d: number): void;
5
5
  export function abiDecode(a: number, b: number, c: number): void;
6
- export function __wbg_trap_free(a: number): void;
7
- export function trap___wbgd_downcast_token(): number;
8
6
  export function __wbindgen_malloc(a: number): number;
9
7
  export function __wbindgen_realloc(a: number, b: number, c: number): number;
10
8
  export function __wbindgen_add_to_stack_pointer(a: number): number;
11
9
  export function __wbindgen_free(a: number, b: number): void;
10
+ export function wasm_bindgen__convert__closures__invoke2_mut__h345d08f7c40b28d9(a: number, b: number, c: number, d: number): void;
12
11
  export function __wbindgen_exn_store(a: number): void;
13
- export function wasm_bindgen__convert__closures__invoke2_mut__h111bd9fa85682cff(a: number, b: number, c: number, d: number): void;
package/package.json CHANGED
@@ -3,7 +3,8 @@
3
3
  "collaborators": [
4
4
  "The Noir Team <team@noir-lang.org>"
5
5
  ],
6
- "version": "0.10.3",
6
+ "version": "0.13.0",
7
+ "license": "(MIT OR Apache-2.0)",
7
8
  "files": [
8
9
  "nodejs",
9
10
  "web",
@@ -20,25 +21,19 @@
20
21
  "type": "git",
21
22
  "url": "https://github.com/noir-lang/noir.git"
22
23
  },
23
- "packageManager": "yarn@3.5.1",
24
24
  "scripts": {
25
+ "build": "bash ./build.sh",
25
26
  "test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha",
26
27
  "test:browser": "web-test-runner",
27
28
  "lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0"
28
29
  },
29
30
  "devDependencies": {
30
31
  "@esm-bundle/chai": "^4.3.4-fix.0",
31
- "@typescript-eslint/eslint-plugin": "^5.59.5",
32
- "@typescript-eslint/parser": "^5.59.5",
33
32
  "@web/dev-server-esbuild": "^0.3.6",
34
33
  "@web/test-runner": "^0.15.3",
35
34
  "@web/test-runner-playwright": "^0.10.0",
36
- "chai": "^4.3.7",
35
+ "@web/test-runner-webdriver": "^0.7.0",
37
36
  "eslint": "^8.40.0",
38
- "eslint-plugin-prettier": "^4.2.1",
39
- "mocha": "^10.2.0",
40
- "prettier": "^2.8.8",
41
- "ts-node": "^10.9.1",
42
- "typescript": "^5.0.4"
37
+ "mocha": "^10.2.0"
43
38
  }
44
39
  }
@@ -18,16 +18,6 @@ export function abiDecode(abi: any, witness_map: WitnessMap): any;
18
18
  export type WitnessMap = Map<number, string>;
19
19
 
20
20
 
21
- /**
22
- * A struct representing a Trap
23
- */
24
- export class Trap {
25
- free(): void;
26
- /**
27
- * @returns {Symbol}
28
- */
29
- static __wbgd_downcast_token(): Symbol;
30
- }
31
21
 
32
22
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
33
23
 
@@ -35,14 +25,12 @@ export interface InitOutput {
35
25
  readonly memory: WebAssembly.Memory;
36
26
  readonly abiEncode: (a: number, b: number, c: number, d: number) => void;
37
27
  readonly abiDecode: (a: number, b: number, c: number) => void;
38
- readonly __wbg_trap_free: (a: number) => void;
39
- readonly trap___wbgd_downcast_token: () => number;
40
28
  readonly __wbindgen_malloc: (a: number) => number;
41
29
  readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
42
30
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
43
31
  readonly __wbindgen_free: (a: number, b: number) => void;
32
+ readonly wasm_bindgen__convert__closures__invoke2_mut__h345d08f7c40b28d9: (a: number, b: number, c: number, d: number) => void;
44
33
  readonly __wbindgen_exn_store: (a: number) => void;
45
- readonly wasm_bindgen__convert__closures__invoke2_mut__h111bd9fa85682cff: (a: number, b: number, c: number, d: number) => void;
46
34
  }
47
35
 
48
36
  export type SyncInitInput = BufferSource | WebAssembly.Module;
@@ -166,6 +166,10 @@ export function abiDecode(abi, witness_map) {
166
166
  }
167
167
  }
168
168
 
169
+ function __wbg_adapter_26(arg0, arg1, arg2, arg3) {
170
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h345d08f7c40b28d9(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
171
+ }
172
+
169
173
  function handleError(f, args) {
170
174
  try {
171
175
  return f.apply(this, args);
@@ -173,34 +177,6 @@ function handleError(f, args) {
173
177
  wasm.__wbindgen_exn_store(addHeapObject(e));
174
178
  }
175
179
  }
176
- function __wbg_adapter_32(arg0, arg1, arg2, arg3) {
177
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h111bd9fa85682cff(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
178
- }
179
-
180
- /**
181
- * A struct representing a Trap
182
- */
183
- export class Trap {
184
-
185
- __destroy_into_raw() {
186
- const ptr = this.__wbg_ptr;
187
- this.__wbg_ptr = 0;
188
-
189
- return ptr;
190
- }
191
-
192
- free() {
193
- const ptr = this.__destroy_into_raw();
194
- wasm.__wbg_trap_free(ptr);
195
- }
196
- /**
197
- * @returns {Symbol}
198
- */
199
- static __wbgd_downcast_token() {
200
- const ret = wasm.trap___wbgd_downcast_token();
201
- return takeObject(ret);
202
- }
203
- }
204
180
 
205
181
  async function __wbg_load(module, imports) {
206
182
  if (typeof Response === 'function' && module instanceof Response) {
@@ -257,7 +233,7 @@ function __wbg_get_imports() {
257
233
  const ret = getObject(arg0) === null;
258
234
  return ret;
259
235
  };
260
- imports.wbg.__wbg_new_08bf5b2e92fba7de = function() {
236
+ imports.wbg.__wbg_new_b3b0a89b9ad0bb3a = function() {
261
237
  const ret = new Map();
262
238
  return addHeapObject(ret);
263
239
  };
@@ -295,14 +271,6 @@ function __wbg_get_imports() {
295
271
  wasm.__wbindgen_free(deferred0_0, deferred0_1);
296
272
  }
297
273
  };
298
- imports.wbg.__wbg_call_557a2f2deacc4912 = function() { return handleError(function (arg0, arg1) {
299
- const ret = getObject(arg0).call(getObject(arg1));
300
- return addHeapObject(ret);
301
- }, arguments) };
302
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
303
- const ret = getObject(arg0);
304
- return addHeapObject(ret);
305
- };
306
274
  imports.wbg.__wbg_forEach_942772130a8d06a6 = function(arg0, arg1, arg2) {
307
275
  try {
308
276
  var state0 = {a: arg1, b: arg2};
@@ -310,7 +278,7 @@ function __wbg_get_imports() {
310
278
  const a = state0.a;
311
279
  state0.a = 0;
312
280
  try {
313
- return __wbg_adapter_32(a, state0.b, arg0, arg1);
281
+ return __wbg_adapter_26(a, state0.b, arg0, arg1);
314
282
  } finally {
315
283
  state0.a = a;
316
284
  }
@@ -335,14 +303,6 @@ function __wbg_get_imports() {
335
303
  imports.wbg.__wbindgen_throw = function(arg0, arg1) {
336
304
  throw new Error(getStringFromWasm0(arg0, arg1));
337
305
  };
338
- imports.wbg.__wbg_static_accessor_SYMBOL_45d4d15e3c4aeb33 = function() {
339
- const ret = Symbol;
340
- return addHeapObject(ret);
341
- };
342
- imports.wbg.__wbindgen_is_symbol = function(arg0) {
343
- const ret = typeof(getObject(arg0)) === 'symbol';
344
- return ret;
345
- };
346
306
 
347
307
  return imports;
348
308
  }
Binary file
@@ -3,11 +3,9 @@
3
3
  export const memory: WebAssembly.Memory;
4
4
  export function abiEncode(a: number, b: number, c: number, d: number): void;
5
5
  export function abiDecode(a: number, b: number, c: number): void;
6
- export function __wbg_trap_free(a: number): void;
7
- export function trap___wbgd_downcast_token(): number;
8
6
  export function __wbindgen_malloc(a: number): number;
9
7
  export function __wbindgen_realloc(a: number, b: number, c: number): number;
10
8
  export function __wbindgen_add_to_stack_pointer(a: number): number;
11
9
  export function __wbindgen_free(a: number, b: number): void;
10
+ export function wasm_bindgen__convert__closures__invoke2_mut__h345d08f7c40b28d9(a: number, b: number, c: number, d: number): void;
12
11
  export function __wbindgen_exn_store(a: number): void;
13
- export function wasm_bindgen__convert__closures__invoke2_mut__h111bd9fa85682cff(a: number, b: number, c: number, d: number): void;