[][src]Enum lnpbp::dbc::spk::ScriptEncodeMethod

#[non_exhaustive]pub enum ScriptEncodeMethod {
    PublicKey,
    PubkeyHash,
    ScriptHash,
    WPubkeyHash,
    WScriptHash,
    ShWPubkeyHash,
    ShWScriptHash,
    Taproot,
    OpReturn,
    Bare,
}

Enum defining how given scriptPubkey is constructed from the script data or a public key. It is similar to Bitcoin Core descriptors, however it does provide additional variants required for RGB, in particular - OpReturn variant with a requirement of public key presence (this key will contain commitment). Because of this we can't use miniscript descriptors as well; also in miniscript, descriptor contains a script source, while here the script source is kept separately and is a part of the Proof, while [DescriptorInfo] is not included into the proof (it can be guessed from a given proof and scriptPubkey and we'd like to preserve space with client-validated data).

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.
PublicKey
PubkeyHash
ScriptHash
WPubkeyHash
WScriptHash
ShWPubkeyHash
ShWScriptHash
Taproot
OpReturn
Bare

Trait Implementations

impl Clone for ScriptEncodeMethod[src]

impl Debug for ScriptEncodeMethod[src]

impl Display for ScriptEncodeMethod[src]

impl Eq for ScriptEncodeMethod[src]

impl Hash for ScriptEncodeMethod[src]

impl PartialEq<ScriptEncodeMethod> for ScriptEncodeMethod[src]

impl StructuralEq for ScriptEncodeMethod[src]

impl StructuralPartialEq for ScriptEncodeMethod[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.