pub struct BSM {}
Expand description
Bitcoin Signed Message
Implementations§
Source§impl BSM
impl BSM
Sourcepub fn is_valid_message(
message: &[u8],
signature: &Signature,
address: &P2PKHAddress,
) -> bool
pub fn is_valid_message( message: &[u8], signature: &Signature, address: &P2PKHAddress, ) -> bool
Sign a message with the intention of verifying with this same Address. Used when using Bitcoin Signed Messages
Returns boolean
Source§impl BSM
impl BSM
pub fn verify_message( message: &[u8], signature: &Signature, address: &P2PKHAddress, ) -> Result<bool, BSVErrors>
pub fn sign_message( priv_key: &PrivateKey, message: &[u8], ) -> Result<Signature, BSVErrors>
pub fn sign_message_with_k( priv_key: &PrivateKey, ephemeral_key: &PrivateKey, message: &[u8], ) -> Result<Signature, BSVErrors>
Auto Trait Implementations§
impl Freeze for BSM
impl RefUnwindSafe for BSM
impl Send for BSM
impl Sync for BSM
impl Unpin for BSM
impl UnwindSafe for BSM
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