Documentation Index
Fetch the complete documentation index at: https://docs.spellguard.ai/llms.txt
Use this file to discover all available pages before exploring further.
Message Structure
All messages are encrypted client-side using the Verifier’s session public key before processing.
SecureMessage
interface SecureMessage {
/** Unique message identifier (UUID v4) */
id: string;
/** Sender agent ID */
sender: string;
/** Recipient agent ID */
recipient: string;
/** Encrypted payload (base64-encoded) */
encryptedPayload: string;
/** Timestamp when the message was created */
timestamp: number;
}
Privacy by design: The Verifier never sees plaintext message content. Commitments are computed over encrypted payloads.
Encryption
Messages are encrypted using X25519 ECDH key agreement with the Verifier’s session public key:
import { encryptForVerifier } from '@spellguard/amp';
const encrypted = encryptForVerifier(
JSON.stringify(payload),
verifier.sessionX25519PublicKey
);