@noir-lang/noirc_abi 0.37.0 → 0.38.0-aa37cd5.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.
- package/nodejs/noirc_abi_wasm.d.ts +3 -3
- package/nodejs/noirc_abi_wasm.js +33 -33
- package/nodejs/noirc_abi_wasm_bg.wasm +0 -0
- package/nodejs/noirc_abi_wasm_bg.wasm.d.ts +1 -1
- package/package.json +2 -2
- package/web/noirc_abi_wasm.d.ts +4 -4
- package/web/noirc_abi_wasm.js +32 -32
- package/web/noirc_abi_wasm_bg.wasm +0 -0
- package/web/noirc_abi_wasm_bg.wasm.d.ts +1 -1
|
@@ -25,11 +25,11 @@ export function serializeWitness(witness_map: WitnessMap): Uint8Array;
|
|
|
25
25
|
*/
|
|
26
26
|
export function abiDecodeError(abi: Abi, raw_error: RawAssertionPayload): any;
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
import { Field, InputValue, InputMap, Visibility, Sign, AbiType, AbiParameter, Abi, WitnessMap, RawAssertionPayload } from "@noir-lang/types";
|
|
29
|
+
export { Field, InputValue, InputMap, Visibility, Sign, AbiType, AbiParameter, Abi, WitnessMap, RawAssertionPayload } from "@noir-lang/types";
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
export { Field, InputValue, InputMap, Visibility, Sign, AbiType, AbiParameter, Abi, WitnessMap, RawAssertionPayload } from "@noir-lang/types";
|
|
33
|
+
export type ABIError = Error;
|
|
34
34
|
|
|
35
35
|
|
package/nodejs/noirc_abi_wasm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
let imports = {};
|
|
2
2
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
3
3
|
let wasm;
|
|
4
|
-
const {
|
|
4
|
+
const { TextDecoder, TextEncoder } = require(`util`);
|
|
5
5
|
|
|
6
6
|
const heap = new Array(128).fill(undefined);
|
|
7
7
|
|
|
@@ -45,7 +45,9 @@ function takeObject(idx) {
|
|
|
45
45
|
return ret;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
let
|
|
48
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
49
|
+
|
|
50
|
+
cachedTextDecoder.decode();
|
|
49
51
|
|
|
50
52
|
let cachedUint8Memory0 = null;
|
|
51
53
|
|
|
@@ -56,6 +58,22 @@ function getUint8Memory0() {
|
|
|
56
58
|
return cachedUint8Memory0;
|
|
57
59
|
}
|
|
58
60
|
|
|
61
|
+
function getStringFromWasm0(ptr, len) {
|
|
62
|
+
ptr = ptr >>> 0;
|
|
63
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function addHeapObject(obj) {
|
|
67
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
68
|
+
const idx = heap_next;
|
|
69
|
+
heap_next = heap[idx];
|
|
70
|
+
|
|
71
|
+
heap[idx] = obj;
|
|
72
|
+
return idx;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
let WASM_VECTOR_LEN = 0;
|
|
76
|
+
|
|
59
77
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
60
78
|
|
|
61
79
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -108,24 +126,6 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
108
126
|
WASM_VECTOR_LEN = offset;
|
|
109
127
|
return ptr;
|
|
110
128
|
}
|
|
111
|
-
|
|
112
|
-
function addHeapObject(obj) {
|
|
113
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
114
|
-
const idx = heap_next;
|
|
115
|
-
heap_next = heap[idx];
|
|
116
|
-
|
|
117
|
-
heap[idx] = obj;
|
|
118
|
-
return idx;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
122
|
-
|
|
123
|
-
cachedTextDecoder.decode();
|
|
124
|
-
|
|
125
|
-
function getStringFromWasm0(ptr, len) {
|
|
126
|
-
ptr = ptr >>> 0;
|
|
127
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
128
|
-
}
|
|
129
129
|
/**
|
|
130
130
|
* @param {Abi} abi
|
|
131
131
|
* @param {InputMap} inputs
|
|
@@ -218,7 +218,7 @@ module.exports.abiDecodeError = function(abi, raw_error) {
|
|
|
218
218
|
};
|
|
219
219
|
|
|
220
220
|
function __wbg_adapter_28(arg0, arg1, arg2, arg3) {
|
|
221
|
-
wasm.
|
|
221
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__hcab054e50f9de782(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
function handleError(f, args) {
|
|
@@ -240,21 +240,17 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
|
240
240
|
takeObject(arg0);
|
|
241
241
|
};
|
|
242
242
|
|
|
243
|
-
module.exports.
|
|
243
|
+
module.exports.__wbg_constructor_11f6668362419067 = function(arg0) {
|
|
244
244
|
const ret = new Error(takeObject(arg0));
|
|
245
245
|
return addHeapObject(ret);
|
|
246
246
|
};
|
|
247
247
|
|
|
248
|
-
module.exports.
|
|
249
|
-
const
|
|
250
|
-
|
|
251
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
252
|
-
var len1 = WASM_VECTOR_LEN;
|
|
253
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
254
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
248
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
249
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
250
|
+
return addHeapObject(ret);
|
|
255
251
|
};
|
|
256
252
|
|
|
257
|
-
module.exports.
|
|
253
|
+
module.exports.__wbg_new_f38811e0454e36b1 = function() {
|
|
258
254
|
const ret = new Map();
|
|
259
255
|
return addHeapObject(ret);
|
|
260
256
|
};
|
|
@@ -264,9 +260,13 @@ module.exports.__wbindgen_number_new = function(arg0) {
|
|
|
264
260
|
return addHeapObject(ret);
|
|
265
261
|
};
|
|
266
262
|
|
|
267
|
-
module.exports.
|
|
268
|
-
const
|
|
269
|
-
|
|
263
|
+
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
264
|
+
const obj = getObject(arg1);
|
|
265
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
266
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
267
|
+
var len1 = WASM_VECTOR_LEN;
|
|
268
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
269
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
270
270
|
};
|
|
271
271
|
|
|
272
272
|
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
Binary file
|
|
@@ -9,5 +9,5 @@ export function __wbindgen_malloc(a: number): number;
|
|
|
9
9
|
export function __wbindgen_realloc(a: number, b: number, c: number): number;
|
|
10
10
|
export function __wbindgen_add_to_stack_pointer(a: number): number;
|
|
11
11
|
export function __wbindgen_free(a: number, b: number): void;
|
|
12
|
-
export function
|
|
12
|
+
export function wasm_bindgen__convert__closures__invoke2_mut__hcab054e50f9de782(a: number, b: number, c: number, d: number): void;
|
|
13
13
|
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.
|
|
6
|
+
"version": "0.38.0-aa37cd5.nightly",
|
|
7
7
|
"license": "(MIT OR Apache-2.0)",
|
|
8
8
|
"homepage": "https://noir-lang.org/",
|
|
9
9
|
"repository": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@noir-lang/types": "0.
|
|
39
|
+
"@noir-lang/types": "0.38.0-aa37cd5.nightly"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@esm-bundle/chai": "^4.3.4-fix.0",
|
package/web/noirc_abi_wasm.d.ts
CHANGED
|
@@ -25,12 +25,12 @@ export function serializeWitness(witness_map: WitnessMap): Uint8Array;
|
|
|
25
25
|
*/
|
|
26
26
|
export function abiDecodeError(abi: Abi, raw_error: RawAssertionPayload): any;
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
import { Field, InputValue, InputMap, Visibility, Sign, AbiType, AbiParameter, Abi, WitnessMap, RawAssertionPayload } from "@noir-lang/types";
|
|
29
|
+
export { Field, InputValue, InputMap, Visibility, Sign, AbiType, AbiParameter, Abi, WitnessMap, RawAssertionPayload } from "@noir-lang/types";
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
export { Field, InputValue, InputMap, Visibility, Sign, AbiType, AbiParameter, Abi, WitnessMap, RawAssertionPayload } from "@noir-lang/types";
|
|
33
|
+
export type ABIError = Error;
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
@@ -46,7 +46,7 @@ export interface InitOutput {
|
|
|
46
46
|
readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
|
|
47
47
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
48
48
|
readonly __wbindgen_free: (a: number, b: number) => void;
|
|
49
|
-
readonly
|
|
49
|
+
readonly wasm_bindgen__convert__closures__invoke2_mut__hcab054e50f9de782: (a: number, b: number, c: number, d: number) => void;
|
|
50
50
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
51
51
|
}
|
|
52
52
|
|
package/web/noirc_abi_wasm.js
CHANGED
|
@@ -42,7 +42,9 @@ function takeObject(idx) {
|
|
|
42
42
|
return ret;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
46
|
+
|
|
47
|
+
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
46
48
|
|
|
47
49
|
let cachedUint8Memory0 = null;
|
|
48
50
|
|
|
@@ -53,6 +55,22 @@ function getUint8Memory0() {
|
|
|
53
55
|
return cachedUint8Memory0;
|
|
54
56
|
}
|
|
55
57
|
|
|
58
|
+
function getStringFromWasm0(ptr, len) {
|
|
59
|
+
ptr = ptr >>> 0;
|
|
60
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function addHeapObject(obj) {
|
|
64
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
65
|
+
const idx = heap_next;
|
|
66
|
+
heap_next = heap[idx];
|
|
67
|
+
|
|
68
|
+
heap[idx] = obj;
|
|
69
|
+
return idx;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
let WASM_VECTOR_LEN = 0;
|
|
73
|
+
|
|
56
74
|
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
57
75
|
|
|
58
76
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -105,24 +123,6 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
105
123
|
WASM_VECTOR_LEN = offset;
|
|
106
124
|
return ptr;
|
|
107
125
|
}
|
|
108
|
-
|
|
109
|
-
function addHeapObject(obj) {
|
|
110
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
111
|
-
const idx = heap_next;
|
|
112
|
-
heap_next = heap[idx];
|
|
113
|
-
|
|
114
|
-
heap[idx] = obj;
|
|
115
|
-
return idx;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
119
|
-
|
|
120
|
-
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
121
|
-
|
|
122
|
-
function getStringFromWasm0(ptr, len) {
|
|
123
|
-
ptr = ptr >>> 0;
|
|
124
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
125
|
-
}
|
|
126
126
|
/**
|
|
127
127
|
* @param {Abi} abi
|
|
128
128
|
* @param {InputMap} inputs
|
|
@@ -215,7 +215,7 @@ export function abiDecodeError(abi, raw_error) {
|
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
function __wbg_adapter_28(arg0, arg1, arg2, arg3) {
|
|
218
|
-
wasm.
|
|
218
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__hcab054e50f9de782(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
function handleError(f, args) {
|
|
@@ -269,19 +269,15 @@ function __wbg_get_imports() {
|
|
|
269
269
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
270
270
|
takeObject(arg0);
|
|
271
271
|
};
|
|
272
|
-
imports.wbg.
|
|
272
|
+
imports.wbg.__wbg_constructor_11f6668362419067 = function(arg0) {
|
|
273
273
|
const ret = new Error(takeObject(arg0));
|
|
274
274
|
return addHeapObject(ret);
|
|
275
275
|
};
|
|
276
|
-
imports.wbg.
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
280
|
-
var len1 = WASM_VECTOR_LEN;
|
|
281
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
282
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
276
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
277
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
278
|
+
return addHeapObject(ret);
|
|
283
279
|
};
|
|
284
|
-
imports.wbg.
|
|
280
|
+
imports.wbg.__wbg_new_f38811e0454e36b1 = function() {
|
|
285
281
|
const ret = new Map();
|
|
286
282
|
return addHeapObject(ret);
|
|
287
283
|
};
|
|
@@ -289,9 +285,13 @@ function __wbg_get_imports() {
|
|
|
289
285
|
const ret = arg0;
|
|
290
286
|
return addHeapObject(ret);
|
|
291
287
|
};
|
|
292
|
-
imports.wbg.
|
|
293
|
-
const
|
|
294
|
-
|
|
288
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
289
|
+
const obj = getObject(arg1);
|
|
290
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
291
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
292
|
+
var len1 = WASM_VECTOR_LEN;
|
|
293
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
294
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
295
295
|
};
|
|
296
296
|
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
297
297
|
const ret = getObject(arg0) === undefined;
|
|
Binary file
|
|
@@ -9,5 +9,5 @@ export function __wbindgen_malloc(a: number): number;
|
|
|
9
9
|
export function __wbindgen_realloc(a: number, b: number, c: number): number;
|
|
10
10
|
export function __wbindgen_add_to_stack_pointer(a: number): number;
|
|
11
11
|
export function __wbindgen_free(a: number, b: number): void;
|
|
12
|
-
export function
|
|
12
|
+
export function wasm_bindgen__convert__closures__invoke2_mut__hcab054e50f9de782(a: number, b: number, c: number, d: number): void;
|
|
13
13
|
export function __wbindgen_exn_store(a: number): void;
|