pub struct Keystore {
pub id: String,
pub address: String,
/* private fields */
}Expand description
An encrypted Ethereum keystore (V3 format).
Fields correspond to the JSON keystore standard.
Fields§
§id: StringUUID for this keystore.
address: StringEIP-55 checksummed address.
Implementations§
Source§impl Keystore
impl Keystore
Sourcepub fn encrypt(
private_key: &[u8],
password: &[u8],
params: &ScryptParams,
) -> Result<Self, SignerError>
pub fn encrypt( private_key: &[u8], password: &[u8], params: &ScryptParams, ) -> Result<Self, SignerError>
Encrypt a private key into a keystore.
§Arguments
private_key— 32-byte private keypassword— User password for encryptionparams— Scrypt parameters (useScryptParams::default()for standard)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Keystore
impl RefUnwindSafe for Keystore
impl Send for Keystore
impl Sync for Keystore
impl Unpin for Keystore
impl UnsafeUnpin for Keystore
impl UnwindSafe for Keystore
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