[][src]Enum elements::dynafed::Params

pub enum Params {
    Null,
    Compact {
        signblockscript: Script,
        signblock_witness_limit: u32,
        elided_root: Midstate,
    },
    Full {
        signblockscript: Script,
        signblock_witness_limit: u32,
        fedpeg_program: Script,
        fedpegscript: Vec<u8>,
        extension_space: Vec<Vec<u8>>,
    },
}

Dynamic federations paramaters, as encoded in a block header

Variants

Null

Null entry, used to signal "no vote" as a proposal

Compact

Compact params where the fedpeg data and extension space are not included, and are assumed to be equal to the values from the previous block

Fields of Compact

signblockscript: Script

"scriptPubKey" used for block signing

signblock_witness_limit: u32

Maximum, in bytes, of the size of a blocksigning witness

elided_root: Midstate

Merkle root of extra data

Full

Full dynamic federations parameters

Fields of Full

signblockscript: Script

"scriptPubKey" used for block signing

signblock_witness_limit: u32

Maximum, in bytes, of the size of a blocksigning witness

fedpeg_program: Script

Untweaked scriptPubKey used for pegins

fedpegscript: Vec<u8>

For v0 fedpeg programs, the witness script of the untweaked pegin address. For future versions, this data has no defined meaning and will be considered "anyone can spend".

extension_space: Vec<Vec<u8>>

"Extension space" used by Liquid for PAK key entries

Methods

impl Params[src]

pub fn is_null(&self) -> bool[src]

Check whether this is Params::Null.

pub fn is_compact(&self) -> bool[src]

Check whether this is Params::Compact.

pub fn is_full(&self) -> bool[src]

Check whether this is Params::Full.

pub fn signblockscript(&self) -> Option<&Script>[src]

Get the signblockscript. Is None for [Null] params.

pub fn signblock_witness_limit(&self) -> Option<u32>[src]

Get the signblock_witness_limit. Is None for [Null] params.

pub fn fedpeg_program(&self) -> Option<&Script>[src]

Get the fedpeg_program. Is None for non-[Full] params.

pub fn fedpegscript(&self) -> Option<&Vec<u8>>[src]

Get the fedpegscript. Is None for non-[Full] params.

pub fn extension_space(&self) -> Option<&Vec<Vec<u8>>>[src]

Get the extension_space. Is None for non-[Full] params.

pub fn elided_root(&self) -> Option<&Midstate>[src]

Get the elided_root. Is None for non-[Compact] params.

pub fn calculate_root(&self) -> Midstate[src]

Calculate the root of this Params.

pub fn into_compact(self) -> Option<Params>[src]

Turns paramers into compact parameters. This returns self for compact params and None for null ones.

Trait Implementations

impl Clone for Params[src]

impl Debug for Params[src]

impl Decodable for Params[src]

impl Encodable for Params[src]

impl Eq for Params[src]

impl Hash for Params[src]

impl PartialEq<Params> for Params[src]

impl StructuralEq for Params[src]

impl StructuralPartialEq for Params[src]

Auto Trait Implementations

impl RefUnwindSafe for Params

impl Send for Params

impl Sync for Params

impl Unpin for Params

impl UnwindSafe for Params

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, 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.