pub enum DeriveJunction {
Soft([u8; 32]),
Hard([u8; 32]),
}
Expand description
A since derivation junction description. It is the single parameter used when creating
a new secret key from an existing secret key and, in the case of SoftRaw
and SoftIndex
a new public key from an existing public key.
Variants§
Soft([u8; 32])
Soft (vanilla) derivation. Public keys have a correspondent derivation.
Hard([u8; 32])
Hard (“hardened”) derivation. Public keys do not have a correspondent derivation.
Implementations§
source§impl DeriveJunction
impl DeriveJunction
sourcepub fn soften(self) -> DeriveJunction
pub fn soften(self) -> DeriveJunction
Consume self to return a soft derive junction with the same chain code.
sourcepub fn harden(self) -> DeriveJunction
pub fn harden(self) -> DeriveJunction
Consume self to return a hard derive junction with the same chain code.
sourcepub fn soft<T>(index: T) -> DeriveJunctionwhere
T: Encode,
pub fn soft<T>(index: T) -> DeriveJunctionwhere
T: Encode,
Create a new soft (vanilla) DeriveJunction from a given, encodable, value.
If you need a hard junction, use hard()
.
sourcepub fn hard<T>(index: T) -> DeriveJunctionwhere
T: Encode,
pub fn hard<T>(index: T) -> DeriveJunctionwhere
T: Encode,
Create a new hard (hardened) DeriveJunction from a given, encodable, value.
If you need a soft junction, use soft()
.
sourcepub fn unwrap_inner(self) -> [u8; 32]
pub fn unwrap_inner(self) -> [u8; 32]
Consume self to return the chain code.
Trait Implementations§
source§impl Clone for DeriveJunction
impl Clone for DeriveJunction
source§fn clone(&self) -> DeriveJunction
fn clone(&self) -> DeriveJunction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DeriveJunction
impl Debug for DeriveJunction
source§impl Decode for DeriveJunction
impl Decode for DeriveJunction
source§fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<DeriveJunction, Error>where
__CodecInputEdqy: Input,
fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<DeriveJunction, Error>where
__CodecInputEdqy: Input,
source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
source§impl Encode for DeriveJunction
impl Encode for DeriveJunction
source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
source§fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
source§impl<T> From<T> for DeriveJunction
impl<T> From<T> for DeriveJunction
source§fn from(j: T) -> DeriveJunction
fn from(j: T) -> DeriveJunction
source§impl Hash for DeriveJunction
impl Hash for DeriveJunction
source§impl PartialEq for DeriveJunction
impl PartialEq for DeriveJunction
source§fn eq(&self, other: &DeriveJunction) -> bool
fn eq(&self, other: &DeriveJunction) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for DeriveJunction
impl EncodeLike for DeriveJunction
impl Eq for DeriveJunction
impl StructuralPartialEq for DeriveJunction
Auto Trait Implementations§
impl Freeze for DeriveJunction
impl RefUnwindSafe for DeriveJunction
impl Send for DeriveJunction
impl Sync for DeriveJunction
impl Unpin for DeriveJunction
impl UnwindSafe for DeriveJunction
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.