pub struct BlindingFactor(_);

Implementations§

source§

impl BlindingFactor

source

pub fn from_secret_key(skey: SecretKey) -> BlindingFactor

source

pub fn from_slice(data: &[u8]) -> BlindingFactor

source

pub fn zero() -> BlindingFactor

source

pub fn is_zero(&self) -> bool

source

pub fn rand(secp: &Secp256k1) -> BlindingFactor

source

pub fn from_hex(hex: &str) -> Result<BlindingFactor, Error>

source

pub fn secret_key(&self, secp: &Secp256k1) -> Result<SecretKey, Error>

source

pub fn add( &self, other: &BlindingFactor, secp: &Secp256k1 ) -> Result<BlindingFactor, Error>

source

pub fn split( &self, blind_1: &BlindingFactor, secp: &Secp256k1 ) -> Result<BlindingFactor, Error>

Split a blinding_factor (aka secret_key) into a pair of blinding_factors. We use one of these (k1) to sign the tx_kernel (k1G) and the other gets aggregated in the block_header as the “offset”. This prevents an actor from being able to sum a set of inputs, outputs and kernels from a block to identify and reconstruct a particular tx from a block. You would need both k1, k2 to do this.

Trait Implementations§

source§

impl AsRef<[u8]> for BlindingFactor

source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for BlindingFactor

source§

fn clone(&self) -> BlindingFactor

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlindingFactor

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for BlindingFactor

source§

fn default() -> BlindingFactor

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for BlindingFactor

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq<BlindingFactor> for BlindingFactor

source§

fn eq(&self, other: &BlindingFactor) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for BlindingFactor

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Zeroize for BlindingFactor

source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.
source§

impl StructuralPartialEq for BlindingFactor

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneAny for Twhere T: Any + Clone,

§

fn clone_any(&self) -> Box<dyn CloneAny, Global>

§

fn clone_any_send(&self) -> Box<dyn CloneAny + Send, Global>where T: Send,

§

fn clone_any_sync(&self) -> Box<dyn CloneAny + Sync, Global>where T: Sync,

§

fn clone_any_send_sync(&self) -> Box<dyn CloneAny + Send + Sync, Global>where T: Send + Sync,

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToHex for Twhere T: AsRef<[u8]>,

source§

fn to_hex(&self) -> String

convert to hex
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> DebugAny for Twhere T: Any + Debug,

source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,

§

impl<T> UnsafeAny for Twhere T: Any,