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

#[non_exhaustive]pub enum ScriptEncodeData {
    SinglePubkey,
    LockScript(LockScript),
    Taproot(Hash),
}

Structure keeping the minimum of information (bytewise) required to verify deterministic bitcoin commitment given only the transaction source, its fee and protocol-specific constants. It is a part of the Proof 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.
SinglePubkey

Public key. Since we keep the original public key as a part of a proof, and value of the tweaked key can be reconstructed with DBC source data and the original pubkey, so we do not need to keep any additional data here).

LockScript(LockScript)

Any output containing script information, aside from OP_RETURN outputs (using [ScriptInfo::SimplePubkey]) and tapscript. We have to store full original script in it's byte form since when the deteministic bitcoin commitment is verified, the output may be still unspent and we will not be able to reconstruct the script without this data kept in the client-validated part.

Taproot(Hash)

Taproot-based outputs. We need to keep only the hash of the taprscript merkle tree root.

Trait Implementations

impl Clone for ScriptEncodeData[src]

impl Debug for ScriptEncodeData[src]

impl Default for ScriptEncodeData[src]

impl Display for ScriptEncodeData[src]

impl Eq for ScriptEncodeData[src]

impl Hash for ScriptEncodeData[src]

impl PartialEq<ScriptEncodeData> for ScriptEncodeData[src]

impl StrictDecode for ScriptEncodeData[src]

impl StrictEncode for ScriptEncodeData[src]

impl StructuralEq for ScriptEncodeData[src]

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