Skip to main content

What is Packet?

Packet is an on-chain messaging protocol built on Solana. It combines end-to-end encryption, payment gating, and compressed state to let applications send verifiable, private messages between wallets — without a centralized server.

Every message is either stored directly on-chain or referenced from a permanent storage layer (Irys/Arweave). Delivery is trustless: only the parties holding the right keys can read the content.

Key Properties

PropertyDescription
On-chain deliveryMessages are sent via Solana transactions — no off-chain relayer required
E2E encryptionContent is encrypted before it leaves the sender; only intended readers can decrypt
Payment gatingInboxes can require a SOL/WSOL payment before accepting a thread
EscrowPayments can be held in escrow and released only after the receiver approves
Compressed stateThread accounts use ZK-compressed accounts via Light Protocol, dramatically reducing on-chain storage costs
Permanent contentLarge payloads are uploaded to Irys and stored permanently; the message holds the CID pointer

Protocol Objects

Inbox

An Inbox is an on-chain account owned by a wallet. It acts as a directory of threads and can enforce a payment rule: any new thread must include a minimum SOL payment to be accepted. A wallet can have multiple inboxes, each with its own rules and metadata.

Thread

A Thread is the conversation container between two wallets. It is created by the sender and permanently links the sender and receiver. Once open, both parties can send messages by appending to the thread. Threads hold an optional escrow balance if the inbox has escrow enabled.

Message

A Message is a single entry in a thread. It carries a type (text, url, or irys) and a content field. For large payloads, the content is uploaded to Irys and the message stores the CID. Messages are optionally encrypted before being written to the chain.

User & Key Accounts

A User account holds a wallet's display name and metadata URI. A Key account holds a wallet's registered public encryption key, making it possible for senders to encrypt messages to that wallet without a direct exchange.

Data Flow

Sender Packet Program Receiver
| | |
|-- create thread (+ payment) ---> | |
| |--- store thread -----> |
|-- send message (encrypted) ----> | |
| |--- emit event -------> |
| | |-- decrypt & read
  1. The sender calls createThread, optionally including a payment if the receiver's inbox requires one.
  2. The program stores the thread account on-chain and emits a MessageSent event.
  3. The receiver's app detects the event via WebSocket or polls the inbox.
  4. The receiver decrypts the message using their private key.

Next Steps