pub struct EncryptedInput<T = ()> { /* private fields */ }Expand description
Pre-encrypted input bytes for TEE-decrypted REX arguments.
On-chain this is opaque ciphertext (Vec<u8>). The TEE decrypts it
transparently before passing the plaintext to the REX handler (e.g.,
a WASM component). Venus codegen recognizes this type and emits
RexValue::Encrypted(...) instead of borsh-serializing individual args.
The type parameter T is a phantom type that Venus codegen uses to
verify the encrypted value matches the expected function parameter type
at compile time. It has no effect on serialization — EncryptedInput<u64>
and EncryptedInput<String> serialize identically as opaque bytes.
Create with rialo_cdk::encrypt_input on the client side.
§Examples
ⓘ
// Typed: Venus verifies EncryptedInput<u64> matches `amount: u64`
state { encrypted_amount: EncryptedInput<u64> }
// Untyped: no compile-time check (T defaults to ())
state { encrypted_blob: EncryptedInput }Implementations§
Trait Implementations§
Source§impl<T> BorshDeserialize for EncryptedInput<T>
impl<T> BorshDeserialize for EncryptedInput<T>
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl<T> BorshSerialize for EncryptedInput<T>
impl<T> BorshSerialize for EncryptedInput<T>
Source§impl<T> Clone for EncryptedInput<T>
impl<T> Clone for EncryptedInput<T>
Source§impl<T> Debug for EncryptedInput<T>
impl<T> Debug for EncryptedInput<T>
Source§impl<T> Default for EncryptedInput<T>
impl<T> Default for EncryptedInput<T>
Source§impl<'de, T> Deserialize<'de> for EncryptedInput<T>
impl<'de, T> Deserialize<'de> for EncryptedInput<T>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl<T> Eq for EncryptedInput<T>
Source§impl<T> IntoRexValueFor<T> for EncryptedInput<T>
impl<T> IntoRexValueFor<T> for EncryptedInput<T>
fn into_rex_value_for(self) -> RexValue
Source§impl<T> PartialEq for EncryptedInput<T>
impl<T> PartialEq for EncryptedInput<T>
Auto Trait Implementations§
impl<T> Freeze for EncryptedInput<T>
impl<T> RefUnwindSafe for EncryptedInput<T>where
T: RefUnwindSafe,
impl<T> Send for EncryptedInput<T>where
T: Send,
impl<T> Sync for EncryptedInput<T>where
T: Sync,
impl<T> Unpin for EncryptedInput<T>where
T: Unpin,
impl<T> UnsafeUnpin for EncryptedInput<T>
impl<T> UnwindSafe for EncryptedInput<T>where
T: UnwindSafe,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.