@noir-lang/noirc_abi 0.18.0 → 0.19.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/nodejs/noirc_abi_wasm.d.ts +9 -9
- package/nodejs/noirc_abi_wasm.js +28 -28
- package/nodejs/noirc_abi_wasm_bg.wasm +0 -0
- package/nodejs/noirc_abi_wasm_bg.wasm.d.ts +1 -1
- package/package.json +1 -1
- package/web/noirc_abi_wasm.d.ts +10 -10
- package/web/noirc_abi_wasm.js +26 -26
- package/web/noirc_abi_wasm_bg.wasm +0 -0
- package/web/noirc_abi_wasm_bg.wasm.d.ts +1 -1
|
@@ -14,6 +14,15 @@ 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
|
+
// Map from witness index to hex string value of witness.
|
|
18
|
+
export type WitnessMap = Map<number, string>;
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export type ABIError = Error;
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
17
26
|
export type Field = string | number | boolean;
|
|
18
27
|
export type InputValue = Field | Field[] | InputMap;
|
|
19
28
|
export type InputMap = { [key: string]: InputValue };
|
|
@@ -45,12 +54,3 @@ export type Abi = {
|
|
|
45
54
|
}
|
|
46
55
|
|
|
47
56
|
|
|
48
|
-
|
|
49
|
-
// Map from witness index to hex string value of witness.
|
|
50
|
-
export type WitnessMap = Map<number, string>;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
export type ABIError = Error;
|
|
55
|
-
|
|
56
|
-
|
package/nodejs/noirc_abi_wasm.js
CHANGED
|
@@ -9,20 +9,6 @@ heap.push(undefined, null, true, false);
|
|
|
9
9
|
|
|
10
10
|
function getObject(idx) { return heap[idx]; }
|
|
11
11
|
|
|
12
|
-
let heap_next = heap.length;
|
|
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
12
|
function isLikeNone(x) {
|
|
27
13
|
return x === undefined || x === null;
|
|
28
14
|
}
|
|
@@ -45,6 +31,20 @@ function getInt32Memory0() {
|
|
|
45
31
|
return cachedInt32Memory0;
|
|
46
32
|
}
|
|
47
33
|
|
|
34
|
+
let heap_next = heap.length;
|
|
35
|
+
|
|
36
|
+
function dropObject(idx) {
|
|
37
|
+
if (idx < 132) return;
|
|
38
|
+
heap[idx] = heap_next;
|
|
39
|
+
heap_next = idx;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function takeObject(idx) {
|
|
43
|
+
const ret = getObject(idx);
|
|
44
|
+
dropObject(idx);
|
|
45
|
+
return ret;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
48
|
function addHeapObject(obj) {
|
|
49
49
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
50
50
|
const idx = heap_next;
|
|
@@ -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.
|
|
173
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__hb71d0e9d93bb5497(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
function handleError(f, args) {
|
|
@@ -181,15 +181,6 @@ 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_8b8d90c5b726c233 = function(arg0) {
|
|
189
|
-
const ret = new Error(takeObject(arg0));
|
|
190
|
-
return addHeapObject(ret);
|
|
191
|
-
};
|
|
192
|
-
|
|
193
184
|
module.exports.__wbindgen_number_get = function(arg0, arg1) {
|
|
194
185
|
const obj = getObject(arg1);
|
|
195
186
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
@@ -197,7 +188,16 @@ module.exports.__wbindgen_number_get = function(arg0, arg1) {
|
|
|
197
188
|
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
198
189
|
};
|
|
199
190
|
|
|
200
|
-
module.exports.
|
|
191
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
192
|
+
takeObject(arg0);
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
196
|
+
const ret = getObject(arg0) === undefined;
|
|
197
|
+
return ret;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
module.exports.__wbg_new_7eda00598b2a27a7 = function() {
|
|
201
201
|
const ret = new Map();
|
|
202
202
|
return addHeapObject(ret);
|
|
203
203
|
};
|
|
@@ -216,9 +216,9 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
|
216
216
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
217
217
|
};
|
|
218
218
|
|
|
219
|
-
module.exports.
|
|
220
|
-
const ret =
|
|
221
|
-
return ret;
|
|
219
|
+
module.exports.__wbg_constructor_ae68cc6e1c98bfd5 = function(arg0) {
|
|
220
|
+
const ret = new Error(takeObject(arg0));
|
|
221
|
+
return addHeapObject(ret);
|
|
222
222
|
};
|
|
223
223
|
|
|
224
224
|
module.exports.__wbg_new_abda76e883ba8a5f = function() {
|
|
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
|
|
10
|
+
export function wasm_bindgen__convert__closures__invoke2_mut__hb71d0e9d93bb5497(a: number, b: number, c: number, d: number): void;
|
|
11
11
|
export function __wbindgen_exn_store(a: number): void;
|
package/package.json
CHANGED
package/web/noirc_abi_wasm.d.ts
CHANGED
|
@@ -14,6 +14,15 @@ 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
|
+
// Map from witness index to hex string value of witness.
|
|
18
|
+
export type WitnessMap = Map<number, string>;
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export type ABIError = Error;
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
17
26
|
export type Field = string | number | boolean;
|
|
18
27
|
export type InputValue = Field | Field[] | InputMap;
|
|
19
28
|
export type InputMap = { [key: string]: InputValue };
|
|
@@ -46,15 +55,6 @@ export type Abi = {
|
|
|
46
55
|
|
|
47
56
|
|
|
48
57
|
|
|
49
|
-
// Map from witness index to hex string value of witness.
|
|
50
|
-
export type WitnessMap = Map<number, string>;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
export type ABIError = Error;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
58
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
59
59
|
|
|
60
60
|
export interface InitOutput {
|
|
@@ -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
|
|
68
|
+
readonly wasm_bindgen__convert__closures__invoke2_mut__hb71d0e9d93bb5497: (a: number, b: number, c: number, d: number) => void;
|
|
69
69
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
70
70
|
}
|
|
71
71
|
|
package/web/noirc_abi_wasm.js
CHANGED
|
@@ -6,20 +6,6 @@ heap.push(undefined, null, true, false);
|
|
|
6
6
|
|
|
7
7
|
function getObject(idx) { return heap[idx]; }
|
|
8
8
|
|
|
9
|
-
let heap_next = heap.length;
|
|
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
9
|
function isLikeNone(x) {
|
|
24
10
|
return x === undefined || x === null;
|
|
25
11
|
}
|
|
@@ -42,6 +28,20 @@ function getInt32Memory0() {
|
|
|
42
28
|
return cachedInt32Memory0;
|
|
43
29
|
}
|
|
44
30
|
|
|
31
|
+
let heap_next = heap.length;
|
|
32
|
+
|
|
33
|
+
function dropObject(idx) {
|
|
34
|
+
if (idx < 132) return;
|
|
35
|
+
heap[idx] = heap_next;
|
|
36
|
+
heap_next = idx;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function takeObject(idx) {
|
|
40
|
+
const ret = getObject(idx);
|
|
41
|
+
dropObject(idx);
|
|
42
|
+
return ret;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
45
|
function addHeapObject(obj) {
|
|
46
46
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
47
47
|
const idx = heap_next;
|
|
@@ -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.
|
|
170
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__hb71d0e9d93bb5497(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
function handleError(f, args) {
|
|
@@ -212,20 +212,20 @@ 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_8b8d90c5b726c233 = function(arg0) {
|
|
219
|
-
const ret = new Error(takeObject(arg0));
|
|
220
|
-
return addHeapObject(ret);
|
|
221
|
-
};
|
|
222
215
|
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
223
216
|
const obj = getObject(arg1);
|
|
224
217
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
225
218
|
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
226
219
|
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
227
220
|
};
|
|
228
|
-
imports.wbg.
|
|
221
|
+
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
222
|
+
takeObject(arg0);
|
|
223
|
+
};
|
|
224
|
+
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
225
|
+
const ret = getObject(arg0) === undefined;
|
|
226
|
+
return ret;
|
|
227
|
+
};
|
|
228
|
+
imports.wbg.__wbg_new_7eda00598b2a27a7 = function() {
|
|
229
229
|
const ret = new Map();
|
|
230
230
|
return addHeapObject(ret);
|
|
231
231
|
};
|
|
@@ -241,9 +241,9 @@ function __wbg_get_imports() {
|
|
|
241
241
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
242
242
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
243
243
|
};
|
|
244
|
-
imports.wbg.
|
|
245
|
-
const ret =
|
|
246
|
-
return ret;
|
|
244
|
+
imports.wbg.__wbg_constructor_ae68cc6e1c98bfd5 = function(arg0) {
|
|
245
|
+
const ret = new Error(takeObject(arg0));
|
|
246
|
+
return addHeapObject(ret);
|
|
247
247
|
};
|
|
248
248
|
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
|
249
249
|
const ret = new Error();
|
|
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
|
|
10
|
+
export function wasm_bindgen__convert__closures__invoke2_mut__hb71d0e9d93bb5497(a: number, b: number, c: number, d: number): void;
|
|
11
11
|
export function __wbindgen_exn_store(a: number): void;
|