@noir-lang/acvm_js 0.37.1 → 0.38.0-179c90d.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.
@@ -1,10 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export function getPublicWitness(a: number, b: number, c: number, d: number): void;
5
- export function getPublicParametersWitness(a: number, b: number, c: number, d: number): void;
6
- export function getReturnWitness(a: number, b: number, c: number, d: number): void;
7
- export function initLogLevel(a: number): void;
8
4
  export function executeCircuitWithBlackBoxSolver(a: number, b: number, c: number, d: number, e: number): number;
9
5
  export function executeCircuit(a: number, b: number, c: number, d: number): number;
10
6
  export function createBlackBoxSolver(): number;
@@ -16,16 +12,20 @@ export function blake2s256(a: number, b: number, c: number): void;
16
12
  export function sha256(a: number, b: number, c: number): void;
17
13
  export function xor(a: number, b: number): number;
18
14
  export function and(a: number, b: number): number;
15
+ export function initLogLevel(a: number, b: number): void;
19
16
  export function decompressWitness(a: number, b: number, c: number): void;
20
17
  export function compressWitness(a: number, b: number): void;
21
18
  export function buildInfo(): number;
19
+ export function getPublicWitness(a: number, b: number, c: number, d: number): void;
20
+ export function getPublicParametersWitness(a: number, b: number, c: number, d: number): void;
21
+ export function getReturnWitness(a: number, b: number, c: number, d: number): void;
22
22
  export function __wbg_trap_free(a: number): void;
23
- export function trap___wbgd_downcast_token(): number;
23
+ export function trap___wbg_wasmer_trap(): void;
24
24
  export function __wbindgen_malloc(a: number): number;
25
25
  export function __wbindgen_realloc(a: number, b: number, c: number): number;
26
26
  export const __wbindgen_export_2: WebAssembly.Table;
27
- export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3d2354449e918783(a: number, b: number, c: number): void;
27
+ export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3da3e2c7f8a86974(a: number, b: number, c: number): void;
28
28
  export function __wbindgen_add_to_stack_pointer(a: number): number;
29
29
  export function __wbindgen_free(a: number, b: number): void;
30
30
  export function __wbindgen_exn_store(a: number): void;
31
- export function wasm_bindgen__convert__closures__invoke2_mut__ha676a05262f43687(a: number, b: number, c: number, d: number): void;
31
+ export function wasm_bindgen__convert__closures__invoke2_mut__h1d98448ca4fec2cc(a: number, b: number, c: number, d: number): void;
package/package.json CHANGED
@@ -1,16 +1,21 @@
1
1
  {
2
2
  "name": "@noir-lang/acvm_js",
3
- "version": "0.37.1",
4
- "repository": {
5
- "type": "git",
6
- "url": "https://github.com/noir-lang/acvm.git"
7
- },
3
+ "version": "0.38.0-179c90d.nightly",
8
4
  "publishConfig": {
9
5
  "access": "public"
10
6
  },
11
- "collaborators": [
7
+ "contributors": [
12
8
  "The Noir Team <team@noir-lang.org>"
13
9
  ],
10
+ "homepage": "https://noir-lang.org/",
11
+ "repository": {
12
+ "url": "https://github.com/noir-lang/noir.git",
13
+ "directory": "acvm_repo/acvm_js",
14
+ "type": "git"
15
+ },
16
+ "bugs": {
17
+ "url": "https://github.com/noir-lang/noir/issues"
18
+ },
14
19
  "license": "MIT",
15
20
  "main": "./nodejs/acvm_js.js",
16
21
  "types": "./web/acvm_js.d.ts",
package/web/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.
@@ -72,7 +33,6 @@ export function createBlackBoxSolver(): Promise<WasmBlackBoxFunctionSolver>;
72
33
  */
73
34
  export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
74
35
  /**
75
- * Calculates the Blake2s256 hash of the input bytes and represents these as a single field element.
76
36
  * Verifies a ECDSA signature over the secp256k1 curve.
77
37
  * @param {Uint8Array} hashed_msg
78
38
  * @param {Uint8Array} public_key_x_bytes
@@ -114,6 +74,12 @@ export function xor(lhs: string, rhs: string): string;
114
74
  */
115
75
  export function and(lhs: string, rhs: string): string;
116
76
  /**
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
+ /**
117
83
  * Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
118
84
  *
119
85
  * @param {Uint8Array} compressed_witness - A compressed witness.
@@ -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
- * A callback which performs an foreign call and returns the response.
141
- * @callback ForeignCallHandler
142
- * @param {string} name - The identifier for the type of foreign call being performed.
143
- * @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
144
- * @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
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 type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
147
-
148
-
149
-
150
- export type LogLevel = "OFF" | "ERROR" | "WARN" | "INFO" | "DEBUG" | "TRACE";
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 struct representing a Trap
180
- */
181
- export class Trap {
182
- free(): void;
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
- static __wbgd_downcast_token(): Symbol;
187
- }
170
+ export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
171
+
172
+
188
173
  /**
189
174
  */
190
175
  export class WasmBlackBoxFunctionSolver {
@@ -195,10 +180,6 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
195
180
 
196
181
  export interface InitOutput {
197
182
  readonly memory: WebAssembly.Memory;
198
- readonly getPublicWitness: (a: number, b: number, c: number, d: number) => void;
199
- readonly getPublicParametersWitness: (a: number, b: number, c: number, d: number) => void;
200
- readonly getReturnWitness: (a: number, b: number, c: number, d: number) => void;
201
- readonly initLogLevel: (a: number) => void;
202
183
  readonly executeCircuitWithBlackBoxSolver: (a: number, b: number, c: number, d: number, e: number) => number;
203
184
  readonly executeCircuit: (a: number, b: number, c: number, d: number) => number;
204
185
  readonly createBlackBoxSolver: () => number;
@@ -210,19 +191,23 @@ export interface InitOutput {
210
191
  readonly sha256: (a: number, b: number, c: number) => void;
211
192
  readonly xor: (a: number, b: number) => number;
212
193
  readonly and: (a: number, b: number) => number;
194
+ readonly initLogLevel: (a: number, b: number) => void;
213
195
  readonly decompressWitness: (a: number, b: number, c: number) => void;
214
196
  readonly compressWitness: (a: number, b: number) => void;
215
197
  readonly buildInfo: () => number;
198
+ readonly getPublicWitness: (a: number, b: number, c: number, d: number) => void;
199
+ readonly getPublicParametersWitness: (a: number, b: number, c: number, d: number) => void;
200
+ readonly getReturnWitness: (a: number, b: number, c: number, d: number) => void;
216
201
  readonly __wbg_trap_free: (a: number) => void;
217
- readonly trap___wbgd_downcast_token: () => number;
202
+ readonly trap___wbg_wasmer_trap: () => void;
218
203
  readonly __wbindgen_malloc: (a: number) => number;
219
204
  readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
220
205
  readonly __wbindgen_export_2: WebAssembly.Table;
221
- readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3d2354449e918783: (a: number, b: number, c: number) => void;
206
+ readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3da3e2c7f8a86974: (a: number, b: number, c: number) => void;
222
207
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
223
208
  readonly __wbindgen_free: (a: number, b: number) => void;
224
209
  readonly __wbindgen_exn_store: (a: number) => void;
225
- readonly wasm_bindgen__convert__closures__invoke2_mut__ha676a05262f43687: (a: number, b: number, c: number, d: number) => void;
210
+ readonly wasm_bindgen__convert__closures__invoke2_mut__h1d98448ca4fec2cc: (a: number, b: number, c: number, d: number) => void;
226
211
  }
227
212
 
228
213
  export type SyncInitInput = BufferSource | WebAssembly.Module;