Skip to main content

Offline Protocol Mesh SDK

The Mesh SDK is an offline-first mesh networking SDK for React Native that enables peer-to-peer messaging over BLE, WiFi Direct, and Internet with intelligent transport switching.

Why It Matters

In a world where connectivity is often unreliable, the Mesh SDK provides:
  • Offline-First — Works without internet connectivity using BLE mesh networking
  • Intelligent Transport Switching — Automatically selects the best transport (BLE, WiFi Direct, or Internet) using DORS
  • Mesh Networking — Messages can hop through multiple devices to reach their destination
  • Reliability — Built-in acknowledgments, retries, and deduplication ensure message delivery

Key Capabilities

Multi-Transport Support

Automatically switches between BLE, WiFi Direct, and Internet based on network conditions and message requirements.

End-to-End Encryption

MLS-based (RFC 9420) encryption for 1:1 and group conversations with automatic key exchange, TOFU identity verification, and Ed25519 signing.

Group Messaging

Create encrypted groups with MLS, invite members, manage roles (admin/member), and send messages with automatic fan-out to all participants.

Mesh Networking

Messages can hop through multiple devices, enabling communication even when devices aren’t directly connected.

DORS Technology

Dynamic Offline Relay Switch intelligently selects the optimal transport based on signal strength, congestion, energy, and reliability.

Reliability Layer

Built-in acknowledgments, exponential backoff retries, and message deduplication ensure reliable message delivery.

Service Discovery & RPC

Turn every device into a service provider. Register capabilities, discover services across the mesh, and invoke them with a built-in request/response pattern — no server required.

Presence & Typing

Real-time presence status (online/away/offline), typing indicators, and read receipts for chat-like experiences.

Connection Requests

Send, accept, reject, and cancel connection requests with key package exchange for establishing secure sessions.

File Transfer

Transfer files up to 100MB with chunk-based delivery and progress tracking.

Message Forwarding

Forward messages to users or groups with original sender attribution and forward count tracking.

Battery-Aware

Mesh decisions consider battery levels to optimize energy consumption and relay promotion.

Requirements

PlatformVersion
React Native>= 0.70.0
iOS>= 13.0
Android>= API 26 (Android 8.0)
Node.js>= 16

What You Can Build

With the Mesh SDK, you can build:
  • Offline chat applications with end-to-end encrypted 1:1 and group messaging
  • Proximity-based social apps with connection requests, profiles, and presence
  • Collaborative tools for teams working in areas with poor connectivity
  • Emergency communication systems that work when infrastructure fails
  • Decentralized service networks where devices expose and consume capabilities without a central server — sensor data feeds, local AI inference, payment processing, content delivery, and more
  • Peer-to-peer marketplaces where nearby devices advertise services (translation, storage, compute) and transact directly over the mesh

Service Discovery — The Offline Internet

Service Discovery is one of the most powerful capabilities in the SDK. It turns the mesh into a decentralized service network where any device can be both a consumer and a provider — effectively creating an internet that works without the internet. On the traditional internet, a client discovers a service via DNS, connects to a server, and makes a request. Service Discovery follows the same pattern, but everything happens over the mesh. Devices advertise what they can do, others discover them through multi-hop routing, and invoke those capabilities directly with a request/response pattern. No server, no DNS, no infrastructure. Just devices forming a network and serving each other. This is what an offline internet looks like: a network where the services live on the devices around you, not in a data center. The mesh is the infrastructure. How it works:
  1. A device registers a service with an ID, version, and capability metadata
  2. Other devices broadcast discovery queries that propagate across the mesh via multi-hop routing
  3. Providers respond with their capabilities and location (hop count)
  4. Consumers send requests directly to providers and receive responses
Because discovery propagates through the mesh, services don’t need to be directly connected. A device 5 hops away can still be discovered and invoked — just like a server on the other side of the internet, except the network is made of the people around you. Examples of what you can build:
  • Local AI inference — Devices with ML models register inference services that nearby peers can discover and invoke without needing cloud access
  • Sensor networks — IoT devices expose readings (temperature, air quality) for any nearby device to query in real time
  • Emergency coordination — When infrastructure is down, devices register available resources (medical, shelter, comms relay) for rescue teams to discover and access
  • Event services — Attendees at a conference discover nearby services (live polls, file drops, note sharing) without a centralized app server
  • Collaborative computing — Split workloads across nearby devices that register compute services on the mesh
  • Decentralized content delivery — Devices with cached content (maps, articles, firmware) serve it to others, like a CDN that runs on the devices around you

Architecture Overview

The Mesh SDK uses a cluster-based architecture where devices organize into clusters of nearby connected peers. Connections between clusters are handled by bridge connections, enabling messages to traverse the entire mesh network. Key Components:
  • Protocol Core — Rust-based core handling message routing and reliability
  • MLS Engine — End-to-end encryption using RFC 9420 (Message Layer Security)
  • BLE Manager — Handles Bluetooth Low Energy scanning and advertising
  • DORS — Dynamic transport selection system
  • Mesh Controller — Manages peer connections and cluster formation
  • Reliability Layer — Handles ACKs, retries, and deduplication
  • Service Discovery — Register, discover, and invoke services across the mesh

Next Steps

Get started with installation