Struct secret_cosmwasm_std::testing::MockApi
source · [−]pub struct MockApi { /* private fields */ }
Implementations
Trait Implementations
sourceimpl Api for MockApi
impl Api for MockApi
sourcefn canonical_address(&self, human: &HumanAddr) -> StdResult<CanonicalAddr>
fn canonical_address(&self, human: &HumanAddr) -> 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. Read more
sourcefn human_address(&self, canonical: &CanonicalAddr) -> StdResult<HumanAddr>
fn human_address(&self, canonical: &CanonicalAddr) -> StdResult<HumanAddr>
Takes a canonical address and returns a human readble address.
This is the inverse of canonical_address
. Read more
sourcefn 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
sourcefn secp256k1_recover_pubkey(
&self,
_message_hash: &[u8],
_signature: &[u8],
_recovery_param: u8
) -> Result<Vec<u8>, RecoverPubkeyError>
fn secp256k1_recover_pubkey(
&self,
_message_hash: &[u8],
_signature: &[u8],
_recovery_param: u8
) -> Result<Vec<u8>, RecoverPubkeyError>
Recovers a public key from a message hash and a signature. Read more
sourcefn 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
sourcefn 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
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more