11/* global plonk_wasm, caml_string_of_jsstring */
2+ /* eslint-disable no-unused-vars */
3+ /* global plonk_wasm, tsRustConversionNative, caml_bytes_of_uint8array, caml_string_of_jsstring */
24
5+ // Provides: caml_pasta_fp_plonk_gate_vector_create
6+ // Requires: plonk_wasm
7+ var caml_pasta_fp_plonk_gate_vector_create = function ( ) {
8+ return plonk_wasm . caml_pasta_fp_plonk_gate_vector_create ( ) ;
9+ } ;
10+
11+ // Provides: caml_pasta_fp_plonk_gate_vector_add
12+ // Requires: plonk_wasm, tsRustConversionNative
13+ var caml_pasta_fp_plonk_gate_vector_add = function ( vector , gate ) {
14+ return plonk_wasm . caml_pasta_fp_plonk_gate_vector_add (
15+ vector ,
16+ tsRustConversionNative . fp . gateToRust ( gate )
17+ ) ;
18+ } ;
19+
20+ // Provides: caml_pasta_fp_plonk_gate_vector_get
21+ // Requires: plonk_wasm, tsRustConversionNative
22+ var caml_pasta_fp_plonk_gate_vector_get = function ( vector , index ) {
23+ return tsRustConversionNative . fp . gateFromRust (
24+ plonk_wasm . caml_pasta_fp_plonk_gate_vector_get ( vector , index )
25+ ) ;
26+ } ;
27+
28+ // Provides: caml_pasta_fp_plonk_gate_vector_len
29+ // Requires: plonk_wasm
30+ var caml_pasta_fp_plonk_gate_vector_len = function ( vector ) {
31+ return plonk_wasm . caml_pasta_fp_plonk_gate_vector_len ( vector ) ;
32+ } ;
33+
34+ // Provides: caml_pasta_fp_plonk_gate_vector_wrap
35+ // Requires: plonk_wasm, tsRustConversionNative
36+ var caml_pasta_fp_plonk_gate_vector_wrap = function ( vector , target , head ) {
37+ return plonk_wasm . caml_pasta_fp_plonk_gate_vector_wrap (
38+ vector ,
39+ tsRustConversionNative . wireToRust ( target ) ,
40+ tsRustConversionNative . wireToRust ( head )
41+ ) ;
42+ } ;
43+
44+ // Provides: caml_pasta_fp_plonk_gate_vector_digest
45+ // Requires: plonk_wasm, caml_bytes_of_uint8array
46+ var caml_pasta_fp_plonk_gate_vector_digest = function ( public_input_size , gate_vector ) {
47+ var bytes = plonk_wasm . caml_pasta_fp_plonk_gate_vector_digest (
48+ public_input_size ,
49+ gate_vector
50+ ) ;
51+ if ( ! ( bytes instanceof Uint8Array ) ) {
52+ bytes = Uint8Array . from ( bytes ) ;
53+ }
54+ return caml_bytes_of_uint8array ( bytes ) ;
55+ } ;
356
457// Provides: caml_pasta_fp_plonk_circuit_serialize
558// Requires: plonk_wasm, caml_string_of_jsstring
6- var caml_pasta_fp_plonk_circuit_serialize = function (
7- public_input_size ,
8- gate_vector
9- ) {
10- var t = plonk_wasm . caml_pasta_fp_plonk_circuit_serialize (
11- plonk_wasm . caml_pasta_fp_plonk_gate_vector_from_bytes ( gate_vector . serialize ( ) ) ,
12- public_input_size
13- ) ;
59+ var caml_pasta_fp_plonk_circuit_serialize = function ( public_input_size , gate_vector ) {
60+ return caml_string_of_jsstring (
61+ plonk_wasm . caml_pasta_fp_plonk_circuit_serialize ( public_input_size , gate_vector )
62+ ) ;
63+ } ;
1464
15- console . log ( t ) ;
16- return caml_string_of_jsstring (
17- t
18- ) ;
65+ // --- Fq versions ---
66+
67+ // Provides: caml_pasta_fq_plonk_gate_vector_create
68+ // Requires: plonk_wasm
69+ var caml_pasta_fq_plonk_gate_vector_create = function ( ) {
70+ return plonk_wasm . caml_pasta_fq_plonk_gate_vector_create ( ) ;
71+ } ;
72+
73+ // Provides: caml_pasta_fq_plonk_gate_vector_add
74+ // Requires: plonk_wasm, tsRustConversionNative
75+ var caml_pasta_fq_plonk_gate_vector_add = function ( vector , gate ) {
76+ return plonk_wasm . caml_pasta_fq_plonk_gate_vector_add (
77+ vector ,
78+ tsRustConversionNative . fq . gateToRust ( gate )
79+ ) ;
80+ } ;
81+
82+ // Provides: caml_pasta_fq_plonk_gate_vector_get
83+ // Requires: plonk_wasm, tsRustConversionNative
84+ var caml_pasta_fq_plonk_gate_vector_get = function ( vector , index ) {
85+ return tsRustConversionNative . fq . gateFromRust (
86+ plonk_wasm . caml_pasta_fq_plonk_gate_vector_get ( vector , index )
87+ ) ;
88+ } ;
89+
90+
91+ // Provides: caml_pasta_fq_plonk_gate_vector_len
92+ // Requires: plonk_wasm
93+ var caml_pasta_fq_plonk_gate_vector_len = function ( vector ) {
94+ return plonk_wasm . caml_pasta_fq_plonk_gate_vector_len ( vector ) ;
95+ } ;
96+
97+ // Provides: caml_pasta_fq_plonk_gate_vector_wrap
98+ // Requires: plonk_wasm, tsRustConversionNative
99+ var caml_pasta_fq_plonk_gate_vector_wrap = function ( vector , target , head ) {
100+ return plonk_wasm . caml_pasta_fq_plonk_gate_vector_wrap (
101+ vector ,
102+ tsRustConversionNative . wireToRust ( target ) ,
103+ tsRustConversionNative . wireToRust ( head )
104+ ) ;
19105} ;
20106
107+ // Provides: caml_pasta_fq_plonk_gate_vector_digest
108+ // Requires: plonk_wasm, caml_bytes_of_uint8array
109+ var caml_pasta_fq_plonk_gate_vector_digest = function ( public_input_size , gate_vector ) {
110+ var bytes = plonk_wasm . caml_pasta_fq_plonk_gate_vector_digest (
111+ public_input_size ,
112+ gate_vector
113+ ) ;
114+ if ( ! ( bytes instanceof Uint8Array ) ) {
115+ bytes = Uint8Array . from ( bytes ) ;
116+ }
117+ return caml_bytes_of_uint8array ( bytes ) ;
118+ } ;
21119
22120// Provides: caml_pasta_fq_plonk_circuit_serialize
23121// Requires: plonk_wasm, caml_string_of_jsstring
24- var caml_pasta_fq_plonk_circuit_serialize = function (
25- public_input_size ,
26- gate_vector
27- ) {
28-
29- var t = plonk_wasm . caml_pasta_fq_plonk_circuit_serialize (
30- plonk_wasm . caml_pasta_fq_plonk_gate_vector_from_bytes ( gate_vector . serialize ( ) ) ,
31- public_input_size
32- ) ;
33- console . log ( t )
34- return caml_string_of_jsstring (
35- t
36- ) ;
37- } ;
122+ var caml_pasta_fq_plonk_circuit_serialize = function ( public_input_size , gate_vector ) {
123+ return caml_string_of_jsstring (
124+ plonk_wasm . caml_pasta_fq_plonk_circuit_serialize ( public_input_size , gate_vector )
125+ ) ;
126+ } ;
0 commit comments