pub struct MockApi { /* private fields */ }
Trait Implementations§
source§impl Api for MockApi
impl Api for MockApi
source§fn addr_validate(&self, input: &str) -> Result<Addr, StdError>
fn addr_validate(&self, input: &str) -> Result<Addr, StdError>
Takes a human readable address and validates if it is valid.
If it the validation succeeds, a
Addr
containing the same data as the input is returned. Read moresource§fn addr_canonicalize(&self, input: &str) -> Result<CanonicalAddr, StdError>
fn addr_canonicalize(&self, input: &str) -> Result<CanonicalAddr, StdError>
Takes a human readable address and returns a canonical binary representation of it.
This can be used when a compact representation is needed. Read more
source§fn addr_humanize(&self, canonical: &CanonicalAddr) -> Result<Addr, StdError>
fn addr_humanize(&self, canonical: &CanonicalAddr) -> Result<Addr, StdError>
Takes a canonical address and returns a human readble address.
This is the inverse of
addr_canonicalize
.source§fn secp256k1_verify(
&self,
message_hash: &[u8],
signature: &[u8],
public_key: &[u8]
) -> Result<bool, VerificationError>
fn secp256k1_verify( &self, message_hash: &[u8], signature: &[u8], public_key: &[u8] ) -> Result<bool, VerificationError>
ECDSA secp256k1 signature verification. Read more
source§fn secp256k1_recover_pubkey(
&self,
message_hash: &[u8],
signature: &[u8],
recovery_param: u8
) -> Result<Vec<u8, Global>, RecoverPubkeyError>
fn secp256k1_recover_pubkey( &self, message_hash: &[u8], signature: &[u8], recovery_param: u8 ) -> Result<Vec<u8, Global>, RecoverPubkeyError>
Recovers a public key from a message hash and a signature. Read more
source§fn ed25519_verify(
&self,
message: &[u8],
signature: &[u8],
public_key: &[u8]
) -> Result<bool, VerificationError>
fn ed25519_verify( &self, message: &[u8], signature: &[u8], public_key: &[u8] ) -> Result<bool, VerificationError>
EdDSA ed25519 signature verification. Read more
source§fn ed25519_batch_verify(
&self,
messages: &[&[u8]],
signatures: &[&[u8]],
public_keys: &[&[u8]]
) -> Result<bool, VerificationError>
fn ed25519_batch_verify( &self, messages: &[&[u8]], signatures: &[&[u8]], public_keys: &[&[u8]] ) -> Result<bool, VerificationError>
Performs batch Ed25519 signature verification. Read more
source§fn debug(&self, message: &str)
fn debug(&self, message: &str)
Emits a debugging message that is handled depending on the environment (typically printed to console or ignored).
Those messages are not persisted to chain.
source§fn secp256k1_sign(
&self,
message: &[u8],
private_key: &[u8]
) -> Result<Vec<u8, Global>, SigningError>
fn secp256k1_sign( &self, message: &[u8], private_key: &[u8] ) -> Result<Vec<u8, Global>, SigningError>
ECDSA secp256k1 signing. Read more
impl Copy for MockApi
Auto Trait Implementations§
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