[][src]Trait lnpbp::bp::scripts::descriptor::MaybeTweakPair

pub trait MaybeTweakPair {
    fn has_tweak(&self) -> bool;
fn as_tweaking_factor(&self) -> Option<&SecretKey>;
fn as_descriptor_public_key(&self) -> &DescriptorPublicKey;
fn into_tweaking_factor(self) -> Option<SecretKey>;
fn into_descriptor_public_key(self) -> DescriptorPublicKey;
fn to_tweaked_public_key(&self, index: Option<u32>) -> PublicKey; }

Required methods

fn has_tweak(&self) -> bool

Returns whether key has embedded tweaking information

fn as_tweaking_factor(&self) -> Option<&SecretKey>

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

fn as_descriptor_public_key(&self) -> &DescriptorPublicKey

Returns reference to an untweaked DescriptorPublicKey value

fn into_tweaking_factor(self) -> Option<SecretKey>

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

fn into_descriptor_public_key(self) -> DescriptorPublicKey

Converts into an untweaked DescriptorPublicKey value

fn to_tweaked_public_key(&self, index: Option<u32>) -> PublicKey

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

Loading content...

Implementors

impl MaybeTweakPair for PubkeyWithTweak[src]

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

Returns whether key has embedded tweaking information

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

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

Returns reference to an untweaked DescriptorPublicKey value

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

fn into_descriptor_public_key(self) -> DescriptorPublicKey[src]

Converts into an untweaked DescriptorPublicKey value

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

Loading content...