@@ -25,7 +25,9 @@ use std::iter;
25
25
26
26
use amplify:: confinement:: { SmallBlob , TinyOrdMap , TinyOrdSet } ;
27
27
use amplify:: Wrapper ;
28
- use commit_verify:: { CommitId , Conceal , MerkleHash , MerkleLeaves , StrictHash } ;
28
+ use commit_verify:: {
29
+ CommitEncode , CommitEngine , CommitId , Conceal , MerkleHash , MerkleLeaves , StrictHash ,
30
+ } ;
29
31
use strict_encoding:: { StrictDeserialize , StrictEncode , StrictSerialize } ;
30
32
31
33
use crate :: schema:: { self , ExtensionType , OpFullType , OpType , SchemaId , TransitionType } ;
@@ -194,8 +196,6 @@ pub trait Operation {
194
196
#[ derive( Clone , PartialEq , Eq , Hash , Debug ) ]
195
197
#[ derive( StrictType , StrictDumb , StrictEncode , StrictDecode ) ]
196
198
#[ strict_type( lib = LIB_NAME_RGB ) ]
197
- #[ derive( CommitEncode ) ]
198
- #[ commit_encode( strategy = conceal, id = OpId ) ]
199
199
#[ cfg_attr(
200
200
feature = "serde" ,
201
201
derive( Serialize , Deserialize ) ,
@@ -218,8 +218,6 @@ impl StrictDeserialize for Genesis {}
218
218
#[ derive( Clone , PartialEq , Eq , Hash , Debug ) ]
219
219
#[ derive( StrictType , StrictDumb , StrictEncode , StrictDecode ) ]
220
220
#[ strict_type( lib = LIB_NAME_RGB ) ]
221
- #[ derive( CommitEncode ) ]
222
- #[ commit_encode( strategy = conceal, id = OpId ) ]
223
221
#[ cfg_attr(
224
222
feature = "serde" ,
225
223
derive( Serialize , Deserialize ) ,
@@ -242,8 +240,6 @@ impl StrictDeserialize for Extension {}
242
240
#[ derive( Clone , PartialEq , Eq , Hash , Debug ) ]
243
241
#[ derive( StrictType , StrictDumb , StrictEncode , StrictDecode ) ]
244
242
#[ strict_type( lib = LIB_NAME_RGB ) ]
245
- #[ derive( CommitEncode ) ]
246
- #[ commit_encode( strategy = conceal, id = OpId ) ]
247
243
#[ cfg_attr(
248
244
feature = "serde" ,
249
245
derive( Serialize , Deserialize ) ,
@@ -299,6 +295,21 @@ impl Conceal for Extension {
299
295
}
300
296
}
301
297
298
+ impl CommitEncode for Genesis {
299
+ type CommitmentId = OpId ;
300
+ fn commit_encode ( & self , e : & mut CommitEngine ) { e. commit_to ( & self . commit ( ) ) }
301
+ }
302
+
303
+ impl CommitEncode for Transition {
304
+ type CommitmentId = OpId ;
305
+ fn commit_encode ( & self , e : & mut CommitEngine ) { e. commit_to ( & self . commit ( ) ) }
306
+ }
307
+
308
+ impl CommitEncode for Extension {
309
+ type CommitmentId = OpId ;
310
+ fn commit_encode ( & self , e : & mut CommitEngine ) { e. commit_to ( & self . commit ( ) ) }
311
+ }
312
+
302
313
impl Transition {
303
314
/// Returns reference to information about the owned rights in form of
304
315
/// [`Inputs`] wrapper structure which this operation updates with
0 commit comments