@noir-lang/acvm_js 0.39.0 → 0.40.0-46f2204.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 +59 -59
- package/nodejs/acvm_js.js +211 -202
- package/nodejs/acvm_js_bg.wasm +0 -0
- package/nodejs/acvm_js_bg.wasm.d.ts +10 -10
- package/package.json +2 -2
- package/web/acvm_js.d.ts +69 -69
- package/web/acvm_js.js +204 -195
- package/web/acvm_js_bg.wasm +0 -0
- package/web/acvm_js_bg.wasm.d.ts +10 -10
package/nodejs/acvm_js.d.ts
CHANGED
|
@@ -1,28 +1,10 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
|
|
7
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
8
|
-
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
9
|
-
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
10
|
-
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
11
|
-
*/
|
|
12
|
-
export function executeCircuitWithBlackBoxSolver(solver: WasmBlackBoxFunctionSolver, circuit: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
|
|
13
|
-
/**
|
|
14
|
-
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
15
|
-
*
|
|
16
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
17
|
-
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
18
|
-
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
19
|
-
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
20
|
-
*/
|
|
21
|
-
export function executeCircuit(circuit: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
|
|
22
|
-
/**
|
|
23
|
-
* @returns {Promise<WasmBlackBoxFunctionSolver>}
|
|
4
|
+
* Returns the `BuildInfo` object containing information about how the installed package was built.
|
|
5
|
+
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
24
6
|
*/
|
|
25
|
-
export function
|
|
7
|
+
export function buildInfo(): BuildInfo;
|
|
26
8
|
/**
|
|
27
9
|
* Verifies a ECDSA signature over the secp256r1 curve.
|
|
28
10
|
* @param {Uint8Array} hashed_msg
|
|
@@ -74,31 +56,6 @@ export function xor(lhs: string, rhs: string): string;
|
|
|
74
56
|
*/
|
|
75
57
|
export function and(lhs: string, rhs: string): string;
|
|
76
58
|
/**
|
|
77
|
-
* Sets the package's logging level.
|
|
78
|
-
*
|
|
79
|
-
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
80
|
-
*/
|
|
81
|
-
export function initLogLevel(filter: string): void;
|
|
82
|
-
/**
|
|
83
|
-
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
|
|
84
|
-
*
|
|
85
|
-
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
86
|
-
* @returns {WitnessMap} The decompressed witness map.
|
|
87
|
-
*/
|
|
88
|
-
export function decompressWitness(compressed_witness: Uint8Array): WitnessMap;
|
|
89
|
-
/**
|
|
90
|
-
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
91
|
-
*
|
|
92
|
-
* @param {Uint8Array} compressed_witness - A witness map.
|
|
93
|
-
* @returns {WitnessMap} A compressed witness map
|
|
94
|
-
*/
|
|
95
|
-
export function compressWitness(witness_map: WitnessMap): Uint8Array;
|
|
96
|
-
/**
|
|
97
|
-
* Returns the `BuildInfo` object containing information about how the installed package was built.
|
|
98
|
-
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
99
|
-
*/
|
|
100
|
-
export function buildInfo(): BuildInfo;
|
|
101
|
-
/**
|
|
102
59
|
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
|
|
103
60
|
*
|
|
104
61
|
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
@@ -131,9 +88,61 @@ export function getPublicParametersWitness(circuit: Uint8Array, solved_witness:
|
|
|
131
88
|
* @returns {WitnessMap}
|
|
132
89
|
*/
|
|
133
90
|
export function getReturnWitness(circuit: Uint8Array, witness_map: WitnessMap): WitnessMap;
|
|
91
|
+
/**
|
|
92
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
93
|
+
*
|
|
94
|
+
* @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
|
|
95
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
96
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
97
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
98
|
+
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
99
|
+
*/
|
|
100
|
+
export function executeCircuitWithBlackBoxSolver(solver: WasmBlackBoxFunctionSolver, circuit: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
|
|
101
|
+
/**
|
|
102
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
103
|
+
*
|
|
104
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
105
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
106
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
107
|
+
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
108
|
+
*/
|
|
109
|
+
export function executeCircuit(circuit: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
|
|
110
|
+
/**
|
|
111
|
+
* @returns {Promise<WasmBlackBoxFunctionSolver>}
|
|
112
|
+
*/
|
|
113
|
+
export function createBlackBoxSolver(): Promise<WasmBlackBoxFunctionSolver>;
|
|
114
|
+
/**
|
|
115
|
+
* Sets the package's logging level.
|
|
116
|
+
*
|
|
117
|
+
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
118
|
+
*/
|
|
119
|
+
export function initLogLevel(filter: string): void;
|
|
120
|
+
/**
|
|
121
|
+
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
|
|
122
|
+
*
|
|
123
|
+
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
124
|
+
* @returns {WitnessMap} The decompressed witness map.
|
|
125
|
+
*/
|
|
126
|
+
export function decompressWitness(compressed_witness: Uint8Array): WitnessMap;
|
|
127
|
+
/**
|
|
128
|
+
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
129
|
+
*
|
|
130
|
+
* @param {Uint8Array} compressed_witness - A witness map.
|
|
131
|
+
* @returns {WitnessMap} A compressed witness map
|
|
132
|
+
*/
|
|
133
|
+
export function compressWitness(witness_map: WitnessMap): Uint8Array;
|
|
134
134
|
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
/**
|
|
136
|
+
* @typedef {Object} BuildInfo - Information about how the installed package was built
|
|
137
|
+
* @property {string} gitHash - The hash of the git commit from which the package was built.
|
|
138
|
+
* @property {string} version - The version of the package at the built git commit.
|
|
139
|
+
* @property {boolean} dirty - Whether the package contained uncommitted changes when built.
|
|
140
|
+
*/
|
|
141
|
+
export type BuildInfo = {
|
|
142
|
+
gitHash: string;
|
|
143
|
+
version: string;
|
|
144
|
+
dirty: string;
|
|
145
|
+
}
|
|
137
146
|
|
|
138
147
|
|
|
139
148
|
|
|
@@ -157,17 +166,8 @@ export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => P
|
|
|
157
166
|
|
|
158
167
|
|
|
159
168
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
* @property {string} gitHash - The hash of the git commit from which the package was built.
|
|
163
|
-
* @property {string} version - The version of the package at the built git commit.
|
|
164
|
-
* @property {boolean} dirty - Whether the package contained uncommitted changes when built.
|
|
165
|
-
*/
|
|
166
|
-
export type BuildInfo = {
|
|
167
|
-
gitHash: string;
|
|
168
|
-
version: string;
|
|
169
|
-
dirty: string;
|
|
170
|
-
}
|
|
169
|
+
// Map from witness index to hex string value of witness.
|
|
170
|
+
export type WitnessMap = Map<number, string>;
|
|
171
171
|
|
|
172
172
|
|
|
173
173
|
/**
|