pub struct DalekKeyPair(/* private fields */);Implementations§
Source§impl DalekKeyPair
impl DalekKeyPair
Sourcepub fn from_secret_seed(data: &str) -> Result<DalekKeyPair>
pub fn from_secret_seed(data: &str) -> Result<DalekKeyPair>
Create the key pair from the secret seed, e.g. SDAKFNYEIAORZKKCYRILFQKLLOCNPL5SWJ3YY5NM3ZH6GJSZGXHZEPQS.
Sourcepub fn random() -> Result<DalekKeyPair>
pub fn random() -> Result<DalekKeyPair>
Create a random key pair.
Sourcepub fn from_network(network: &Network) -> Result<DalekKeyPair>
pub fn from_network(network: &Network) -> Result<DalekKeyPair>
Create a key pair from the network passphrase.
Sourcepub fn from_seed_bytes(data: &[u8]) -> Result<DalekKeyPair>
pub fn from_seed_bytes(data: &[u8]) -> Result<DalekKeyPair>
Create a key pair from raw bytes.
Sourcepub fn secret_key(&self) -> &SecretKey
pub fn secret_key(&self) -> &SecretKey
Return the secret key.
Sourcepub fn public_key(&self) -> PublicKey
pub fn public_key(&self) -> PublicKey
Return the public key
pub fn sign(&self, msg: &[u8]) -> Signature
pub fn verify(&self, sig: &Signature, msg: &[u8]) -> bool
Trait Implementations§
Source§impl AsRef<KeyPair<SecretKey, VerifyingKey>> for DalekKeyPair
impl AsRef<KeyPair<SecretKey, VerifyingKey>> for DalekKeyPair
Source§impl Debug for DalekKeyPair
impl Debug for DalekKeyPair
Auto Trait Implementations§
impl Freeze for DalekKeyPair
impl RefUnwindSafe for DalekKeyPair
impl Send for DalekKeyPair
impl Sync for DalekKeyPair
impl Unpin for DalekKeyPair
impl UnwindSafe for DalekKeyPair
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