use std::error::Error; use std::fs::File; use std::io::Read; use algosdk::AlgodClient; fn main() -> Result<(), Box> { let algod_address = "http://localhost:8080"; let algod_token = "contents-of-algod.token"; let mut f = File::open("./signed.tx")?; let mut raw_transaction = Vec::new(); let _ = f.read_to_end(&mut raw_transaction)?; let algod_client = AlgodClient::new(algod_address, algod_token); let send_response = algod_client.raw_transaction(&raw_transaction)?; println!("Transaction ID: {}", send_response.tx_id); Ok(()) }