pub struct Signer(pub SecretKey);
Tuple Fields§
§0: SecretKey
Implementations§
Source§impl Signer
impl Signer
pub fn from_mnemonic(mnemonic: &Mnemonic, password: &str) -> Result<Self>
pub fn from_bytes(bs: &[u8]) -> Result<Self>
pub fn verifier_from_bytes(bs: &[u8]) -> Result<Verifier>
pub fn signature_from_bytes(bs: &[u8]) -> Result<Signature>
pub fn pubkey_from_bytes(bs: &[u8]) -> Result<PublicKey>
pub fn pubkey_to_address(pubk: &PublicKey) -> Result<String>
pub fn address(&self) -> Result<String>
pub fn pubkey_from_address(address: &str) -> Result<PublicKey>
pub fn to_bytes(&self) -> Result<Vec<u8>>
pub fn new() -> Result<Self>
pub fn secret_key(&self) -> &SecretKey
pub fn public_key(&self) -> PublicKey
pub fn stringify(&self) -> Result<String>
pub fn stringify_public_key(&self) -> Result<String>
pub fn sign_msg(&self, msg: &[u8], context: &str) -> Result<Signature>
pub fn verify_msg( &self, msg: &[u8], context: &str, signature: &Signature, ) -> Result<()>
Trait Implementations§
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