API reference for EncryptedBool type
use privora_sdk_program::prelude::*; let can_match: EncryptedBool = buy_price.ge(&sell_price)?; let fill_price = can_match.select(&sell_price, &buy_price)?;
pub fn from_raw(data: Vec<u8>) -> Self
pub fn as_bytes(&self) -> &[u8]
pub fn into_bytes(self) -> Vec<u8>
pub fn select<T: EncryptedInt>( &self, true_val: &Encrypted<T>, false_val: &Encrypted<T>, ) -> Result<Encrypted<T>, ProgramError>
true_val
false_val
pub fn store(self) -> Result<EncryptedBoolRef, ProgramError>
// Compare prices let can_match: EncryptedBool = buy_price.ge(&sell_price)?; // Conditional selection let fill_price = can_match.select(&sell_price, &buy_price)?; // Equivalent to: if (buy >= sell) { sell_price } else { buy_price }
pub const fn from_hash(hash: [u8; 32]) -> Self
pub const fn hash(&self) -> [u8; 32]
pub fn load(&self) -> Result<EncryptedBool, ProgramError>