@@ -90,15 +90,13 @@ function option<T, S>(spec: Spec<T, S>): Spec<MlOption<T>, S | undefined> {
9090 } ;
9191}
9292
93- equivalentRecord ( Bigint256Bindings , wasm , {
93+ equivalentRecord ( Bigint256Bindings as Omit < typeof Bigint256Bindings , "caml_bigint_256_print" | "caml_bigint_256_to_string" > , wasm , {
9494 caml_bigint_256_of_numeral : undefined , // TODO
9595 caml_bigint_256_of_decimal_string : { from : [ decimalString ] , to : bigint256 } ,
9696 caml_bigint_256_num_limbs : { from : [ ] , to : number } ,
9797 caml_bigint_256_bytes_per_limb : { from : [ ] , to : number } ,
9898 caml_bigint_256_div : { from : [ bigint256 , bigint256 ] , to : bigint256 } ,
9999 caml_bigint_256_compare : { from : [ bigint256 , bigint256 ] , to : number } ,
100- caml_bigint_256_print : undefined , // this would spam the console
101- caml_bigint_256_to_string : { from : [ bigint256 ] , to : decimalString } ,
102100 caml_bigint_256_test_bit : {
103101 from : [ bigint256 , numberLessThan ( 256 ) ] ,
104102 to : boolean ,
@@ -108,97 +106,8 @@ equivalentRecord(Bigint256Bindings, wasm, {
108106 caml_bigint_256_deep_copy : { from : [ bigint256 ] , to : bigint256 } ,
109107} ) ;
110108
111- equivalentRecord (
112- FpBindings as Omit <
113- typeof FpBindings ,
114- | 'caml_pasta_fp_copy'
115- | 'caml_pasta_fp_mut_add'
116- | 'caml_pasta_fp_mut_sub'
117- | 'caml_pasta_fp_mut_mul'
118- | 'caml_pasta_fp_mut_square'
119- > ,
120- wasm ,
121- {
122- caml_pasta_fp_size_in_bits : { from : [ ] , to : number } ,
123- caml_pasta_fp_size : { from : [ ] , to : fp } ,
124- caml_pasta_fp_add : { from : [ fp , fp ] , to : fp } ,
125- caml_pasta_fp_sub : { from : [ fp , fp ] , to : fp } ,
126- caml_pasta_fp_negate : { from : [ fp ] , to : fp } ,
127- caml_pasta_fp_mul : { from : [ fp , fp ] , to : fp } ,
128- caml_pasta_fp_div : { from : [ fp , fp ] , to : fp } ,
129- caml_pasta_fp_inv : { from : [ fp ] , to : option ( fp ) } ,
130- caml_pasta_fp_square : { from : [ fp ] , to : fp } ,
131- caml_pasta_fp_is_square : { from : [ fp ] , to : boolean } ,
132- caml_pasta_fp_sqrt : { from : [ fp ] , to : option ( fp ) } ,
133- caml_pasta_fp_of_int : { from : [ uint31 ] , to : fp } ,
134- caml_pasta_fp_to_string : { from : [ fp ] , to : decimalString } ,
135- caml_pasta_fp_of_string : { from : [ decimalString ] , to : fp } ,
136- caml_pasta_fp_print : undefined , // this would spam the console
137- // these aren't defined in Rust
138- // caml_pasta_fp_copy: { from: [fp, fp], to: unit },
139- // caml_pasta_fp_mut_add: { from: [fp, fp], to: unit },
140- // caml_pasta_fp_mut_sub: { from: [fp, fp], to: unit },
141- // caml_pasta_fp_mut_mul: { from: [fp, fp], to: unit },
142- // caml_pasta_fp_mut_square: { from: [fp], to: unit },
143- caml_pasta_fp_compare : { from : [ fp , fp ] , to : number } ,
144- caml_pasta_fp_equal : { from : [ fp , fp ] , to : boolean } ,
145- caml_pasta_fp_random : undefined , // random outputs won't match
146- caml_pasta_fp_rng : undefined , // random outputs won't match
147- caml_pasta_fp_to_bigint : { from : [ fp ] , to : bigint256 } ,
148- caml_pasta_fp_of_bigint : { from : [ bigint256 ] , to : fp } ,
149- caml_pasta_fp_two_adic_root_of_unity : { from : [ ] , to : fp } ,
150- caml_pasta_fp_domain_generator : { from : [ numberLessThan ( 32 ) ] , to : fp } ,
151- caml_pasta_fp_to_bytes : undefined , // not implemented
152- caml_pasta_fp_of_bytes : undefined , // not implemented
153- caml_pasta_fp_deep_copy : { from : [ fp ] , to : fp } ,
154- }
155- ) ;
156109
157- equivalentRecord (
158- FqBindings as Omit <
159- typeof FqBindings ,
160- | 'caml_pasta_fq_copy'
161- | 'caml_pasta_fq_mut_add'
162- | 'caml_pasta_fq_mut_sub'
163- | 'caml_pasta_fq_mut_mul'
164- | 'caml_pasta_fq_mut_square'
165- > ,
166- wasm ,
167- {
168- caml_pasta_fq_size_in_bits : { from : [ ] , to : number } ,
169- caml_pasta_fq_size : { from : [ ] , to : fq } ,
170- caml_pasta_fq_add : { from : [ fq , fq ] , to : fq } ,
171- caml_pasta_fq_sub : { from : [ fq , fq ] , to : fq } ,
172- caml_pasta_fq_negate : { from : [ fq ] , to : fq } ,
173- caml_pasta_fq_mul : { from : [ fq , fq ] , to : fq } ,
174- caml_pasta_fq_div : { from : [ fq , fq ] , to : fq } ,
175- caml_pasta_fq_inv : { from : [ fq ] , to : option ( fq ) } ,
176- caml_pasta_fq_square : { from : [ fq ] , to : fq } ,
177- caml_pasta_fq_is_square : { from : [ fq ] , to : boolean } ,
178- caml_pasta_fq_sqrt : { from : [ fq ] , to : option ( fq ) } ,
179- caml_pasta_fq_of_int : { from : [ uint31 ] , to : fq } ,
180- caml_pasta_fq_to_string : { from : [ fq ] , to : decimalString } ,
181- caml_pasta_fq_of_string : { from : [ decimalString ] , to : fq } ,
182- caml_pasta_fq_print : undefined , // this would spam the console
183- // these aren't defined in Rust
184- // caml_pasta_fq_copy: { from: [fq, fq], to: unit },
185- // caml_pasta_fq_mut_add: { from: [fq, fq], to: unit },
186- // caml_pasta_fq_mut_sub: { from: [fq, fq], to: unit },
187- // caml_pasta_fq_mut_mul: { from: [fq, fq], to: unit },
188- // caml_pasta_fq_mut_square: { from: [fq], to: unit },
189- caml_pasta_fq_compare : { from : [ fq , fq ] , to : number } ,
190- caml_pasta_fq_equal : { from : [ fq , fq ] , to : boolean } ,
191- caml_pasta_fq_random : undefined , // random outputs won't match
192- caml_pasta_fq_rng : undefined , // random outputs won't match
193- caml_pasta_fq_to_bigint : { from : [ fq ] , to : bigint256 } ,
194- caml_pasta_fq_of_bigint : { from : [ bigint256 ] , to : fq } ,
195- caml_pasta_fq_two_adic_root_of_unity : { from : [ ] , to : fq } ,
196- caml_pasta_fq_domain_generator : { from : [ numberLessThan ( 32 ) ] , to : fq } ,
197- caml_pasta_fq_to_bytes : undefined , // not implemented
198- caml_pasta_fq_of_bytes : undefined , // not implemented
199- caml_pasta_fq_deep_copy : { from : [ fq ] , to : fq } ,
200- }
201- ) ;
110+
202111
203112// elliptic curve
204113
0 commit comments