File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -182,6 +182,14 @@ impl Value {
182182 Value :: Confidential ( ..) => 33 ,
183183 }
184184 }
185+
186+ /// Check if the value is explicit.
187+ pub fn is_explicit ( & self ) -> bool {
188+ match * self {
189+ Value :: Explicit ( _) => true ,
190+ _ => false ,
191+ }
192+ }
185193}
186194
187195/// A CT commitment to an asset
@@ -205,6 +213,14 @@ impl Asset {
205213 Asset :: Confidential ( ..) => 33 ,
206214 }
207215 }
216+
217+ /// Check if the asset is explicit.
218+ pub fn is_explicit ( & self ) -> bool {
219+ match * self {
220+ Asset :: Explicit ( _) => true ,
221+ _ => false ,
222+ }
223+ }
208224}
209225
210226
@@ -231,6 +247,14 @@ impl Nonce {
231247 Nonce :: Confidential ( ..) => 33 ,
232248 }
233249 }
250+
251+ /// Check if the nonce is explicit.
252+ pub fn is_explicit ( & self ) -> bool {
253+ match * self {
254+ Nonce :: Explicit ( _) => true ,
255+ _ => false ,
256+ }
257+ }
234258}
235259
236260#[ cfg( test) ]
You can’t perform that action at this time.
0 commit comments