[−][src]Crate ethkey
Ethereum keys management supporting keystores in formats used by geth, parity and pyethereum.
Features
- random key pair generation
- key serialization/deserialization
- keystore password change
- signing and verification
Usage
[dependencies]
ethkey = "0.2"
Example
use ethkey::prelude::*; fn main() { let key = EthAccount::load_or_generate("/path/to/keystore", "passwd") .expect("should load or generate new eth key"); println!("{:?}", key.address()) }
Modules
prelude | A "prelude" for users of the |
Structs
Address | Ethereum address |
Error | The Error type. |
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 |
PublicKey | Represents public part of the Ethereum key. |
SecretKey | Represents the private part of the Ethereum key |
Signature | Message signature |
Enums
ErrorKind | The kind of an error. |
Constants
KEYSTORE_VERSION | |
KEY_ITERATIONS | HMAC fn iteration count; a compromise between security and performance |
Traits
ResultExt | Additional methods for |
Type Definitions
Message | 32 bytes Message for signing and verification |
Password | Password. It is overwritten with zeros after memory is released. |
Result | Convenient wrapper around |