[][src]Enum lnpbp::bp::scripts::descriptor::PubkeyExtended

pub enum PubkeyExtended {
    Native(DescriptorPublicKey),
    Tweaked(PubkeyWithTweak),
}

Public key information that can be used as a part of Bitcoin Core/miniscript descriptors and parsed/serialized into string. Unlike [miniscript::DescriptorPublicKey] type can contain tweaking factor applied to a public key after derication. In string-serialized form this factor can be given as an optional extension after + sign.

Variants

Public key or extended public key without tweaking factor information

Public key or extended public key with tweaking information

Implementations

impl PubkeyExtended[src]

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

Returns whether key has embedded tweaking information

pub fn as_tweaking_factor(&self) -> Option<&SecretKey>[src]

Returns reference to a tweaking factor (in form of Option::Some([secp256k1::SecretKey]) for [PublicKey::Tweaked] variant, or Option::None otherwise

pub fn as_descriptor_public_key(&self) -> &DescriptorPublicKey[src]

Returns reference to an untweaked DescriptorPublicKey value

pub fn into_tweaking_factor(self) -> Option<SecretKey>[src]

Converts into a tweaking factor value (in form of Option::Some([secp256k1::SecretKey]) for [PublicKey::Tweaked] variant, or Option::None otherwise

pub fn into_descriptor_public_key(self) -> DescriptorPublicKey[src]

Converts into an untweaked DescriptorPublicKey value

pub fn to_tweaked_public_key(&self, index: Option<u32>) -> PublicKey[src]

Converts into an untweaked DescriptorPublicKey value, optionally using derivation into a child with index

Trait Implementations

impl Clone for PubkeyExtended[src]

impl Debug for PubkeyExtended[src]

impl Display for PubkeyExtended[src]

impl Eq for PubkeyExtended[src]

impl FromStr for PubkeyExtended[src]

type Err = ParseError

The associated error which can be returned from parsing.

impl Hash for PubkeyExtended[src]

impl MiniscriptKey for PubkeyExtended[src]

type Hash = Self

The associated Hash type with the publicKey

impl Ord for PubkeyExtended[src]

impl PartialEq<PubkeyExtended> for PubkeyExtended[src]

impl PartialOrd<PubkeyExtended> for PubkeyExtended[src]

impl StructuralEq for PubkeyExtended[src]

impl StructuralPartialEq for PubkeyExtended[src]

impl ToPublicKey for PubkeyExtended[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> 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.

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