[][src]Enum lnpbp::bp::scripts::script_pubkey::ScriptPubkeyStructure

pub enum ScriptPubkeyStructure {
    KeyChecksig(PublicKey),
    KeyHash(PubkeyHash),
    ScriptHash(ScriptHash),
    Witness(WitnessVersionWitnessProgram),
    OpReturn(Vec<Vec<u8>>),
    Custom(Script),
}

Enum defining standard and providing all required data for script pubkey serialization. This enum is not designed for wallets; it covers only BIPs and Bitcoin Core extra-wallet parts.

If you need enum without attached data (like for functions detecting type of the script pubkey) check ScriptPubkeyFormat.

Variants

KeyChecksig(PublicKey)

Initial standard used by Bitcoin Core (also codenamed "P2PK") that uses uncompressed public key serialization followed with OP_CHECKSIG code

KeyHash(PubkeyHash)

Script pubkey serialization according to widely accepted standard

ScriptHash(ScriptHash)

Script pubkey serialization according to BIP-16

Segwit script pubkey serialization according to BIP-141 https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#Witness_program

OpReturn(Vec<Vec<u8>>)

Outputs containing OP_RETURN serialized according to Bitcoin Core-defined rules as initial OP_RETURN code with any combination of data pushes and numeric constant opcodes (OP_1 to OP_16)

Custom(Script)

Custom (i.e. non-standard) output with arbitrary script

Trait Implementations

impl From<ScriptPubkeyContent> for ScriptPubkeyStructure[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> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,