@noir-lang/acvm_js 0.27.0 → 0.28.0-20a160c
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/CHANGELOG.md +150 -0
- package/nodejs/acvm_js.d.ts +60 -9
- package/nodejs/acvm_js.js +251 -123
- package/nodejs/acvm_js_bg.wasm +0 -0
- package/nodejs/acvm_js_bg.wasm.d.ts +13 -6
- package/package.json +26 -3
- package/web/acvm_js.d.ts +73 -15
- package/web/acvm_js.js +248 -120
- package/web/acvm_js_bg.wasm +0 -0
- package/web/acvm_js_bg.wasm.d.ts +13 -6
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.27.0](https://github.com/noir-lang/acvm/compare/acvm_js-v0.26.1...acvm_js-v0.27.0) (2023-09-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* Separate barretenberg solver from generic blackbox solver code ([#554](https://github.com/noir-lang/acvm/issues/554))
|
|
9
|
+
|
|
10
|
+
### Miscellaneous Chores
|
|
11
|
+
|
|
12
|
+
* Separate barretenberg solver from generic blackbox solver code ([#554](https://github.com/noir-lang/acvm/issues/554)) ([a4b9772](https://github.com/noir-lang/acvm/commit/a4b97722a0892fe379ff075e6080675adafdce0e))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Dependencies
|
|
16
|
+
|
|
17
|
+
* The following workspace dependencies were updated
|
|
18
|
+
* dependencies
|
|
19
|
+
* acvm bumped from 0.26.1 to 0.27.0
|
|
20
|
+
* barretenberg_blackbox_solver bumped from 0.26.1 to 0.27.0
|
|
21
|
+
|
|
22
|
+
## [0.26.1](https://github.com/noir-lang/acvm/compare/acvm_js-v0.26.0...acvm_js-v0.26.1) (2023-09-12)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* Implements handling of the high limb during fixed base scalar multiplication ([#535](https://github.com/noir-lang/acvm/issues/535)) ([551504a](https://github.com/noir-lang/acvm/commit/551504aa572d3f9d56b5576d25ce1211296ee488))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Dependencies
|
|
31
|
+
|
|
32
|
+
* The following workspace dependencies were updated
|
|
33
|
+
* dependencies
|
|
34
|
+
* acvm bumped from 0.26.0 to 0.26.1
|
|
35
|
+
|
|
36
|
+
## [0.26.0](https://github.com/noir-lang/acvm/compare/acvm_js-v0.25.0...acvm_js-v0.26.0) (2023-09-07)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### ⚠ BREAKING CHANGES
|
|
40
|
+
|
|
41
|
+
* Add a low and high limb to scalar mul opcode ([#532](https://github.com/noir-lang/acvm/issues/532))
|
|
42
|
+
|
|
43
|
+
### Miscellaneous Chores
|
|
44
|
+
|
|
45
|
+
* Add a low and high limb to scalar mul opcode ([#532](https://github.com/noir-lang/acvm/issues/532)) ([b054f66](https://github.com/noir-lang/acvm/commit/b054f66be9c73d4e02dbecdab80874a907f19242))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Dependencies
|
|
49
|
+
|
|
50
|
+
* The following workspace dependencies were updated
|
|
51
|
+
* dependencies
|
|
52
|
+
* acvm bumped from 0.25.0 to 0.26.0
|
|
53
|
+
|
|
54
|
+
## [0.25.0](https://github.com/noir-lang/acvm/compare/acvm_js-v0.24.1...acvm_js-v0.25.0) (2023-09-04)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### ⚠ BREAKING CHANGES
|
|
58
|
+
|
|
59
|
+
* Provide runtime callstacks for brillig failures and return errors in acvm_js ([#523](https://github.com/noir-lang/acvm/issues/523))
|
|
60
|
+
|
|
61
|
+
### Features
|
|
62
|
+
|
|
63
|
+
* Provide runtime callstacks for brillig failures and return errors in acvm_js ([#523](https://github.com/noir-lang/acvm/issues/523)) ([7ab7cff](https://github.com/noir-lang/acvm/commit/7ab7cff48a9aba61a97fad2a759fc8e55740b098))
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### Dependencies
|
|
67
|
+
|
|
68
|
+
* The following workspace dependencies were updated
|
|
69
|
+
* dependencies
|
|
70
|
+
* acvm bumped from 0.24.1 to 0.25.0
|
|
71
|
+
|
|
72
|
+
## [0.24.1](https://github.com/noir-lang/acvm/compare/acvm_js-v0.24.0...acvm_js-v0.24.1) (2023-09-03)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### Bug Fixes
|
|
76
|
+
|
|
77
|
+
* Add WASI 20 `_initialize` call to `acvm_backend.wasm` binary ([#518](https://github.com/noir-lang/acvm/issues/518)) ([ec6ab0c](https://github.com/noir-lang/acvm/commit/ec6ab0c6fb2753209abe1e03a449873e255ffd76))
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
### Dependencies
|
|
81
|
+
|
|
82
|
+
* The following workspace dependencies were updated
|
|
83
|
+
* dependencies
|
|
84
|
+
* acvm bumped from 0.24.0 to 0.24.1
|
|
85
|
+
|
|
86
|
+
## [0.24.0](https://github.com/noir-lang/acvm/compare/acvm_js-v0.23.0...acvm_js-v0.24.0) (2023-08-31)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
### ⚠ BREAKING CHANGES
|
|
90
|
+
|
|
91
|
+
* **acir:** Remove unused `Directive` opcodes ([#510](https://github.com/noir-lang/acvm/issues/510))
|
|
92
|
+
* **acir:** Add predicate to MemoryOp ([#503](https://github.com/noir-lang/acvm/issues/503))
|
|
93
|
+
* Assertion messages embedded in the circuit ([#484](https://github.com/noir-lang/acvm/issues/484))
|
|
94
|
+
|
|
95
|
+
### Features
|
|
96
|
+
|
|
97
|
+
* **acir:** Add predicate to MemoryOp ([#503](https://github.com/noir-lang/acvm/issues/503)) ([ca9eebe](https://github.com/noir-lang/acvm/commit/ca9eebe34e61adabf97318c8ccaf60c8a424aafd))
|
|
98
|
+
* Assertion messages embedded in the circuit ([#484](https://github.com/noir-lang/acvm/issues/484)) ([06b97c5](https://github.com/noir-lang/acvm/commit/06b97c51041e16651cf8b2be8bc18214e276c6c9))
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### Miscellaneous Chores
|
|
102
|
+
|
|
103
|
+
* **acir:** Remove unused `Directive` opcodes ([#510](https://github.com/noir-lang/acvm/issues/510)) ([cfd8cbf](https://github.com/noir-lang/acvm/commit/cfd8cbf58307511ac0cc9106c299695c2ca779de))
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
### Dependencies
|
|
107
|
+
|
|
108
|
+
* The following workspace dependencies were updated
|
|
109
|
+
* dependencies
|
|
110
|
+
* acvm bumped from 0.23.0 to 0.24.0
|
|
111
|
+
|
|
112
|
+
## [0.23.0](https://github.com/noir-lang/acvm/compare/acvm_js-v0.22.0...acvm_js-v0.23.0) (2023-08-30)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
### ⚠ BREAKING CHANGES
|
|
116
|
+
|
|
117
|
+
* **acvm:** Remove `BlackBoxFunctionSolver` from `Backend` trait ([#494](https://github.com/noir-lang/acvm/issues/494))
|
|
118
|
+
* **acvm:** Pass `BlackBoxFunctionSolver` to `ACVM` by reference
|
|
119
|
+
|
|
120
|
+
### Features
|
|
121
|
+
|
|
122
|
+
* **acvm_js:** Add `execute_circuit_with_black_box_solver` to prevent reinitialization of `BlackBoxFunctionSolver` ([3877e0e](https://github.com/noir-lang/acvm/commit/3877e0e438a8d0e5545a4da7210767dec05c342f))
|
|
123
|
+
* Expose a `BlackBoxFunctionSolver` containing a barretenberg wasm from `blackbox_solver` ([#494](https://github.com/noir-lang/acvm/issues/494)) ([a1d4b71](https://github.com/noir-lang/acvm/commit/a1d4b71256dfbf1e883e770dd9c45479235aa860))
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
### Miscellaneous Chores
|
|
127
|
+
|
|
128
|
+
* **acvm:** Pass `BlackBoxFunctionSolver` to `ACVM` by reference ([3877e0e](https://github.com/noir-lang/acvm/commit/3877e0e438a8d0e5545a4da7210767dec05c342f))
|
|
129
|
+
* **acvm:** Remove `BlackBoxFunctionSolver` from `Backend` trait ([#494](https://github.com/noir-lang/acvm/issues/494)) ([a1d4b71](https://github.com/noir-lang/acvm/commit/a1d4b71256dfbf1e883e770dd9c45479235aa860))
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
### Dependencies
|
|
133
|
+
|
|
134
|
+
* The following workspace dependencies were updated
|
|
135
|
+
* dependencies
|
|
136
|
+
* acvm bumped from 0.22.0 to 0.23.0
|
|
137
|
+
|
|
138
|
+
## [0.22.0](https://github.com/noir-lang/acvm/compare/acvm_js-v0.21.0...acvm_js-v0.22.0) (2023-08-18)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
### Bug Fixes
|
|
142
|
+
|
|
143
|
+
* Empty commit to trigger release-please ([e8f0748](https://github.com/noir-lang/acvm/commit/e8f0748042ef505d59ab63266d3c36c5358ee30d))
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
### Dependencies
|
|
147
|
+
|
|
148
|
+
* The following workspace dependencies were updated
|
|
149
|
+
* dependencies
|
|
150
|
+
* acvm bumped from 0.21.0 to 0.22.0
|
package/nodejs/acvm_js.d.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
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.
|
|
6
|
-
*/
|
|
7
|
-
export function buildInfo(): BuildInfo;
|
|
8
|
-
/**
|
|
9
4
|
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
10
5
|
*
|
|
11
6
|
* @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
|
|
@@ -43,6 +38,62 @@ export function decompressWitness(compressed_witness: Uint8Array): WitnessMap;
|
|
|
43
38
|
*/
|
|
44
39
|
export function compressWitness(witness_map: WitnessMap): Uint8Array;
|
|
45
40
|
/**
|
|
41
|
+
* Verifies a ECDSA signature over the secp256r1 curve.
|
|
42
|
+
* @param {Uint8Array} hashed_msg
|
|
43
|
+
* @param {Uint8Array} public_key_x_bytes
|
|
44
|
+
* @param {Uint8Array} public_key_y_bytes
|
|
45
|
+
* @param {Uint8Array} signature
|
|
46
|
+
* @returns {boolean}
|
|
47
|
+
*/
|
|
48
|
+
export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Calculates the Blake2s256 hash of the input bytes and represents these as a single field element.
|
|
51
|
+
* Verifies a ECDSA signature over the secp256k1 curve.
|
|
52
|
+
* @param {Uint8Array} hashed_msg
|
|
53
|
+
* @param {Uint8Array} public_key_x_bytes
|
|
54
|
+
* @param {Uint8Array} public_key_y_bytes
|
|
55
|
+
* @param {Uint8Array} signature
|
|
56
|
+
* @returns {boolean}
|
|
57
|
+
*/
|
|
58
|
+
export function ecdsa_secp256k1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Calculates the Keccak256 hash of the input bytes
|
|
61
|
+
* @param {Uint8Array} inputs
|
|
62
|
+
* @returns {Uint8Array}
|
|
63
|
+
*/
|
|
64
|
+
export function keccak256(inputs: Uint8Array): Uint8Array;
|
|
65
|
+
/**
|
|
66
|
+
* Calculates the Blake2s256 hash of the input bytes
|
|
67
|
+
* @param {Uint8Array} inputs
|
|
68
|
+
* @returns {Uint8Array}
|
|
69
|
+
*/
|
|
70
|
+
export function blake2s256(inputs: Uint8Array): Uint8Array;
|
|
71
|
+
/**
|
|
72
|
+
* Calculates the SHA256 hash of the input bytes
|
|
73
|
+
* @param {Uint8Array} inputs
|
|
74
|
+
* @returns {Uint8Array}
|
|
75
|
+
*/
|
|
76
|
+
export function sha256(inputs: Uint8Array): Uint8Array;
|
|
77
|
+
/**
|
|
78
|
+
* Performs a bitwise XOR operation between `lhs` and `rhs`
|
|
79
|
+
* @param {string} lhs
|
|
80
|
+
* @param {string} rhs
|
|
81
|
+
* @returns {string}
|
|
82
|
+
*/
|
|
83
|
+
export function xor(lhs: string, rhs: string): string;
|
|
84
|
+
/**
|
|
85
|
+
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
86
|
+
* @param {string} lhs
|
|
87
|
+
* @param {string} rhs
|
|
88
|
+
* @returns {string}
|
|
89
|
+
*/
|
|
90
|
+
export function and(lhs: string, rhs: string): string;
|
|
91
|
+
/**
|
|
92
|
+
* Returns the `BuildInfo` object containing information about how the installed package was built.
|
|
93
|
+
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
94
|
+
*/
|
|
95
|
+
export function buildInfo(): BuildInfo;
|
|
96
|
+
/**
|
|
46
97
|
* Sets the package's logging level.
|
|
47
98
|
*
|
|
48
99
|
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
@@ -110,13 +161,13 @@ export type BuildInfo = {
|
|
|
110
161
|
|
|
111
162
|
|
|
112
163
|
|
|
113
|
-
export type
|
|
114
|
-
callStack?: string[];
|
|
115
|
-
};
|
|
164
|
+
export type LogLevel = "OFF" | "ERROR" | "WARN" | "INFO" | "DEBUG" | "TRACE";
|
|
116
165
|
|
|
117
166
|
|
|
118
167
|
|
|
119
|
-
export type
|
|
168
|
+
export type ExecutionError = Error & {
|
|
169
|
+
callStack?: string[];
|
|
170
|
+
};
|
|
120
171
|
|
|
121
172
|
|
|
122
173
|
|