use snarkvm::{ prelude::*, ledger::store::ConsensusStore,};use rand::thread_rng;fn main() -> Result<()> { // Setup: Create sender and receiver accounts let sender_key = PrivateKey::<Testnet3>::new(&mut thread_rng())?; let receiver = Address::try_from( PrivateKey::<Testnet3>::new(&mut thread_rng())? )?; println!("Sender: {}", Address::try_from(&sender_key)?); println!("Receiver: {}", receiver); // Initialize the VM let store = ConsensusStore::<Testnet3, ConsensusMemory<Testnet3>>::open( Some(aleo_std::StorageMode::Development(0)) )?; let vm = VM::from(store)?; // Create transfer inputs let inputs = [ // Note: In a real application, you would use an actual record // from the ledger as the first input Value::from_str(&format!("{}u64", 1000000))?, // Amount: 1 million microcredits Value::from_str(&format!("{}", receiver))?, // Recipient address Value::from_str("100000u64")?, // Amount to transfer ]; println!("\nCreating transfer transaction..."); // Execute the transfer_private function let transaction = vm.execute( &sender_key, ("credits.aleo", "transfer_private"), inputs.iter(), None, // No additional fee record 0, // Zero priority fee None, // No query (using VM directly) &mut thread_rng() )?; println!("Transaction ID: {}", transaction.id()); println!("Transaction created successfully!"); Ok(())}