zerox1_client/lib.rs
1//! # zerox1-client
2//!
3//! Official client SDK for building agents and services on the 0x01 mesh network.
4//!
5//! ## Quick start
6//!
7//! ```ignore
8//! use zerox1_client::{NodeClient, ConversationId};
9//!
10//! #[tokio::main]
11//! async fn main() -> anyhow::Result<()> {
12//! let client = NodeClient::new("http://127.0.0.1:9090", None)?;
13//!
14//! // Discover own identity
15//! let me = client.identity().await?;
16//! println!("agent_id: {me}");
17//!
18//! // Listen for inbound envelopes
19//! client.listen_inbox(|env| async move {
20//! println!("{} from {}", env.msg_type, env.sender);
21//! Ok(())
22//! }).await?;
23//!
24//! Ok(())
25//! }
26//! ```
27
28mod client;
29mod types;
30
31pub use client::NodeClient;
32pub use types::{
33 ActivityEvent, AgentId, ConversationId, HostedSendRequest, IdentityResponse,
34 InboundEnvelope, SendEnvelopeRequest, SendEnvelopeResponse,
35};