@noir-lang/acvm_js 0.38.0 → 0.39.0-2e32845.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 +44 -59
- package/nodejs/acvm_js.js +225 -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 +51 -66
- package/web/acvm_js.js +214 -176
- 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,44 +1,11 @@
|
|
|
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
4
|
* Sets the package's logging level.
|
|
38
5
|
*
|
|
39
6
|
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
40
7
|
*/
|
|
41
|
-
export function initLogLevel(
|
|
8
|
+
export function initLogLevel(filter: string): void;
|
|
42
9
|
/**
|
|
43
10
|
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
44
11
|
*
|
|
@@ -72,7 +39,6 @@ export function createBlackBoxSolver(): Promise<WasmBlackBoxFunctionSolver>;
|
|
|
72
39
|
*/
|
|
73
40
|
export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
|
|
74
41
|
/**
|
|
75
|
-
* Calculates the Blake2s256 hash of the input bytes and represents these as a single field element.
|
|
76
42
|
* Verifies a ECDSA signature over the secp256k1 curve.
|
|
77
43
|
* @param {Uint8Array} hashed_msg
|
|
78
44
|
* @param {Uint8Array} public_key_x_bytes
|
|
@@ -132,24 +98,39 @@ export function compressWitness(witness_map: WitnessMap): Uint8Array;
|
|
|
132
98
|
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
133
99
|
*/
|
|
134
100
|
export function buildInfo(): BuildInfo;
|
|
135
|
-
|
|
136
|
-
export type ForeignCallInput = string[]
|
|
137
|
-
export type ForeignCallOutput = string | string[]
|
|
138
|
-
|
|
139
101
|
/**
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* @param {
|
|
143
|
-
* @param {
|
|
144
|
-
* @returns {
|
|
102
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
|
|
103
|
+
*
|
|
104
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
105
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
106
|
+
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
|
|
107
|
+
* @param {Uint8Array} circuit
|
|
108
|
+
* @param {WitnessMap} solved_witness
|
|
109
|
+
* @returns {WitnessMap}
|
|
145
110
|
*/
|
|
146
|
-
export
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
111
|
+
export function getPublicWitness(circuit: Uint8Array, solved_witness: WitnessMap): WitnessMap;
|
|
112
|
+
/**
|
|
113
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
|
|
114
|
+
*
|
|
115
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
116
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
117
|
+
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
|
|
118
|
+
* @param {Uint8Array} circuit
|
|
119
|
+
* @param {WitnessMap} solved_witness
|
|
120
|
+
* @returns {WitnessMap}
|
|
121
|
+
*/
|
|
122
|
+
export function getPublicParametersWitness(circuit: Uint8Array, solved_witness: WitnessMap): WitnessMap;
|
|
123
|
+
/**
|
|
124
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
|
|
125
|
+
*
|
|
126
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
127
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
128
|
+
* @returns {WitnessMap} A witness map containing the circuit's return values.
|
|
129
|
+
* @param {Uint8Array} circuit
|
|
130
|
+
* @param {WitnessMap} witness_map
|
|
131
|
+
* @returns {WitnessMap}
|
|
132
|
+
*/
|
|
133
|
+
export function getReturnWitness(circuit: Uint8Array, witness_map: WitnessMap): WitnessMap;
|
|
153
134
|
|
|
154
135
|
// Map from witness index to hex string value of witness.
|
|
155
136
|
export type WitnessMap = Map<number, string>;
|
|
@@ -175,16 +156,20 @@ export type BuildInfo = {
|
|
|
175
156
|
}
|
|
176
157
|
|
|
177
158
|
|
|
159
|
+
|
|
160
|
+
export type ForeignCallInput = string[]
|
|
161
|
+
export type ForeignCallOutput = string | string[]
|
|
162
|
+
|
|
178
163
|
/**
|
|
179
|
-
* A
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
* @returns {Symbol}
|
|
164
|
+
* A callback which performs an foreign call and returns the response.
|
|
165
|
+
* @callback ForeignCallHandler
|
|
166
|
+
* @param {string} name - The identifier for the type of foreign call being performed.
|
|
167
|
+
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
|
|
168
|
+
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
|
|
185
169
|
*/
|
|
186
|
-
|
|
187
|
-
|
|
170
|
+
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
|
|
171
|
+
|
|
172
|
+
|
|
188
173
|
/**
|
|
189
174
|
*/
|
|
190
175
|
export class WasmBlackBoxFunctionSolver {
|