Expand description
MOSS Rust SDK - Cryptographic signing for AI agents.
MOSS (Message-Origin Signing System) provides cryptographic signing for AI agents. Every output is signed with ML-DSA-44 (post-quantum), creating non-repudiable execution records with audit-grade provenance.
§Quick Start
use moss_sdk::{MossClient, SignRequest};
use std::collections::HashMap;
#[tokio::main]
async fn main() -> Result<(), moss_sdk::MossError> {
let client = MossClient::new(None)?;
let mut payload = HashMap::new();
payload.insert("action".to_string(), serde_json::json!("transfer"));
payload.insert("amount".to_string(), serde_json::json!(500));
let result = client.sign(SignRequest {
payload: serde_json::to_value(payload)?,
agent_id: "agent-finance-01".to_string(),
action: None,
context: None,
}).await?;
println!("Signed! Hash: {}", result.envelope.payload_hash);
Ok(())
}Structs§
- Agent
- Agent representation.
- Envelope
- MOSS signature envelope.
- Moss
Client - MOSS client for signing and verification.
- Moss
Config - MOSS client configuration.
- Register
Agent Request - Request to register a new agent.
- Register
Agent Result - Result of registering an agent.
- Rotate
KeyResult - Result of rotating an agent’s key.
- Sign
Request - Request to sign a payload.
- Sign
Result - Result of a sign operation.
- Verify
Result - Result of a verify operation.
Enums§
- Moss
Error - MOSS error type.