@noir-lang/noirc_abi 0.19.0 → 0.19.1
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.
|
@@ -19,10 +19,6 @@ export type WitnessMap = Map<number, string>;
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
export type ABIError = Error;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
22
|
export type Field = string | number | boolean;
|
|
27
23
|
export type InputValue = Field | Field[] | InputMap;
|
|
28
24
|
export type InputMap = { [key: string]: InputValue };
|
|
@@ -39,7 +35,7 @@ export type AbiType =
|
|
|
39
35
|
{ kind: "array", length: number, type: AbiType } |
|
|
40
36
|
{ kind: "tuple", fields: AbiType[] } |
|
|
41
37
|
{ kind: "struct", path: string, fields: [string, AbiType][] };
|
|
42
|
-
|
|
38
|
+
|
|
43
39
|
export type AbiParameter = {
|
|
44
40
|
name: string,
|
|
45
41
|
type: AbiType,
|
|
@@ -48,9 +44,13 @@ export type AbiParameter = {
|
|
|
48
44
|
|
|
49
45
|
export type Abi = {
|
|
50
46
|
parameters: AbiParameter[],
|
|
51
|
-
param_witnesses: Record<string, number[]>,
|
|
47
|
+
param_witnesses: Record<string, {start: number, end: number}[]>,
|
|
52
48
|
return_type: AbiType | null,
|
|
53
49
|
return_witnesses: number[],
|
|
54
50
|
}
|
|
55
51
|
|
|
56
52
|
|
|
53
|
+
|
|
54
|
+
export type ABIError = Error;
|
|
55
|
+
|
|
56
|
+
|
package/nodejs/noirc_abi_wasm.js
CHANGED
|
@@ -9,28 +9,6 @@ heap.push(undefined, null, true, false);
|
|
|
9
9
|
|
|
10
10
|
function getObject(idx) { return heap[idx]; }
|
|
11
11
|
|
|
12
|
-
function isLikeNone(x) {
|
|
13
|
-
return x === undefined || x === null;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
let cachedFloat64Memory0 = null;
|
|
17
|
-
|
|
18
|
-
function getFloat64Memory0() {
|
|
19
|
-
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
20
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
21
|
-
}
|
|
22
|
-
return cachedFloat64Memory0;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
let cachedInt32Memory0 = null;
|
|
26
|
-
|
|
27
|
-
function getInt32Memory0() {
|
|
28
|
-
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
29
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
30
|
-
}
|
|
31
|
-
return cachedInt32Memory0;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
12
|
let heap_next = heap.length;
|
|
35
13
|
|
|
36
14
|
function dropObject(idx) {
|
|
@@ -54,6 +32,28 @@ function addHeapObject(obj) {
|
|
|
54
32
|
return idx;
|
|
55
33
|
}
|
|
56
34
|
|
|
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;
|
|
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;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
57
|
let WASM_VECTOR_LEN = 0;
|
|
58
58
|
|
|
59
59
|
let cachedUint8Memory0 = null;
|
|
@@ -181,23 +181,16 @@ function handleError(f, args) {
|
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
module.exports.
|
|
185
|
-
const
|
|
186
|
-
|
|
187
|
-
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
188
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
184
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
185
|
+
const ret = getObject(arg0) === undefined;
|
|
186
|
+
return ret;
|
|
189
187
|
};
|
|
190
188
|
|
|
191
189
|
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
192
190
|
takeObject(arg0);
|
|
193
191
|
};
|
|
194
192
|
|
|
195
|
-
module.exports.
|
|
196
|
-
const ret = getObject(arg0) === undefined;
|
|
197
|
-
return ret;
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
module.exports.__wbg_new_7eda00598b2a27a7 = function() {
|
|
193
|
+
module.exports.__wbg_new_c332f1d5330752f2 = function() {
|
|
201
194
|
const ret = new Map();
|
|
202
195
|
return addHeapObject(ret);
|
|
203
196
|
};
|
|
@@ -207,6 +200,13 @@ module.exports.__wbindgen_number_new = function(arg0) {
|
|
|
207
200
|
return addHeapObject(ret);
|
|
208
201
|
};
|
|
209
202
|
|
|
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);
|
|
208
|
+
};
|
|
209
|
+
|
|
210
210
|
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
211
211
|
const obj = getObject(arg1);
|
|
212
212
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
@@ -216,7 +216,7 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
|
216
216
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
217
217
|
};
|
|
218
218
|
|
|
219
|
-
module.exports.
|
|
219
|
+
module.exports.__wbg_constructor_f9341ccd4a348724 = function(arg0) {
|
|
220
220
|
const ret = new Error(takeObject(arg0));
|
|
221
221
|
return addHeapObject(ret);
|
|
222
222
|
};
|
|
Binary file
|
package/package.json
CHANGED
package/web/noirc_abi_wasm.d.ts
CHANGED
|
@@ -19,10 +19,6 @@ export type WitnessMap = Map<number, string>;
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
export type ABIError = Error;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
22
|
export type Field = string | number | boolean;
|
|
27
23
|
export type InputValue = Field | Field[] | InputMap;
|
|
28
24
|
export type InputMap = { [key: string]: InputValue };
|
|
@@ -39,7 +35,7 @@ export type AbiType =
|
|
|
39
35
|
{ kind: "array", length: number, type: AbiType } |
|
|
40
36
|
{ kind: "tuple", fields: AbiType[] } |
|
|
41
37
|
{ kind: "struct", path: string, fields: [string, AbiType][] };
|
|
42
|
-
|
|
38
|
+
|
|
43
39
|
export type AbiParameter = {
|
|
44
40
|
name: string,
|
|
45
41
|
type: AbiType,
|
|
@@ -48,13 +44,17 @@ export type AbiParameter = {
|
|
|
48
44
|
|
|
49
45
|
export type Abi = {
|
|
50
46
|
parameters: AbiParameter[],
|
|
51
|
-
param_witnesses: Record<string, number[]>,
|
|
47
|
+
param_witnesses: Record<string, {start: number, end: number}[]>,
|
|
52
48
|
return_type: AbiType | null,
|
|
53
49
|
return_witnesses: number[],
|
|
54
50
|
}
|
|
55
51
|
|
|
56
52
|
|
|
57
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 {
|
package/web/noirc_abi_wasm.js
CHANGED
|
@@ -6,28 +6,6 @@ heap.push(undefined, null, true, false);
|
|
|
6
6
|
|
|
7
7
|
function getObject(idx) { return heap[idx]; }
|
|
8
8
|
|
|
9
|
-
function isLikeNone(x) {
|
|
10
|
-
return x === undefined || x === null;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
let cachedFloat64Memory0 = null;
|
|
14
|
-
|
|
15
|
-
function getFloat64Memory0() {
|
|
16
|
-
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
17
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
18
|
-
}
|
|
19
|
-
return cachedFloat64Memory0;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
let cachedInt32Memory0 = null;
|
|
23
|
-
|
|
24
|
-
function getInt32Memory0() {
|
|
25
|
-
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
26
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
27
|
-
}
|
|
28
|
-
return cachedInt32Memory0;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
9
|
let heap_next = heap.length;
|
|
32
10
|
|
|
33
11
|
function dropObject(idx) {
|
|
@@ -51,6 +29,28 @@ function addHeapObject(obj) {
|
|
|
51
29
|
return idx;
|
|
52
30
|
}
|
|
53
31
|
|
|
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;
|
|
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;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
54
|
let WASM_VECTOR_LEN = 0;
|
|
55
55
|
|
|
56
56
|
let cachedUint8Memory0 = null;
|
|
@@ -212,20 +212,14 @@ async function __wbg_load(module, imports) {
|
|
|
212
212
|
function __wbg_get_imports() {
|
|
213
213
|
const imports = {};
|
|
214
214
|
imports.wbg = {};
|
|
215
|
-
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
216
|
-
const obj = getObject(arg1);
|
|
217
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
218
|
-
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
219
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
220
|
-
};
|
|
221
|
-
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
222
|
-
takeObject(arg0);
|
|
223
|
-
};
|
|
224
215
|
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
225
216
|
const ret = getObject(arg0) === undefined;
|
|
226
217
|
return ret;
|
|
227
218
|
};
|
|
228
|
-
imports.wbg.
|
|
219
|
+
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
220
|
+
takeObject(arg0);
|
|
221
|
+
};
|
|
222
|
+
imports.wbg.__wbg_new_c332f1d5330752f2 = function() {
|
|
229
223
|
const ret = new Map();
|
|
230
224
|
return addHeapObject(ret);
|
|
231
225
|
};
|
|
@@ -233,6 +227,12 @@ function __wbg_get_imports() {
|
|
|
233
227
|
const ret = arg0;
|
|
234
228
|
return addHeapObject(ret);
|
|
235
229
|
};
|
|
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);
|
|
235
|
+
};
|
|
236
236
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
237
237
|
const obj = getObject(arg1);
|
|
238
238
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
@@ -241,7 +241,7 @@ function __wbg_get_imports() {
|
|
|
241
241
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
242
242
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
243
243
|
};
|
|
244
|
-
imports.wbg.
|
|
244
|
+
imports.wbg.__wbg_constructor_f9341ccd4a348724 = function(arg0) {
|
|
245
245
|
const ret = new Error(takeObject(arg0));
|
|
246
246
|
return addHeapObject(ret);
|
|
247
247
|
};
|
|
Binary file
|