File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -777,6 +777,16 @@ impl DefiniteDescriptorKey {
777777 pub fn full_derivation_path ( & self ) -> bip32:: DerivationPath {
778778 self . 0 . full_derivation_path ( )
779779 }
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+ }
780790}
781791
782792impl FromStr for DefiniteDescriptorKey {
@@ -842,6 +852,12 @@ impl From<DefiniteDescriptorKey> for DescriptorPublicKey {
842852 }
843853}
844854
855+ impl Borrow < DescriptorPublicKey > for DefiniteDescriptorKey {
856+ fn borrow ( & self ) -> & DescriptorPublicKey {
857+ & self . 0
858+ }
859+ }
860+
845861#[ cfg( test) ]
846862mod test {
847863 use core:: str:: FromStr ;
You can’t perform that action at this time.
0 commit comments