#![allow(clippy::print_stdout)]
use erc8128::{SignOptions, client::signed_fetch, eoa::EoaSigner};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let signer = EoaSigner::from_slice(&[0xAB; 32], 1)?;
let client = reqwest::Client::new();
let resp = signed_fetch(
&client,
reqwest::Method::GET,
"https://httpbin.org/get",
&[],
None,
&signer,
&SignOptions::default(),
)
.await?;
println!("Status: {}", resp.status());
println!("Body:\n{}", resp.text().await?);
Ok(())
}