- Opened an encrypted database.
- Initialized an MLS session.
- Created a conversation.
- Encrypted and decrypted a message.
- TypeScript / WASM
- Kotlin / Android
- Swift / iOS
Installation
Install the npm package
CoreCrypto is published as The package ships two entry points:
@wireapp/core-crypto. Install it with your package manager:@wireapp/core-crypto/browser— WASM binary for browsers and bundlers.@wireapp/core-crypto/native— N-API binary for Node.js.
The browser entry point includes a
.wasm binary that must be served as a static asset. See your bundler’s documentation for how to handle .wasm files.Initialize the WASM module
Before using any CoreCrypto APIs in a browser context, initialize the WASM module once at startup:
Open a database
CoreCrypto stores all keying material in an encrypted database. On WASM, this is backed by IndexedDB.
Initialize MLS in a transaction
All state-mutating operations run inside a transaction. Initialize MLS and register a credential within a single transaction:
newTransaction commits all changes to the keystore if the callback returns successfully. If the callback throws, all changes are discarded.What to read next
Architecture
Understand the keystore, MLS provider, and FFI layers.
MLS protocol
Deep dive into MLS groups, epochs, and key schedules.
TypeScript guide
Full integration guide for the browser and Node.js.
API reference
Complete reference for all CoreCrypto types and methods.