@@ -165,3 +165,37 @@ impl<C: CurveAffine, const PATH_LENGTH: usize, const K: usize, const MAX_WORDS:
165
165
SinsemillaChip :: < C , K , MAX_WORDS > :: extract ( point)
166
166
}
167
167
}
168
+
169
+ impl < C : CurveAffine , const PATH_LENGTH : usize , const K : usize , const MAX_WORDS : usize >
170
+ UtilitiesInstructions < C :: Base > for MerkleChip < C , PATH_LENGTH , K , MAX_WORDS >
171
+ {
172
+ type Var = CellValue < C :: Base > ;
173
+ }
174
+
175
+ impl < C : CurveAffine , const PATH_LENGTH : usize , const K : usize , const MAX_WORDS : usize >
176
+ CondSwapInstructions < C :: Base > for MerkleChip < C , PATH_LENGTH , K , MAX_WORDS >
177
+ {
178
+ type Var = CellValue < C :: Base > ;
179
+ type Swap = Swap ;
180
+
181
+ #[ allow( clippy:: type_complexity) ]
182
+ fn swap (
183
+ & self ,
184
+ layouter : impl Layouter < C :: Base > ,
185
+ pair : (
186
+ <Self as CondSwapInstructions < C :: Base > >:: Var ,
187
+ <Self as CondSwapInstructions < C :: Base > >:: Var ,
188
+ ) ,
189
+ swap : Self :: Swap ,
190
+ ) -> Result <
191
+ (
192
+ <Self as CondSwapInstructions < C :: Base > >:: Var ,
193
+ <Self as CondSwapInstructions < C :: Base > >:: Var ,
194
+ ) ,
195
+ Error ,
196
+ > {
197
+ let config = self . config ( ) . cond_swap_config . clone ( ) ;
198
+ let chip = CondSwapChip :: < C :: Base > :: construct ( config) ;
199
+ chip. swap ( layouter, pair, swap)
200
+ }
201
+ }
0 commit comments