Skip to main content

wire/
lib.rs

1//! wire — magic-wormhole for AI agents.
2//!
3//! v0.1 surface (this crate):
4//!   - [`canonical`] — sorted-key, no-whitespace JSON; the wire-byte form.
5//!   - [`signing`] — Ed25519 sign-over-event_id (Nostr NIP-01 style).
6//!   - [`agent_card`] — DID-anchored agent identity + bilateral SAS.
7//!   - [`trust`] — per-peer tier state machine (UNTRUSTED → VERIFIED).
8//!
9//! v0.2+ (NOT in this crate yet, see `BACKLOG.md`):
10//!   - relay client/server, SPAKE2 handshake, CLI, file_share/file_revoke kinds.
11
12pub mod agent_card;
13pub mod canonical;
14pub mod cli;
15pub mod config;
16pub mod daemon_stream;
17pub mod diag;
18pub mod endpoints;
19pub mod ensure_up;
20pub mod inbox_watch;
21pub mod macaroon;
22pub mod mcp;
23pub mod os_notify;
24pub mod pair_invite;
25pub mod pair_profile;
26pub mod pair_session;
27pub mod pending_inbound_pair;
28pub mod pending_pair;
29pub mod pull;
30pub mod relay_client;
31pub mod relay_server;
32pub mod sas;
33pub mod service;
34pub mod session;
35pub mod signing;
36pub mod trust;
37
38// Curated re-exports for ergonomic call sites.
39pub use signing::{
40    KIND_RANGES, KindClass, SignError, VerifyError, b64decode, b64encode, compute_event_id,
41    fingerprint, generate_keypair, kind_class, kinds, make_key_id, sign_message_v31,
42    verify_message_v31,
43};
44
45pub use agent_card::{
46    AgentCard, CARD_SCHEMA_VERSION, CardError, DID_METHOD, build_agent_card, card_canonical,
47    compute_sas, did_for, sign_agent_card, verify_agent_card,
48};
49
50pub use trust::{
51    Tier, Trust, add_agent_card_pin, add_self_to_trust, empty_trust, get_tier, promote_to_verified,
52};