Skip to main content

How Herald works

A privacy-preserving notification layer for Solana DeFi — from wallet to inbox, with zero PII exposure.

Registration Flow — Zero PII Exposure

Client-side encryption ensures Herald never sees your email address

In Your Browser
1

Connect Wallet

Phantom, Solflare, or Ledger connects via wallet-adapter

2

Enter Email

Plaintext entered in form field — stays browser-only

CRITICAL STEP
3

Client-Side Encryption

Email encrypted using TweetNaCl.js before transmission

ed25519→x25519random nonce
4

Sign Transaction

Wallet signs register_identity() instruction

On Solana Blockchain

IdentityAccount PDA Created

owner7xR4mKp2nQ...
encrypted_email[0x2A, 0xF3...]
nonce[u8;24]
opt_in_alltrue

Seeds: ["identity", wallet_pubkey]

Herald CAN read
  • • Wallet public key
  • • Encrypted blob (in TEE)
  • • Opt-in preferences
Herald CANNOT read
  • • Plaintext email
  • • Even with DB access
  • • Without your private key
User Controls (Wallet-signed)
update_identity()toggle_opt_in()delete_identity()
GDPR Art.17 Compliant
Client-side Encryption (TweetNaCl.js)
01

User registers

A wallet holder visits notify.herald.xyz, connects their wallet, and enters their email address. The email is encrypted in the browser using TweetNaCl.js — plaintext never leaves the device.

02

On-chain storage

A Solana transaction calls register_identity() on the Herald Anchor program. The IdentityAccount PDA stores the encrypted email blob, nonce, SHA-256 hash, and opt-in flags.

03

Protocol sends alert

A DeFi protocol calls POST /v1/notify with a wallet address and message. Herald looks up the IdentityAccount on-chain, decrypts the email inside a Nitro Enclave (TEE), and dispatches via AWS SES.

04

ZK receipt written

After confirmed delivery, Herald writes a ZK-compressed receipt leaf to Solana via Light Protocol. Cost: ~$0.0001. The protocol never learns the user's email at any point.

Get started →