pub struct Account {
pub public_key: PublicKey,
pub address: Addr,
/* private fields */
}Fields§
§public_key: PublicKey§address: AddrImplementations§
Source§impl Account
impl Account
Sourcepub fn sign(&self, message_hash: Vec<u8>) -> Signature
pub fn sign(&self, message_hash: Vec<u8>) -> Signature
Sign the message hash with ECDSA
use message_hash to convert string to 32-byte hash or use custom implementation
Sourcepub fn message_hash(message: String) -> Vec<u8> ⓘ
pub fn message_hash(message: String) -> Vec<u8> ⓘ
Create 32-byte hash of the message
This is a default implementation to create 32-byte hash of the message
pub fn public_key_base64(&self) -> String
Trait Implementations§
impl Eq for Account
impl StructuralPartialEq for Account
Auto Trait Implementations§
impl Freeze for Account
impl RefUnwindSafe for Account
impl Send for Account
impl Sync for Account
impl Unpin for Account
impl UnwindSafe for Account
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more