use anyhow::Result;
use privora_sdk_client::prelude::*;
use privora_test_utils::{
get_rpc_url,
ensure_sequencer_healthy,
create_funded_keypair,
DEFAULT_AIRDROP_AMOUNT,
};
#[tokio::test]
#[ignore] // Requires running sequencer
async fn test_fhe_workflow() -> Result<()> {
let rpc_url = get_rpc_url();
// Ensure sequencer is running
ensure_sequencer_healthy(&rpc_url).await;
// Create funded test account
let (payer, balance) = create_funded_keypair(&rpc_url, None).await?;
println!("Payer funded with {} lamports", balance);
// Connect to Privora
let privora = PrivoraClient::new(&rpc_url).await?;
// Encrypt and submit data
let encrypted = privora.encryptor().encrypt(100u8)?;
let hash = privora.submit(&encrypted).await?;
println!("Submitted encrypted data: {:?}", hash);
Ok(())
}