The core message envelope that gets encrypted and sent through L2PS

interface MessageEnvelope {
    content: string;
    from: string;
    id: string;
    replyTo?: string;
    signature: string;
    timestamp: number;
    to: string;
    type: MessageType;
}

Properties

content: string

Message content (plaintext before E2E encryption)

from: string

Sender's ed25519 public key (hex)

id: string

Unique message ID (UUID v4)

replyTo?: string

Optional: reply to another message ID

signature: string

Sender's ed25519 signature of the envelope (hex)

timestamp: number

Unix timestamp (ms) when message was created by sender

to: string

Recipient's ed25519 public key (hex)

Message type discriminator