Inviting and Accepting Human Avatars
Invites/acceptances are write operations. Rust runner is not available yet; code samples will be added once writes are supported. For now, process recap:
- An existing avatar invites a new human avatar (address) to join.
- The invitee accepts the invitation to finalize onboarding.
- Trust edges can then be established to enable token flow.
Read-only Rust actions you can perform today:
- Check invite-related events for an address.
- Query trust relations after acceptance.
Example: check invite/registration events (HTTP)
use circles_rpc::{EventsMethods, RpcClient};
use reqwest::Url;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let client = RpcClient::http(Url::parse("https://rpc.aboutcircles.com/")?);
let events = EventsMethods::new(client);
let parsed = events
.circles_events(None, /* from_block */ 0, /* to_block */ None, None)
.await?;
for evt in parsed.iter().filter(|e| {
matches!(
e.event_type,
circles_types::CirclesEventType::CrcV2RegisterHuman
| circles_types::CirclesEventType::CrcV2Invite
)
}) {
println!("invite/registration: {:?}", evt.event_type);
}
Ok(())
}