Skip to content

Commit

Permalink
descriptor: add convenience convertors
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Jul 30, 2023
1 parent 0caa349 commit ecde566
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions std/src/descriptors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use bc::ScriptPubkey;

use crate::{Derive, DeriveSet, DeriveXOnly, NormalIndex, XpubDescriptor};

#[derive(Clone, Eq, PartialEq, Hash, Debug, From)]
pub struct TrKey<K: DeriveXOnly = XpubDescriptor>(K);

/*
Expand All @@ -44,7 +45,9 @@ impl<K: DeriveXOnly> Derive<ScriptPubkey> for TrKey<K> {
}
}

#[derive(Clone, Eq, PartialEq, Hash, Debug, From)]
pub enum DescriptorStd<S: DeriveSet = XpubDescriptor> {
#[from]
TrKey(TrKey<S::XOnly>),
}

Expand Down

0 comments on commit ecde566

Please sign in to comment.