Struct ChainKeypair
pub struct ChainKeypair(SecretValue<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>, PublicKey);Expand description
Represents a keypair consisting of a secp256k1 private and public key
Tuple Fields§
§0: SecretValue<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>§1: PublicKeyTrait Implementations§
§impl AsRef<Address> for ChainKeypair
impl AsRef<Address> for ChainKeypair
§impl Clone for ChainKeypair
impl Clone for ChainKeypair
§fn clone(&self) -> ChainKeypair
fn clone(&self) -> ChainKeypair
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl ConstantTimeEq for ChainKeypair
impl ConstantTimeEq for ChainKeypair
§impl Debug for ChainKeypair
impl Debug for ChainKeypair
§impl From<&ChainKeypair> for Address
impl From<&ChainKeypair> for Address
§fn from(value: &ChainKeypair) -> Address
fn from(value: &ChainKeypair) -> Address
Converts to this type from the input type.
§impl Keypair for ChainKeypair
impl Keypair for ChainKeypair
§type SecretLen = UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>
type SecretLen = UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>
Represents the type of the private (secret) key
§fn random() -> ChainKeypair
fn random() -> ChainKeypair
Generates a new random keypair.
§fn from_secret(bytes: &[u8]) -> Result<ChainKeypair, CryptoError>
fn from_secret(bytes: &[u8]) -> Result<ChainKeypair, CryptoError>
Creates a keypair from the given secret key.
§fn secret(
&self,
) -> &SecretValue<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>
fn secret( &self, ) -> &SecretValue<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>
Returns the private (secret) part of the keypair
§fn public(&self) -> &<ChainKeypair as Keypair>::Public
fn public(&self) -> &<ChainKeypair as Keypair>::Public
Returns the public part of the keypair
Auto Trait Implementations§
impl Freeze for ChainKeypair
impl RefUnwindSafe for ChainKeypair
impl Send for ChainKeypair
impl Sync for ChainKeypair
impl Unpin for ChainKeypair
impl UnwindSafe for ChainKeypair
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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 more