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.
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 adapters;
13pub mod agent_card;
14pub mod blocklist;
15pub mod canonical;
16pub mod character;
17pub mod cli;
18pub mod config;
19pub mod daemon_stream;
20pub mod daemon_supervisor;
21pub mod dash;
22pub mod diag;
23pub mod enc;
24pub mod endpoints;
25pub mod enroll;
26pub mod ensure_up;
27pub mod group;
28pub mod identity;
29pub mod inbox_watch;
30pub mod init;
31pub mod macaroon;
32pub mod mcp;
33pub mod nip44;
34pub mod nip_w1;
35pub mod nostr_event;
36pub mod nostr_key;
37pub mod nostr_relay;
38pub mod nostr_ws;
39pub mod nuke;
40pub mod org_bind;
41pub mod org_membership;
42pub mod org_policy;
43pub mod os_notify;
44pub mod pair_decision;
45pub mod pair_invite;
46pub mod pair_profile;
47pub mod pending_inbound_pair;
48pub mod platform;
49pub mod probe;
50pub mod pull;
51pub mod relay_client;
52pub mod relay_server;
53pub mod retire;
54pub mod same_machine;
55pub mod send;
56pub mod service;
57pub mod session;
58pub mod signing;
59pub mod sso_provider;
60pub mod tls;
61pub mod trust;
62
63// Curated re-exports for ergonomic call sites.
64pub use signing::{
65    KIND_RANGES, KindClass, SignError, VerifyError, b64decode, b64encode, compute_event_id,
66    fingerprint, generate_keypair, kind_class, kinds, make_key_id, sign_message_v31,
67    verify_message_v31,
68};
69
70pub use agent_card::{
71    AgentCard, CARD_SCHEMA_VERSION, CardError, DID_METHOD, build_agent_card, card_canonical,
72    compute_sas, sign_agent_card, verify_agent_card,
73};
74
75pub use trust::{
76    Tier, Trust, add_agent_card_pin, add_self_to_trust, empty_trust, get_tier, promote_to_verified,
77};