Skip to content

wireapp/core-crypto-playground

Repository files navigation

Wire CoreCrypto Playground

A minimal React + TypeScript + Vite app for exploring the @wireapp/core-crypto WebAssembly library. It demonstrates MLS (Messaging Layer Security) conversation creation and identity resolution using the Wire end-to-end encryption SDK.

Getting Started

npm install
npm run dev

The app is served at http://localhost:5173.

Note: The WASM binary (core-crypto-ffi_bg.wasm) must be served from the root /. Vite synchronizes the installed package binary into public/ automatically.

Project Structure

src/
  CoreCryptoWrapper.ts   # Singleton CoreCrypto instance + all crypto logic
  App.tsx                # UI — consumes wrapper functions, renders results
  main.tsx               # React entry point
public/                  # Static assets (WASM binary served from here)

Architecture

All @wireapp/core-crypto interactions are encapsulated in CoreCryptoWrapper.ts. App.tsx only calls the exported helper functions and manages UI state — it has no direct dependency on the CoreCrypto API.

CoreCryptoWrapper.ts — Exported API

Function Description
getCoreCryptoInstance() Returns the singleton CoreCrypto instance, initializing it once on first call.
createConversationID() Generates a random ConversationId.
checkConversationExists(id) Returns true if the given conversation exists in the local store.
createConversationAndGetIdentities(id) Creates an MLS conversation and returns the WireIdentity[] for the current user.

Scripts

Command Description
npm run dev Start development server with HMR
npm run build Type-check and build for production
npm run preview Preview the production build locally
npm run lint Run ESLint

Dependencies

About

A minimal React + TypeScript + Vite app for exploring the CoreCrypto WebAssembly library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors