[−][src]Struct ethkey::EthAccount
An Ethereum Account keys with store.
Allows to generate a new key pair and save it to disk as well as read existing keyfile.
Provides sign
and verify
operations for ECC on curve Secp256k1.
Methods
impl EthAccount
[src]
pub fn public(&self) -> &PublicKey
[src]
public key
pub fn address(&self) -> &Address
[src]
Ethereum address
pub fn sign(&self, msg: &Message) -> Result<Signature>
[src]
signs given message with self secret key
pub fn verify(&self, sig: &Signature, msg: &Message) -> Result<bool>
[src]
verifies signature for given message and self public key
pub fn load_or_generate<P, W>(file_path: P, password: W) -> Result<Box<Self>> where
P: AsRef<Path>,
W: Into<Password>,
[src]
P: AsRef<Path>,
W: Into<Password>,
reads keys from disk or generates new ones and stores to disk; password needed
pub fn change_password<W: Into<Password>>(&self, new_password: W) -> Result<()>
[src]
stores keys on disk with changed password
Trait Implementations
impl Display for EthAccount
[src]
impl Debug for EthAccount
[src]
Auto Trait Implementations
impl Send for EthAccount
impl Sync for EthAccount
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,