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,
§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,
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where I: Input,
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
source§impl Encode for DeriveJunction
impl Encode for DeriveJunction
source§fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode_to<__CodecOutputEdqy>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy )where __CodecOutputEdqy: Output + ?Sized,
§fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
fn using_encoded<R, F>(&self, f: F) -> Rwhere F: FnOnce(&[u8]) -> R,
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
source§impl<T> From<T> for DeriveJunctionwhere
T: AsRef<str>,
impl<T> From<T> for DeriveJunctionwhere T: AsRef<str>,
source§fn from(j: T) -> DeriveJunction
fn from(j: T) -> DeriveJunction
source§impl Hash for DeriveJunction
impl Hash for DeriveJunction
source§impl PartialEq<DeriveJunction> for DeriveJunction
impl PartialEq<DeriveJunction> 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<DeriveJunction> for DeriveJunction
impl Eq for DeriveJunction
impl StructuralEq for DeriveJunction
impl StructuralPartialEq for DeriveJunction
Auto Trait Implementations§
impl RefUnwindSafe for DeriveJunction
impl Send for DeriveJunction
impl Sync for DeriveJunction
impl Unpin for DeriveJunction
impl UnwindSafe for DeriveJunction
Blanket Implementations§
§impl<T> DecodeAll for Twhere
T: Decode,
impl<T> DecodeAll for Twhere T: Decode,
§fn decode_all(input: &mut &[u8]) -> Result<T, Error>
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Self
and consume all of the given input data. Read more§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere T: Decode,
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,
§impl<T> KeyedVec for Twhere
T: Codec,
impl<T> KeyedVec for Twhere T: Codec,
§impl<T> Pointable for T
impl<T> Pointable 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
.