Skip to main content

Crate moss_sdk

Crate moss_sdk 

Source
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.
MossClient
MOSS client for signing and verification.
MossConfig
MOSS client configuration.
RegisterAgentRequest
Request to register a new agent.
RegisterAgentResult
Result of registering an agent.
RotateKeyResult
Result of rotating an agent’s key.
SignRequest
Request to sign a payload.
SignResult
Result of a sign operation.
VerifyResult
Result of a verify operation.

Enums§

MossError
MOSS error type.

Constants§

ALGORITHM
DEFAULT_BASE_URL
SPEC
VERSION