pub struct KeyPair { /* private fields */ }
Expand description
secp256k1 key pair
Implementations§
§impl KeyPair
impl KeyPair
pub fn from_secret(secret: Secret) -> Result<KeyPair, Error>
pub fn from_secret(secret: Secret) -> Result<KeyPair, Error>
Create a pair from secret key
pub fn from_secret_slice(slice: &[u8]) -> Result<KeyPair, Error>
pub fn from_keypair(sec: SecretKey, publ: PublicKey) -> KeyPair
pub fn secret(&self) -> &Secret
pub fn public(&self) -> &H512
pub fn address(&self) -> H160
pub fn evm_address(&self) -> H160
Trait Implementations§
impl StructuralPartialEq for KeyPair
Auto Trait Implementations§
impl RefUnwindSafe for KeyPair
impl Send for KeyPair
impl Sync for KeyPair
impl Unpin for KeyPair
impl UnwindSafe for KeyPair
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