pub struct Ed25519Key(/* private fields */);Expand description
A ED25519 Secret key
Note: the inner format is actually an ED25519 keypair
It can turns into a Ed25519PublicKey by using the .to_public() method
Implementations§
Source§impl Ed25519Key
impl Ed25519Key
pub fn sign(&self, data: &[u8]) -> Ed25519Signature
pub fn to_public(&self) -> Ed25519PublicKey
pub fn from_bytes(secret_key: &[u8; 32]) -> Self
pub fn to_witness(&self, hash: &TxHash) -> VkeyWitness
pub fn to_bytes(&self) -> [u8; 32]
Trait Implementations§
Source§impl Clone for Ed25519Key
impl Clone for Ed25519Key
Source§fn clone(&self) -> Ed25519Key
fn clone(&self) -> Ed25519Key
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 moreAuto Trait Implementations§
impl Freeze for Ed25519Key
impl RefUnwindSafe for Ed25519Key
impl Send for Ed25519Key
impl Sync for Ed25519Key
impl Unpin for Ed25519Key
impl UnwindSafe for Ed25519Key
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