Skip to content

Commit ec24d83

Browse files
Trivo25querolita
authored andcommitted
move prover_to_json
1 parent 8e111e8 commit ec24d83

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/lib/crypto/kimchi_bindings/js/bindings/proof.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,3 @@ var caml_pasta_fq_plonk_proof_deep_copy = function (proof) {
137137
);
138138
};
139139

140-
// Provides: prover_to_json
141-
// Requires: plonk_wasm
142-
var prover_to_json = plonk_wasm.prover_to_json;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* global plonk_wasm, tsRustConversionNative */
2+
3+
4+
// Provides: prover_to_json
5+
// Requires: plonk_wasm, tsRustConversionNative
6+
function prover_to_json(prover_index) {
7+
var bytes = prover_index.serialize()
8+
var index = plonk_wasm.prover_index_from_bytes(bytes);
9+
// TODO: ^ remove the round trip when napi has direct access to the object
10+
11+
return plonk_wasm.prover_to_json(index);
12+
}

0 commit comments

Comments
 (0)