Crates.io | rusty_ao |
lib.rs | rusty_ao |
version | 0.1.1 |
source | src |
created_at | 2024-10-09 22:00:37.26862 |
updated_at | 2024-10-10 14:33:21.618406 |
description | A blazingly fast client for AO written in Rust |
homepage | https://github.com/weaveVM/rusty-ao |
repository | https://github.com/weaveVM/rusty-ao |
max_upload_size | |
id | 1403104 |
size | 2,791,391 |
A blazingly fast client for AO written in Rust.
cargo add rusty_ao
Alternatively, in your Cargo.toml
, add:
[dependencies]
ao = { git = "https://github.com/weaveVM/rusty-ao.git", branch = "main" }
let ao = Ao::new(
"https://mu.ao-testnet.xyz".to_string(),
"https://cu.ao-testnet.xyz".to_string(),
SignerTypes::Arweave("test_key.json".to_string()),
)
.unwrap();
or using the default_init
method
let ao = Ao::default_init(SignerTypes::Arweave("test_key.json".to_string()))
.unwrap();
// let ao = ...init AO...
let res = ao
.dry_run(
"xU9zFkq3X2ZQ6olwNVvr1vUWIjc3kXTWr7xKQD6dh10".to_string(),
"".to_string(),
vec![Tag {
name: "Action".to_string(),
value: "Info".to_string(),
}],
)
.await;
assert!(res.is_ok());
println!("{}", serde_json::to_string(&res.unwrap()).unwrap());
// let ao = ...init AO...
let res = ao
.spawn(
"test1".to_string(),
"rusty-ao".to_string(),
DEFAULT_MODULE.to_string(),
DEFAULT_SCHEDULER.to_string(),
vec![],
)
.await;
println!("{:?}", res);
assert!(res.is_ok());
println!("{}", serde_json::to_string(&res.unwrap()).unwrap());
// let ao = ...init AO...
let res = ao
.get(
"ya9XinY0qXeYyf7HXANqzOiKns8yiXZoDtFqUMXkX0Q".to_string(),
"5JtjkYy1hk0Zce5mP6gDWIOdt9rCSQAFX-K9jZnqniw".to_string(),
)
.await;
println!("{:?}", res);
assert!(res.is_ok());
println!("{}", serde_json::to_string(&res.unwrap()).unwrap());
This project is licensed under the MIT License