pub struct OffchainKeypair(/* private fields */);
Expand description
Represents a keypair consisting of an Ed25519 private and public key
Trait Implementations§
Source§impl Clone for OffchainKeypair
impl Clone for OffchainKeypair
Source§fn clone(&self) -> OffchainKeypair
fn clone(&self) -> OffchainKeypair
Returns a copy 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 moreSource§impl ConstantTimeEq for OffchainKeypair
impl ConstantTimeEq for OffchainKeypair
Source§impl Debug for OffchainKeypair
impl Debug for OffchainKeypair
Source§impl Drop for OffchainKeypair
impl Drop for OffchainKeypair
Source§impl From<&OffchainKeypair> for Keypair
impl From<&OffchainKeypair> for Keypair
Source§fn from(value: &OffchainKeypair) -> Self
fn from(value: &OffchainKeypair) -> Self
Converts to this type from the input type.
Source§impl From<&OffchainKeypair> for PeerId
impl From<&OffchainKeypair> for PeerId
Source§fn from(value: &OffchainKeypair) -> Self
fn from(value: &OffchainKeypair) -> Self
Converts to this type from the input type.
Source§impl From<&OffchainKeypair> for Scalar
impl From<&OffchainKeypair> for Scalar
Source§fn from(value: &OffchainKeypair) -> Self
fn from(value: &OffchainKeypair) -> Self
Transforms the secret to be equivalent with the EdDSA public key used for signing. This is required so that the secret keys used to generate Sphinx shared secrets are corresponding to the public keys we obtain from the Ed25519 peer ids.
Source§impl Keypair for OffchainKeypair
impl Keypair for OffchainKeypair
Source§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
Source§type Public = OffchainPublicKey
type Public = OffchainPublicKey
Represents the type of the public key
Source§fn from_secret(bytes: &[u8]) -> Result<Self>
fn from_secret(bytes: &[u8]) -> Result<Self>
Creates a keypair from the given secret key.
Source§fn secret(&self) -> &SecretValue<U32>
fn secret(&self) -> &SecretValue<U32>
Returns the private (secret) part of the keypair
Auto Trait Implementations§
impl Freeze for OffchainKeypair
impl RefUnwindSafe for OffchainKeypair
impl Send for OffchainKeypair
impl Sync for OffchainKeypair
impl Unpin for OffchainKeypair
impl UnwindSafe for OffchainKeypair
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