What lives where
| On-chain | Off-chain (Weave) |
|---|---|
| Mailbox capability records | Encrypted message bodies |
| Versioned receive policies | Indexes (per-recipient) |
| Public key directory | Drafts |
| Delivery commitments | Attachments |
| Sender economics state | Search tokens |
| Abuse reports | — |
| Delegations | — |
| Mail-scoped nonces | — |
Live protocol surface
| Module | Purpose |
|---|---|
node/sigil-core/src/mail.rs | Canonical records, transaction data, policy rules, deterministic IDs, privacy-shape validators. |
node/sigil-node/src/mail_durable.rs | AkashaKV persistence under mail/ and sns/ prefixes. |
node/sigil-node/src/executor_mail.rs | Executor for mailbox, policy, key, delivery, abuse, delegation, and SNS transactions. Real Ed25519 sender-key verification is live. |
node/sigil-node/src/rpc_mail.rs | Read surface for mailbox resolution, policy/key lookup, delivery scans, delegations, abuse reports, name resolution. |
node/sigil-sdk/src/mail.rs | Transaction builders and preflight helpers. |
weave/libs/weave-sdk/src/mailbox.rs | Private encrypted mailbox envelope, ChaCha20-Poly1305 via loom-encrypt, content-key wrap with sealed boxes. |
Mailbox model
A mailbox is identified by a deterministic id derived from(owner_did, mailbox_label). Each mailbox has:
- A capability record binding the mailbox to its owner DID, username, and wallet controller.
- A versioned receive policy.
- An active encryption key and signing key in the public key directory.
- A history of delivery commitments.
- A sender-economics ledger (fees, refundable stakes).
Receive policies
A receive policy declares who can deliver to the mailbox. Policy kinds, all composable:| Kind | Allows | Requires |
|---|---|---|
Open | Anyone | Sender fee or refundable stake. |
RequireVerifiedSender | Anyone with an active signing key | Cryptographic sender signature over the delivery transcript. |
Allowlist | Listed DIDs only | Off-chain payload may be encrypted to any allowlisted key. |
MandateGated | Holders of a specified mandate | Mandate id; the chain verifies authority. |
ContactList | DIDs the owner has previously sent to | Bi-directional history check. |
RateLimit | Up to N messages per epoch | Per-sender counter. |
SetMailPolicy transaction. The active version applies to new deliveries.
Delivery commitment
A delivery commitment binds the sender, recipient, encryption key version, Weave object commitment, timestamp, and policy version:(sender, recipient, envelope_commitment). Locked or deactivated mailboxes, expired keys, and revoked keys all reject.
Key directory
The key directory holds the active encryption and signing keys for each DID. Operations:| Transaction | Purpose |
|---|---|
RegisterMailKey | Register an initial key set. |
RotateMailKey | Rotate keys (a previous key remains valid for a grace period). |
RevokeMailKey | Immediately revoke a key (e.g. on compromise). |
Sender economics
Anti-spam relies on either a one-time fee or a refundable stake:- Fee mode: sender pays a per-message fee to the mailbox owner. The mailbox may refund part of it as reputation grows.
- Stake mode: sender locks a refundable stake; abuse reports against the sender may slash the stake.
sigil_getMailPolicy.
Abuse reports
Recipients can submitReportAbuse against a delivery. Abuse reports accrue against the sender DID. A configurable threshold triggers automatic stake slashing (under stake mode) or capability downgrade.
Delegations
Mail-scoped delegations allow mailbox operators, delivery services, devices, and recovery controllers to act on behalf of the mailbox owner without full key access. Delegations carry explicit scope (delivery, key rotation, policy update) and expiry.RPC
| Method | Returns |
|---|---|
sigil_getMailbox | Mailbox capability record. |
sigil_getMailPolicy | Versioned receive policy. |
sigil_getMailKey | Active key for a DID. |
sigil_listMailDeliveriesByRecipient | Delivery commitments for a mailbox. |
sigil_listMailDeliveriesBySender | Delivery commitments by a sender. |
sigil_getMailDelegation | Delegation record. |
sigil_resolveMail | Resolve a name to a mailbox via SNS. |
What is not yet live
The substrate is live at the runtime/API layer; consumer-facing pieces remain follow-on work:- Consumer UI, dBrowser integration, Forge agent integration, SMTP/Gmail bridges, JMAP adapters.
- Full contact / reputation / proof / rate-limit policy enforcement beyond the launch deny / allow / fee / stake gates.
pre-genesis-feature-readiness reports mail: or sns: blockers if the substrate is incomplete; the feature is not marketed as live when those blockers report.
Implementation
- Types:
node/sigil-core/src/mail.rs. - Executor:
node/sigil-node/src/executor_mail.rs. - Durable state:
node/sigil-node/src/mail_durable.rs. - SDK:
node/sigil-sdk/src/mail.rs.
See also
- Sigil Name System — name → mailbox resolution.
- Send encrypted mail — recipe.