@@ -106,15 +106,13 @@ function option<T, S>(spec: Spec<T, S>): Spec<MlOption<T>, S | undefined> {
106106 } ;
107107}
108108
109- equivalentRecord ( Bigint256Bindings , wasm , {
109+ equivalentRecord ( Bigint256Bindings as Omit < typeof Bigint256Bindings , "caml_bigint_256_print" | "caml_bigint_256_to_string" > , wasm , {
110110 caml_bigint_256_of_numeral : undefined , // TODO
111111 caml_bigint_256_of_decimal_string : { from : [ decimalString ] , to : bigint256 } ,
112112 caml_bigint_256_num_limbs : { from : [ ] , to : number } ,
113113 caml_bigint_256_bytes_per_limb : { from : [ ] , to : number } ,
114114 caml_bigint_256_div : { from : [ bigint256 , bigint256 ] , to : bigint256 } ,
115115 caml_bigint_256_compare : { from : [ bigint256 , bigint256 ] , to : number } ,
116- caml_bigint_256_print : undefined , // this would spam the console
117- caml_bigint_256_to_string : { from : [ bigint256 ] , to : decimalString } ,
118116 caml_bigint_256_test_bit : {
119117 from : [ bigint256 , numberLessThan ( 256 ) ] ,
120118 to : boolean ,
@@ -124,97 +122,8 @@ equivalentRecord(Bigint256Bindings, wasm, {
124122 caml_bigint_256_deep_copy : { from : [ bigint256 ] , to : bigint256 } ,
125123} ) ;
126124
127- equivalentRecord (
128- FpBindings as Omit <
129- typeof FpBindings ,
130- | 'caml_pasta_fp_copy'
131- | 'caml_pasta_fp_mut_add'
132- | 'caml_pasta_fp_mut_sub'
133- | 'caml_pasta_fp_mut_mul'
134- | 'caml_pasta_fp_mut_square'
135- > ,
136- wasm ,
137- {
138- caml_pasta_fp_size_in_bits : { from : [ ] , to : number } ,
139- caml_pasta_fp_size : { from : [ ] , to : fp } ,
140- caml_pasta_fp_add : { from : [ fp , fp ] , to : fp } ,
141- caml_pasta_fp_sub : { from : [ fp , fp ] , to : fp } ,
142- caml_pasta_fp_negate : { from : [ fp ] , to : fp } ,
143- caml_pasta_fp_mul : { from : [ fp , fp ] , to : fp } ,
144- caml_pasta_fp_div : { from : [ fp , fp ] , to : fp } ,
145- caml_pasta_fp_inv : { from : [ fp ] , to : option ( fp ) } ,
146- caml_pasta_fp_square : { from : [ fp ] , to : fp } ,
147- caml_pasta_fp_is_square : { from : [ fp ] , to : boolean } ,
148- caml_pasta_fp_sqrt : { from : [ fp ] , to : option ( fp ) } ,
149- caml_pasta_fp_of_int : { from : [ uint31 ] , to : fp } ,
150- caml_pasta_fp_to_string : { from : [ fp ] , to : decimalString } ,
151- caml_pasta_fp_of_string : { from : [ decimalString ] , to : fp } ,
152- caml_pasta_fp_print : undefined , // this would spam the console
153- // these aren't defined in Rust
154- // caml_pasta_fp_copy: { from: [fp, fp], to: unit },
155- // caml_pasta_fp_mut_add: { from: [fp, fp], to: unit },
156- // caml_pasta_fp_mut_sub: { from: [fp, fp], to: unit },
157- // caml_pasta_fp_mut_mul: { from: [fp, fp], to: unit },
158- // caml_pasta_fp_mut_square: { from: [fp], to: unit },
159- caml_pasta_fp_compare : { from : [ fp , fp ] , to : number } ,
160- caml_pasta_fp_equal : { from : [ fp , fp ] , to : boolean } ,
161- caml_pasta_fp_random : undefined , // random outputs won't match
162- caml_pasta_fp_rng : undefined , // random outputs won't match
163- caml_pasta_fp_to_bigint : { from : [ fp ] , to : bigint256 } ,
164- caml_pasta_fp_of_bigint : { from : [ bigint256 ] , to : fp } ,
165- caml_pasta_fp_two_adic_root_of_unity : { from : [ ] , to : fp } ,
166- caml_pasta_fp_domain_generator : { from : [ numberLessThan ( 32 ) ] , to : fp } ,
167- caml_pasta_fp_to_bytes : undefined , // not implemented
168- caml_pasta_fp_of_bytes : undefined , // not implemented
169- caml_pasta_fp_deep_copy : { from : [ fp ] , to : fp } ,
170- }
171- ) ;
172125
173- equivalentRecord (
174- FqBindings as Omit <
175- typeof FqBindings ,
176- | 'caml_pasta_fq_copy'
177- | 'caml_pasta_fq_mut_add'
178- | 'caml_pasta_fq_mut_sub'
179- | 'caml_pasta_fq_mut_mul'
180- | 'caml_pasta_fq_mut_square'
181- > ,
182- wasm ,
183- {
184- caml_pasta_fq_size_in_bits : { from : [ ] , to : number } ,
185- caml_pasta_fq_size : { from : [ ] , to : fq } ,
186- caml_pasta_fq_add : { from : [ fq , fq ] , to : fq } ,
187- caml_pasta_fq_sub : { from : [ fq , fq ] , to : fq } ,
188- caml_pasta_fq_negate : { from : [ fq ] , to : fq } ,
189- caml_pasta_fq_mul : { from : [ fq , fq ] , to : fq } ,
190- caml_pasta_fq_div : { from : [ fq , fq ] , to : fq } ,
191- caml_pasta_fq_inv : { from : [ fq ] , to : option ( fq ) } ,
192- caml_pasta_fq_square : { from : [ fq ] , to : fq } ,
193- caml_pasta_fq_is_square : { from : [ fq ] , to : boolean } ,
194- caml_pasta_fq_sqrt : { from : [ fq ] , to : option ( fq ) } ,
195- caml_pasta_fq_of_int : { from : [ uint31 ] , to : fq } ,
196- caml_pasta_fq_to_string : { from : [ fq ] , to : decimalString } ,
197- caml_pasta_fq_of_string : { from : [ decimalString ] , to : fq } ,
198- caml_pasta_fq_print : undefined , // this would spam the console
199- // these aren't defined in Rust
200- // caml_pasta_fq_copy: { from: [fq, fq], to: unit },
201- // caml_pasta_fq_mut_add: { from: [fq, fq], to: unit },
202- // caml_pasta_fq_mut_sub: { from: [fq, fq], to: unit },
203- // caml_pasta_fq_mut_mul: { from: [fq, fq], to: unit },
204- // caml_pasta_fq_mut_square: { from: [fq], to: unit },
205- caml_pasta_fq_compare : { from : [ fq , fq ] , to : number } ,
206- caml_pasta_fq_equal : { from : [ fq , fq ] , to : boolean } ,
207- caml_pasta_fq_random : undefined , // random outputs won't match
208- caml_pasta_fq_rng : undefined , // random outputs won't match
209- caml_pasta_fq_to_bigint : { from : [ fq ] , to : bigint256 } ,
210- caml_pasta_fq_of_bigint : { from : [ bigint256 ] , to : fq } ,
211- caml_pasta_fq_two_adic_root_of_unity : { from : [ ] , to : fq } ,
212- caml_pasta_fq_domain_generator : { from : [ numberLessThan ( 32 ) ] , to : fq } ,
213- caml_pasta_fq_to_bytes : undefined , // not implemented
214- caml_pasta_fq_of_bytes : undefined , // not implemented
215- caml_pasta_fq_deep_copy : { from : [ fq ] , to : fq } ,
216- }
217- ) ;
126+
218127
219128// elliptic curve
220129
0 commit comments