Trait bpstd::Descriptor

source ·
pub trait Descriptor<K = XpubDerivable, V = ()>: DeriveScripts {
    // Required methods
    fn class(&self) -> SpkClass;
    fn keys<'a>(&'a self) -> impl Iterator<Item = &'a K>
       where K: 'a;
    fn vars<'a>(&'a self) -> impl Iterator<Item = &'a V>
       where V: 'a;
    fn xpubs(&self) -> impl Iterator<Item = &XpubAccount>;
    fn legacy_keyset(&self, terminal: Terminal) -> IndexMap<LegacyPk, KeyOrigin>;
    fn xonly_keyset(
        &self,
        terminal: Terminal,
    ) -> IndexMap<XOnlyPk, TapDerivation>;
    fn legacy_witness(
        &self,
        keysigs: HashMap<&KeyOrigin, LegacyKeySig>,
    ) -> Option<(SigScript, Witness)>;
    fn taproot_witness(
        &self,
        keysigs: HashMap<&KeyOrigin, TaprootKeySig>,
    ) -> Option<Witness>;

    // Provided method
    fn is_taproot(&self) -> bool { ... }
}

Required Methods§

source

fn class(&self) -> SpkClass

source

fn keys<'a>(&'a self) -> impl Iterator<Item = &'a K>
where K: 'a,

source

fn vars<'a>(&'a self) -> impl Iterator<Item = &'a V>
where V: 'a,

source

fn xpubs(&self) -> impl Iterator<Item = &XpubAccount>

source

fn legacy_keyset(&self, terminal: Terminal) -> IndexMap<LegacyPk, KeyOrigin>

source

fn xonly_keyset(&self, terminal: Terminal) -> IndexMap<XOnlyPk, TapDerivation>

source

fn legacy_witness( &self, keysigs: HashMap<&KeyOrigin, LegacyKeySig>, ) -> Option<(SigScript, Witness)>

source

fn taproot_witness( &self, keysigs: HashMap<&KeyOrigin, TaprootKeySig>, ) -> Option<Witness>

Provided Methods§

source

fn is_taproot(&self) -> bool

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<K> Descriptor<K> for StdDescr<K>
where K: DeriveSet<Compr = K, XOnly = K> + DeriveCompr + DeriveXOnly, StdDescr<K>: Derive<DerivedScript>,

source§

impl<K> Descriptor<K> for TrKey<K>
where K: DeriveXOnly,

source§

impl<K> Descriptor<K> for Wpkh<K>
where K: DeriveCompr,