Enum wallet::descriptor::Category[][src]

#[non_exhaustive]
#[repr(u8)]
pub enum Category {
    Bare,
    Hashed,
    Nested,
    SegWit,
    Taproot,
}

Descriptor category specifies way how the scriptPubkey is structured

Variants (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.
Bare

Bare descriptors: pk and bare scripts, including OP_RETURNs.

The script or public key gets right into scriptPubkey, i.e. as P2PK (for a public key) or as custom script (mostly used for OP_RETURN)

Hashed

Hash-based descriptors: pkh for public key hashes and BIP-16 sh for P2SH scripts.

We hash public key or script and use non-SegWit scriptPubkey encoding, i.e. P2PKH or P2SH with corresponding non-segwit transaction input sigScript containing copy of [LockScript] in redeemScript field

Nested

SegWit descriptors for legacy wallets defined in BIP 141 as P2SH nested types https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#P2WPKH_nested_in_BIP16_P2SH: sh(wpkh) and sh(wsh)

Compatibility variant for SegWit outputs when the SegWit version and program are encoded as RedeemScript in sigScript transaction input field, while the original public key or WitnessScript are stored in witness. scriptPubkey contains a normal P2SH composed agains the redeemScript from sigScript (P2SH-P2WPKH and P2SH-P2WSH variants).

This type works with only with witness version v0, i.e. not applicable for Taproot.

SegWit

Native SegWit descriptors: wpkh for public keys and wsh for scripts

We produce either P2WPKH or P2WSH output and use witness field in transaction input to store the original [LockScript] or the public key

Taproot

Native Taproot descriptors: taproot

Implementations

impl Category[src]

Trait Implementations

impl Clone for Category[src]

impl Copy for Category[src]

impl Debug for Category[src]

impl Deduce for Category[src]

impl Display for Category[src]

impl Eq for Category[src]

impl From<Category> for ContentType[src]

impl<Pk> From<Descriptor<Pk>> for Category where
    Pk: MiniscriptKey
[src]

impl From<FullType> for Category[src]

impl Hash for Category[src]

impl Ord for Category[src]

impl PartialEq<Category> for Category[src]

impl PartialOrd<Category> for Category[src]

impl StrictDecode for Category[src]

impl StrictEncode for Category[src]

impl StructuralEq for Category[src]

impl StructuralPartialEq for Category[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.