use koios_sdk::{
types::{EpochNo, IncludeNextEpoch},
Client,
};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new()?;
let tip = client.get_tip().await?;
println!("Current tip: {:?}", tip);
let epoch = client
.get_epoch_info(Some(EpochNo::new("320")), Some(IncludeNextEpoch::new(true)))
.await?;
println!("Epoch: {:?}", epoch);
let stake_addresses =
vec!["stake1ux3g2c9dx2nhhehyrezyxpkstartcqmu9hk63qgfkccw5rqttygt7".to_string()];
let epoch_no = Some("320".to_string());
let rewards = client
.get_account_rewards(&stake_addresses, epoch_no)
.await?;
println!("Account rewards: {:?}", rewards);
Ok(())
}