pub struct Signer { /* private fields */ }
Expand description
Signer derives keys from a mnemonic.
Implementations§
Source§impl Signer
impl Signer
Sourcepub fn new(mnemonic: &Mnemonic, password: &str) -> Result<Self>
pub fn new(mnemonic: &Mnemonic, password: &str) -> Result<Self>
Creates a new signer from a mnemonic and password.
Sourcepub fn master_key(&self, algorithm: Algorithm) -> Result<&DerivedSecretKey>
pub fn master_key(&self, algorithm: Algorithm) -> Result<&DerivedSecretKey>
Derives a master key from a mnemonic.
Sourcepub fn bip44_account(
&self,
algorithm: Algorithm,
coin: u32,
account: u32,
) -> Result<DerivedSecretKey>
pub fn bip44_account( &self, algorithm: Algorithm, coin: u32, account: u32, ) -> Result<DerivedSecretKey>
Derives a bip44 key from a mnemonic.
Auto Trait Implementations§
impl Freeze for Signer
impl RefUnwindSafe for Signer
impl Send for Signer
impl Sync for Signer
impl Unpin for Signer
impl UnwindSafe for Signer
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