File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -777,6 +777,16 @@ impl DefiniteDescriptorKey {
777
777
pub fn full_derivation_path ( & self ) -> bip32:: DerivationPath {
778
778
self . 0 . full_derivation_path ( )
779
779
}
780
+
781
+ /// Reference to the underlying `DescriptorPublicKey`
782
+ pub fn as_descriptor_public_key ( & self ) -> & DescriptorPublicKey {
783
+ & self . 0
784
+ }
785
+
786
+ /// Converts the definite key into a generic one
787
+ pub fn into_descriptor_public_key ( self ) -> DescriptorPublicKey {
788
+ self . 0
789
+ }
780
790
}
781
791
782
792
impl FromStr for DefiniteDescriptorKey {
@@ -842,6 +852,12 @@ impl From<DefiniteDescriptorKey> for DescriptorPublicKey {
842
852
}
843
853
}
844
854
855
+ impl Borrow < DescriptorPublicKey > for DefiniteDescriptorKey {
856
+ fn borrow ( & self ) -> & DescriptorPublicKey {
857
+ & self . 0
858
+ }
859
+ }
860
+
845
861
#[ cfg( test) ]
846
862
mod test {
847
863
use core:: str:: FromStr ;
You can’t perform that action at this time.
0 commit comments