pub struct MockApi { /* private fields */ }
Trait Implementations§
Source§impl Api for MockApi
impl Api for MockApi
Source§fn addr_validate(&self, human: &str) -> StdResult<Addr>
fn addr_validate(&self, human: &str) -> StdResult<Addr>
Takes a human readable address and validates if it’s correctly formatted.
If it succeeds, a Addr is returned. Read more
Source§fn addr_canonicalize(&self, human: &str) -> StdResult<CanonicalAddr>
fn addr_canonicalize(&self, human: &str) -> StdResult<CanonicalAddr>
Takes a human readable address and returns a canonical binary representation of it.
This can be used when a compact fixed length representation is needed.
Source§fn addr_humanize(&self, canonical: &CanonicalAddr) -> StdResult<Addr>
fn addr_humanize(&self, canonical: &CanonicalAddr) -> StdResult<Addr>
Takes a canonical address and returns a human readble address.
This is the inverse of
addr_canonicalize
.fn secp256k1_verify( &self, message_hash: &[u8], signature: &[u8], public_key: &[u8], ) -> Result<bool, VerificationError>
fn secp256k1_recover_pubkey( &self, message_hash: &[u8], signature: &[u8], recovery_param: u8, ) -> Result<Vec<u8>, RecoverPubkeyError>
fn ed25519_verify( &self, message: &[u8], signature: &[u8], public_key: &[u8], ) -> Result<bool, VerificationError>
fn ed25519_batch_verify( &self, messages: &[&[u8]], signatures: &[&[u8]], public_keys: &[&[u8]], ) -> Result<bool, VerificationError>
impl Copy for MockApi
Auto Trait Implementations§
impl Freeze for MockApi
impl RefUnwindSafe for MockApi
impl Send for MockApi
impl Sync for MockApi
impl Unpin for MockApi
impl UnwindSafe for MockApi
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