#[non_exhaustive]pub enum DescriptorType {
OpReturn,
P2pkh,
P2sh,
P2wpkh,
P2wsh,
P2tr,
}
Expand description
The type tag of a Descriptor
.
This is the first byte of the payload.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
OpReturn
OP_RETURN
payload.
P2pkh
P2PKH hash.
It is a 20-byte hash of a public key, that is first hashed with SHA-256, followed by RIPEMD-160.
P2sh
P2SH hash.
It is a 20-byte hash of a custom locking script, that is first hashed with SHA-256, followed by RIPEMD-160.
P2wpkh
P2WPKH hash.
It is a 20-byte hash of a public key, that is first hashed with SHA-256, followed by RIPEMD-160.
P2wsh
P2WSH hash.
It is a 32-byte hash of a custom locking script hashed with SHA-256.
P2tr
P2TR X-only public key.
It is a 32-byte public key. The key might be tweaked by a Merkle root hash that represents the underlying taptree of script spending conditions.
Implementations§
Trait Implementations§
Source§impl Clone for DescriptorType
impl Clone for DescriptorType
Source§fn clone(&self) -> DescriptorType
fn clone(&self) -> DescriptorType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DescriptorType
impl Debug for DescriptorType
Source§impl Display for DescriptorType
impl Display for DescriptorType
Source§impl PartialEq for DescriptorType
impl PartialEq for DescriptorType
impl Copy for DescriptorType
impl Eq for DescriptorType
impl StructuralPartialEq for DescriptorType
Auto Trait Implementations§
impl Freeze for DescriptorType
impl RefUnwindSafe for DescriptorType
impl Send for DescriptorType
impl Sync for DescriptorType
impl Unpin for DescriptorType
impl UnwindSafe for DescriptorType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more