Skip to content

Commit 05ae9ba

Browse files
committed
jsoo: override proof batch verify
1 parent 4a26076 commit 05ae9ba

File tree

2 files changed

+27
-32
lines changed
  • src/lib/crypto/kimchi_bindings/js

2 files changed

+27
-32
lines changed

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

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
/* global plonk_wasm, tsRustConversion
22
*/
33

4-
5-
// Provides: caml_pasta_fp_plonk_proof_batch_verify
6-
// Requires: plonk_wasm, tsRustConversion
7-
var caml_pasta_fp_plonk_proof_batch_verify = function (indexes, proofs) {
8-
indexes = tsRustConversion.mapMlArrayToRustVector(
9-
indexes,
10-
tsRustConversion.fp.verifierIndexToRust
11-
);
12-
proofs = tsRustConversion.mapMlArrayToRustVector(
13-
proofs,
14-
tsRustConversion.fp.proofToRust
15-
);
16-
return plonk_wasm.caml_pasta_fp_plonk_proof_batch_verify(indexes, proofs);
17-
};
18-
194
// Provides: caml_pasta_fp_plonk_proof_dummy
205
// Requires: plonk_wasm, tsRustConversion
216
var caml_pasta_fp_plonk_proof_dummy = function () {
@@ -34,22 +19,6 @@ var caml_pasta_fp_plonk_proof_deep_copy = function (proof) {
3419
);
3520
};
3621

37-
38-
39-
// Provides: caml_pasta_fq_plonk_proof_batch_verify
40-
// Requires: plonk_wasm, tsRustConversion
41-
var caml_pasta_fq_plonk_proof_batch_verify = function (indexes, proofs) {
42-
indexes = tsRustConversion.mapMlArrayToRustVector(
43-
indexes,
44-
tsRustConversion.fq.verifierIndexToRust
45-
);
46-
proofs = tsRustConversion.mapMlArrayToRustVector(
47-
proofs,
48-
tsRustConversion.fq.proofToRust
49-
);
50-
return plonk_wasm.caml_pasta_fq_plonk_proof_batch_verify(indexes, proofs);
51-
};
52-
5322
// Provides: caml_pasta_fq_plonk_proof_dummy
5423
// Requires: plonk_wasm, tsRustConversion
5524
var caml_pasta_fq_plonk_proof_dummy = function () {

src/lib/crypto/kimchi_bindings/js/native/native-overrides/proof.js

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,19 @@ var caml_pasta_fp_plonk_proof_verify = function (index, proof) {
3838
return plonk_wasm.caml_pasta_fp_plonk_proof_verify(index, proof);
3939
};
4040

41-
41+
// Provides: caml_pasta_fp_plonk_proof_batch_verify
42+
// Requires: plonk_wasm, tsRustConversionNative
43+
var caml_pasta_fp_plonk_proof_batch_verify = function (indexes, proofs) {
44+
indexes = tsRustConversionNative.mapMlArrayToRustVector(
45+
indexes,
46+
tsRustConversionNative.fp.verifierIndexToRust
47+
);
48+
proofs = tsRustConversionNative.mapMlArrayToRustVector(
49+
proofs,
50+
tsRustConversionNative.fp.proofToRust
51+
);
52+
return plonk_wasm.caml_pasta_fp_plonk_proof_batch_verify(indexes, proofs);
53+
};
4254

4355
// Provides: caml_pasta_fq_plonk_proof_create
4456
// Requires: plonk_wasm, tsRustConversionNative
@@ -75,3 +87,17 @@ var caml_pasta_fq_plonk_proof_verify = function (index, proof) {
7587
proof = tsRustConversionNative.fq.proofToRust(proof);
7688
return plonk_wasm.caml_pasta_fq_plonk_proof_verify(index, proof);
7789
};
90+
91+
// Provides: caml_pasta_fq_plonk_proof_batch_verify
92+
// Requires: plonk_wasm, tsRustConversionNative
93+
var caml_pasta_fq_plonk_proof_batch_verify = function (indexes, proofs) {
94+
indexes = tsRustConversionNative.mapMlArrayToRustVector(
95+
indexes,
96+
tsRustConversionNatsRustConversionNativetive.fq.verifierIndexToRust
97+
);
98+
proofs = tsRustConversionNative.mapMlArrayToRustVector(
99+
proofs,
100+
tsRustConversionNative.fq.proofToRust
101+
);
102+
return plonk_wasm.caml_pasta_fq_plonk_proof_batch_verify(indexes, proofs);
103+
};

0 commit comments

Comments
 (0)