[−][src]Trait bdk::descriptor::template::DescriptorTemplate
Trait for descriptor templates that can be built into a full descriptor
Since ToWalletDescriptor
is implemented for any DescriptorTemplate
, they can also be
passed directly to the Wallet
constructor.
Example
use bdk::keys::{KeyError, ToDescriptorKey}; use bdk::miniscript::Legacy; use bdk::template::{DescriptorTemplate, DescriptorTemplateOut}; struct MyP2PKH<K: ToDescriptorKey<Legacy>>(K); impl<K: ToDescriptorKey<Legacy>> DescriptorTemplate for MyP2PKH<K> { fn build(self) -> Result<DescriptorTemplateOut, KeyError> { Ok(bdk::descriptor!(pkh(self.0))?) } }
Required methods
pub fn build(self) -> Result<DescriptorTemplateOut, KeyError>
[src]
Build the complete descriptor