|
1 | | -/* global plonk_wasm, tsRustConversion, caml_string_of_jsstring, |
2 | | - free_on_finalize, caml_jsstring_of_string |
3 | | - */ |
4 | | - |
5 | | -// Provides: caml_pasta_fq_plonk_circuit_serialize |
6 | | -// Requires: plonk_wasm, caml_string_of_jsstring |
7 | | -var caml_pasta_fq_plonk_circuit_serialize = function ( |
8 | | - public_input_size, |
9 | | - gate_vector |
10 | | -) { |
11 | | - return caml_string_of_jsstring( |
12 | | - plonk_wasm.caml_pasta_fq_plonk_circuit_serialize( |
13 | | - public_input_size, |
14 | | - gate_vector |
15 | | - ) |
16 | | - ); |
17 | | -}; |
18 | | - |
19 | | -// Provides: caml_pasta_fp_plonk_index_create |
20 | | -// Requires: plonk_wasm, free_on_finalize, tsRustConversion |
21 | | -var caml_pasta_fp_plonk_index_create = function ( |
22 | | - gates, |
23 | | - public_inputs, |
24 | | - caml_lookup_tables, |
25 | | - caml_runtime_table_cfgs, |
26 | | - prev_challenges, |
27 | | - urs, |
28 | | - lazy_mode |
29 | | -) { |
30 | | - var wasm_lookup_tables = |
31 | | - tsRustConversion.fp.lookupTablesToRust(caml_lookup_tables); |
32 | | - var wasm_runtime_table_cfgs = tsRustConversion.fp.runtimeTableCfgsToRust( |
33 | | - caml_runtime_table_cfgs |
34 | | - ); |
35 | | - |
36 | | - var t = plonk_wasm.caml_pasta_fp_plonk_index_create( |
37 | | - gates, |
38 | | - public_inputs, |
39 | | - wasm_lookup_tables, |
40 | | - wasm_runtime_table_cfgs, |
41 | | - prev_challenges, |
42 | | - urs, |
43 | | - lazy_mode |
44 | | - ); |
45 | | - return free_on_finalize(t); |
46 | | -}; |
47 | | - |
48 | | -// Provides: caml_pasta_fp_plonk_index_create_bytecode |
49 | | -// Requires: caml_pasta_fp_plonk_index_create |
50 | | -var caml_pasta_fp_plonk_index_create_bytecode = function ( |
51 | | - gates, |
52 | | - public_inputs, |
53 | | - caml_lookup_tables, |
54 | | - caml_runtime_table_cfgs, |
55 | | - prev_challenges, |
56 | | - urs, |
57 | | - lazy_mode |
58 | | -) { |
59 | | - return caml_pasta_fp_plonk_index_create( |
60 | | - gates, |
61 | | - public_inputs, |
62 | | - caml_lookup_tables, |
63 | | - caml_runtime_table_cfgs, |
64 | | - prev_challenges, |
65 | | - urs, |
66 | | - lazy_mode |
67 | | - ); |
68 | | -}; |
69 | | - |
70 | | -// Provides: caml_pasta_fp_plonk_index_max_degree |
71 | | -// Requires: plonk_wasm |
72 | | -var caml_pasta_fp_plonk_index_max_degree = |
73 | | - plonk_wasm.caml_pasta_fp_plonk_index_max_degree; |
74 | | - |
75 | | -// Provides: caml_pasta_fp_plonk_index_public_inputs |
76 | | -// Requires: plonk_wasm |
77 | | -var caml_pasta_fp_plonk_index_public_inputs = |
78 | | - plonk_wasm.caml_pasta_fp_plonk_index_public_inputs; |
79 | | - |
80 | | -// Provides: caml_pasta_fp_plonk_index_domain_d1_size |
81 | | -// Requires: plonk_wasm |
82 | | -var caml_pasta_fp_plonk_index_domain_d1_size = |
83 | | - plonk_wasm.caml_pasta_fp_plonk_index_domain_d1_size; |
84 | | - |
85 | | -// Provides: caml_pasta_fp_plonk_index_domain_d4_size |
86 | | -// Requires: plonk_wasm |
87 | | -var caml_pasta_fp_plonk_index_domain_d4_size = |
88 | | - plonk_wasm.caml_pasta_fp_plonk_index_domain_d4_size; |
89 | | - |
90 | | -// Provides: caml_pasta_fp_plonk_index_domain_d8_size |
91 | | -// Requires: plonk_wasm |
92 | | -var caml_pasta_fp_plonk_index_domain_d8_size = |
93 | | - plonk_wasm.caml_pasta_fp_plonk_index_domain_d8_size; |
94 | | - |
95 | | -// Provides: caml_pasta_fp_plonk_index_read |
96 | | -// Requires: plonk_wasm, caml_jsstring_of_string |
97 | | -var caml_pasta_fp_plonk_index_read = function (offset, urs, path) { |
98 | | - if (offset === 0) { |
99 | | - offset = undefined; |
100 | | - } else { |
101 | | - offset = offset[1]; |
102 | | - } |
103 | | - return plonk_wasm.caml_pasta_fp_plonk_index_read( |
104 | | - offset, |
105 | | - urs, |
106 | | - caml_jsstring_of_string(path) |
107 | | - ); |
108 | | -}; |
109 | | - |
110 | | -// Provides: caml_pasta_fp_plonk_index_write |
111 | | -// Requires: plonk_wasm, caml_jsstring_of_string |
112 | | -var caml_pasta_fp_plonk_index_write = function (append, t, path) { |
113 | | - if (append === 0) { |
114 | | - append = undefined; |
115 | | - } else { |
116 | | - append = append[1]; |
117 | | - } |
118 | | - return plonk_wasm.caml_pasta_fp_plonk_index_write( |
119 | | - append, |
120 | | - t, |
121 | | - caml_jsstring_of_string(path) |
122 | | - ); |
123 | | -}; |
124 | | - |
125 | | -// Provides: caml_pasta_fq_plonk_index_create |
126 | | -// Requires: plonk_wasm, free_on_finalize, tsRustConversion |
127 | | -var caml_pasta_fq_plonk_index_create = function ( |
128 | | - gates, |
129 | | - public_inputs, |
130 | | - caml_lookup_tables, |
131 | | - caml_runtime_table_cfgs, |
132 | | - prev_challenges, |
133 | | - urs, |
134 | | - lazy_mode |
135 | | -) { |
136 | | - var wasm_lookup_tables = |
137 | | - tsRustConversion.fq.lookupTablesToRust(caml_lookup_tables); |
138 | | - var wasm_runtime_table_cfgs = tsRustConversion.fq.runtimeTableCfgsToRust( |
139 | | - caml_runtime_table_cfgs |
140 | | - ); |
141 | | - |
142 | | - return free_on_finalize( |
143 | | - plonk_wasm.caml_pasta_fq_plonk_index_create( |
144 | | - gates, |
145 | | - public_inputs, |
146 | | - wasm_lookup_tables, |
147 | | - wasm_runtime_table_cfgs, |
148 | | - prev_challenges, |
149 | | - urs, |
150 | | - lazy_mode |
151 | | - ) |
152 | | - ); |
153 | | -}; |
154 | | - |
155 | | -// Provides: caml_pasta_fq_plonk_index_create_bytecode |
156 | | -// Requires: caml_pasta_fq_plonk_index_create |
157 | | -var caml_pasta_fq_plonk_index_create_bytecode = function ( |
158 | | - gates, |
159 | | - public_inputs, |
160 | | - caml_lookup_tables, |
161 | | - caml_runtime_table_cfgs, |
162 | | - prev_challenges, |
163 | | - urs, |
164 | | - lazy_mode |
165 | | -) { |
166 | | - return caml_pasta_fq_plonk_index_create( |
167 | | - gates, |
168 | | - public_inputs, |
169 | | - caml_lookup_tables, |
170 | | - caml_runtime_table_cfgs, |
171 | | - prev_challenges, |
172 | | - urs, |
173 | | - lazy_mode |
174 | | - ); |
175 | | -}; |
176 | | - |
177 | | -// Provides: caml_pasta_fq_plonk_index_max_degree |
178 | | -// Requires: plonk_wasm |
179 | | -var caml_pasta_fq_plonk_index_max_degree = |
180 | | - plonk_wasm.caml_pasta_fq_plonk_index_max_degree; |
181 | | - |
182 | | -// Provides: caml_pasta_fq_plonk_index_public_inputs |
183 | | -// Requires: plonk_wasm |
184 | | -var caml_pasta_fq_plonk_index_public_inputs = |
185 | | - plonk_wasm.caml_pasta_fq_plonk_index_public_inputs; |
186 | | - |
187 | | -// Provides: caml_pasta_fq_plonk_index_domain_d1_size |
188 | | -// Requires: plonk_wasm |
189 | | -var caml_pasta_fq_plonk_index_domain_d1_size = |
190 | | - plonk_wasm.caml_pasta_fq_plonk_index_domain_d1_size; |
191 | | - |
192 | | -// Provides: caml_pasta_fq_plonk_index_domain_d4_size |
193 | | -// Requires: plonk_wasm |
194 | | -var caml_pasta_fq_plonk_index_domain_d4_size = |
195 | | - plonk_wasm.caml_pasta_fq_plonk_index_domain_d4_size; |
196 | | - |
197 | | -// Provides: caml_pasta_fq_plonk_index_domain_d8_size |
198 | | -// Requires: plonk_wasm |
199 | | -var caml_pasta_fq_plonk_index_domain_d8_size = |
200 | | - plonk_wasm.caml_pasta_fq_plonk_index_domain_d8_size; |
201 | | - |
202 | | -// Provides: caml_pasta_fq_plonk_index_read |
203 | | -// Requires: plonk_wasm, caml_jsstring_of_string |
204 | | -var caml_pasta_fq_plonk_index_read = function (offset, urs, path) { |
205 | | - if (offset === 0) { |
206 | | - offset = undefined; |
207 | | - } else { |
208 | | - offset = offset[1]; |
209 | | - } |
210 | | - return plonk_wasm.caml_pasta_fq_plonk_index_read( |
211 | | - offset, |
212 | | - urs, |
213 | | - caml_jsstring_of_string(path) |
214 | | - ); |
215 | | -}; |
216 | | - |
217 | | -// Provides: caml_pasta_fq_plonk_index_write |
218 | | -// Requires: plonk_wasm, caml_jsstring_of_string |
219 | | -var caml_pasta_fq_plonk_index_write = function (append, t, path) { |
220 | | - if (append === 0) { |
221 | | - append = undefined; |
222 | | - } else { |
223 | | - append = append[1]; |
224 | | - } |
225 | | - return plonk_wasm.caml_pasta_fq_plonk_index_write( |
226 | | - append, |
227 | | - t, |
228 | | - caml_jsstring_of_string(path) |
229 | | - ); |
230 | | -}; |
0 commit comments