#[repr(u8)]pub enum ConvertInfo {
Bare = 0,
Hashed = 1,
NestedV0 = 2,
SegWitV0 = 3,
Taproot = 4,
}Expand description
Descriptor category specifies way how the scriptPubkey is structured
Variants§
Bare = 0
Bare descriptors: pk and bare bitcoin_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 = 1
Hash-based descriptors: pkh for public key hashes and BIP-16 sh for
P2SH bitcoin_scripts.
We hash public key or script and use non-SegWit scriptPubkey
encoding, i.e. P2PKH or P2SH with corresponding non-segwit
transaction input scriptSig containing copy of crate::LockScript
in redeemScript field
NestedV0 = 2
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 crate::RedeemScript in scriptSig
transaction input field, while the original public key or
crate::WitnessScript are stored in witness. scriptPubkey
contains a normal P2SH composed agains the redeemScript from
scriptSig (P2SH-P2WPKH and P2SH-P2WSH variants).
This type works with only with witness version v0, i.e. not applicable for Taproot.
SegWitV0 = 3
Native SegWit descriptors: wpkh for public keys and wsh for
bitcoin_scripts
We produce either P2WPKH or P2WSH output and use witness field
in transaction input to store the original crate::LockScript or the
public key
Taproot = 4
Native Taproot descriptors: taproot
Implementations§
Source§impl ConvertInfo
impl ConvertInfo
Trait Implementations§
Source§impl Clone for ConvertInfo
impl Clone for ConvertInfo
Source§fn clone(&self) -> ConvertInfo
fn clone(&self) -> ConvertInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more