@noir-lang/acvm_js 0.37.1 → 0.38.0-223e860.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/acvm_js.d.ts +50 -64
- package/nodejs/acvm_js.js +216 -183
- package/nodejs/acvm_js_bg.wasm +0 -0
- package/nodejs/acvm_js_bg.wasm.d.ts +7 -7
- package/package.json +11 -6
- package/web/acvm_js.d.ts +57 -71
- package/web/acvm_js.js +206 -177
- package/web/acvm_js_bg.wasm +0 -0
- package/web/acvm_js_bg.wasm.d.ts +7 -7
package/nodejs/acvm_js.d.ts
CHANGED
|
@@ -1,45 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
|
|
5
|
-
*
|
|
6
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
7
|
-
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
8
|
-
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
|
|
9
|
-
* @param {Uint8Array} circuit
|
|
10
|
-
* @param {WitnessMap} solved_witness
|
|
11
|
-
* @returns {WitnessMap}
|
|
12
|
-
*/
|
|
13
|
-
export function getPublicWitness(circuit: Uint8Array, solved_witness: WitnessMap): WitnessMap;
|
|
14
|
-
/**
|
|
15
|
-
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
|
|
16
|
-
*
|
|
17
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
18
|
-
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
19
|
-
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
|
|
20
|
-
* @param {Uint8Array} circuit
|
|
21
|
-
* @param {WitnessMap} solved_witness
|
|
22
|
-
* @returns {WitnessMap}
|
|
23
|
-
*/
|
|
24
|
-
export function getPublicParametersWitness(circuit: Uint8Array, solved_witness: WitnessMap): WitnessMap;
|
|
25
|
-
/**
|
|
26
|
-
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
|
|
27
|
-
*
|
|
28
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
29
|
-
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
30
|
-
* @returns {WitnessMap} A witness map containing the circuit's return values.
|
|
31
|
-
* @param {Uint8Array} circuit
|
|
32
|
-
* @param {WitnessMap} witness_map
|
|
33
|
-
* @returns {WitnessMap}
|
|
34
|
-
*/
|
|
35
|
-
export function getReturnWitness(circuit: Uint8Array, witness_map: WitnessMap): WitnessMap;
|
|
36
|
-
/**
|
|
37
|
-
* Sets the package's logging level.
|
|
38
|
-
*
|
|
39
|
-
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
40
|
-
*/
|
|
41
|
-
export function initLogLevel(level: LogLevel): void;
|
|
42
|
-
/**
|
|
43
4
|
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
44
5
|
*
|
|
45
6
|
* @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
|
|
@@ -114,6 +75,12 @@ export function xor(lhs: string, rhs: string): string;
|
|
|
114
75
|
*/
|
|
115
76
|
export function and(lhs: string, rhs: string): string;
|
|
116
77
|
/**
|
|
78
|
+
* Sets the package's logging level.
|
|
79
|
+
*
|
|
80
|
+
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
81
|
+
*/
|
|
82
|
+
export function initLogLevel(filter: string): void;
|
|
83
|
+
/**
|
|
117
84
|
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
|
|
118
85
|
*
|
|
119
86
|
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
@@ -132,6 +99,50 @@ export function compressWitness(witness_map: WitnessMap): Uint8Array;
|
|
|
132
99
|
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
133
100
|
*/
|
|
134
101
|
export function buildInfo(): BuildInfo;
|
|
102
|
+
/**
|
|
103
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
|
|
104
|
+
*
|
|
105
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
106
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
107
|
+
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
|
|
108
|
+
* @param {Uint8Array} circuit
|
|
109
|
+
* @param {WitnessMap} solved_witness
|
|
110
|
+
* @returns {WitnessMap}
|
|
111
|
+
*/
|
|
112
|
+
export function getPublicWitness(circuit: Uint8Array, solved_witness: WitnessMap): WitnessMap;
|
|
113
|
+
/**
|
|
114
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
|
|
115
|
+
*
|
|
116
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
117
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
118
|
+
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
|
|
119
|
+
* @param {Uint8Array} circuit
|
|
120
|
+
* @param {WitnessMap} solved_witness
|
|
121
|
+
* @returns {WitnessMap}
|
|
122
|
+
*/
|
|
123
|
+
export function getPublicParametersWitness(circuit: Uint8Array, solved_witness: WitnessMap): WitnessMap;
|
|
124
|
+
/**
|
|
125
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
|
|
126
|
+
*
|
|
127
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
128
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
129
|
+
* @returns {WitnessMap} A witness map containing the circuit's return values.
|
|
130
|
+
* @param {Uint8Array} circuit
|
|
131
|
+
* @param {WitnessMap} witness_map
|
|
132
|
+
* @returns {WitnessMap}
|
|
133
|
+
*/
|
|
134
|
+
export function getReturnWitness(circuit: Uint8Array, witness_map: WitnessMap): WitnessMap;
|
|
135
|
+
|
|
136
|
+
// Map from witness index to hex string value of witness.
|
|
137
|
+
export type WitnessMap = Map<number, string>;
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
export type ExecutionError = Error & {
|
|
142
|
+
callStack?: string[];
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
|
|
135
146
|
|
|
136
147
|
export type ForeignCallInput = string[]
|
|
137
148
|
export type ForeignCallOutput = string | string[]
|
|
@@ -147,21 +158,6 @@ export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => P
|
|
|
147
158
|
|
|
148
159
|
|
|
149
160
|
|
|
150
|
-
export type LogLevel = "OFF" | "ERROR" | "WARN" | "INFO" | "DEBUG" | "TRACE";
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
// Map from witness index to hex string value of witness.
|
|
155
|
-
export type WitnessMap = Map<number, string>;
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
export type ExecutionError = Error & {
|
|
160
|
-
callStack?: string[];
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
161
|
/**
|
|
166
162
|
* @typedef {Object} BuildInfo - Information about how the installed package was built
|
|
167
163
|
* @property {string} gitHash - The hash of the git commit from which the package was built.
|
|
@@ -175,16 +171,6 @@ export type BuildInfo = {
|
|
|
175
171
|
}
|
|
176
172
|
|
|
177
173
|
|
|
178
|
-
/**
|
|
179
|
-
* A struct representing a Trap
|
|
180
|
-
*/
|
|
181
|
-
export class Trap {
|
|
182
|
-
free(): void;
|
|
183
|
-
/**
|
|
184
|
-
* @returns {Symbol}
|
|
185
|
-
*/
|
|
186
|
-
static __wbgd_downcast_token(): Symbol;
|
|
187
|
-
}
|
|
188
174
|
/**
|
|
189
175
|
*/
|
|
190
176
|
export class WasmBlackBoxFunctionSolver {
|