Core concepts
Composition boundaries
Keep protocol state, local storage, delivery, and encrypted objects independently replaceable.
The SDK separates portable protocol behavior from application infrastructure.
| Boundary | Contains | Must not contain |
|---|---|---|
| Local store | Identity private keys, sessions, sender keys | Remote service credentials |
| Delivery adapter | Public prekeys and encrypted envelopes | Device private keys or plaintext |
| Object adapter | Opaque encrypted attachment bytes | Attachment plaintext or message keys |
| Application | Account policy and user experience | Unvalidated protocol-state mutation |
Adapters are security boundaries, not convenience callbacks. Validate data returned by an adapter before committing it to live protocol state.