Struct oasis_contract_sdk::testing::MockEnv
source · pub struct MockEnv { /* private fields */ }
Expand description
Mock environment.
Implementations§
Trait Implementations§
source§impl Crypto for MockEnv
impl Crypto for MockEnv
source§fn signature_verify_ed25519(
&self,
key: &[u8],
message: &[u8],
signature: &[u8],
) -> bool
fn signature_verify_ed25519( &self, key: &[u8], message: &[u8], signature: &[u8], ) -> bool
Verify an ed25519 message signature.
source§fn signature_verify_secp256k1(
&self,
key: &[u8],
message: &[u8],
signature: &[u8],
) -> bool
fn signature_verify_secp256k1( &self, key: &[u8], message: &[u8], signature: &[u8], ) -> bool
Verify a secp256k1 message signature.
source§fn signature_verify_sr25519(
&self,
key: &[u8],
context: &[u8],
message: &[u8],
signature: &[u8],
) -> bool
fn signature_verify_sr25519( &self, key: &[u8], context: &[u8], message: &[u8], signature: &[u8], ) -> bool
Verify an sr25519 message signature.
source§fn x25519_derive_symmetric(
&self,
public_key: &[u8],
private_key: &[u8],
) -> [u8; 32]
fn x25519_derive_symmetric( &self, public_key: &[u8], private_key: &[u8], ) -> [u8; 32]
Derive a symmetric key from a public/private key pair.
source§fn deoxysii_seal(
&self,
key: &[u8],
nonce: &[u8],
message: &[u8],
additional_data: &[u8],
) -> Result<Vec<u8>, CryptoError>
fn deoxysii_seal( &self, key: &[u8], nonce: &[u8], message: &[u8], additional_data: &[u8], ) -> Result<Vec<u8>, CryptoError>
Encrypt and authenticate a message and authenticate additional data using DeoxysII.
source§impl Env for MockEnv
impl Env for MockEnv
source§fn query<Q: Into<QueryRequest>>(&self, query: Q) -> QueryResponse
fn query<Q: Into<QueryRequest>>(&self, query: Q) -> QueryResponse
Perform an environment query.
source§fn address_for_instance(&self, instance_id: InstanceId) -> Address
fn address_for_instance(&self, instance_id: InstanceId) -> Address
Returns an address for the contract instance id.
source§fn debug_print(&self, msg: &str)
fn debug_print(&self, msg: &str)
Prints a message to the console. Useful when debugging.
Auto Trait Implementations§
impl Freeze for MockEnv
impl RefUnwindSafe for MockEnv
impl Send for MockEnv
impl Sync for MockEnv
impl Unpin for MockEnv
impl UnwindSafe for MockEnv
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)