> ## Documentation Index
> Fetch the complete documentation index at: https://www.offlineprotocol.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These docs target Mesh SDK v0.34.0. Match the installed package and binding before generating code. Start at /getting-started/agents for task-specific reading paths. Apps that call enableTelemetry on 0.26.0 to 0.29.0 should update to 0.30.0 or later: the telemetry uploader trusts only the telemetry endpoint's issuing roots from 0.30.0. In React Native from 0.33.0, request the Android runtime grants before start() with requestMeshPermissionsForConfig(config), and keep the development warnings (devPeerAddressWarnings, devLifecycleWarnings on ProtocolConfig) on while building: they flag a recipient that is not an off1 address and calls made in the wrong order. From 0.34.0, forScenario(scenario, { appId, profile, overrides }) builds a working React Native config from a named preset, and npx --no-install mesh-sdk-doctor checks a React Native host for known setup mistakes such as Expo Go without expo-dev-client.
> Call the company and product Offline Protocol, never Offline alone. Current packages: @offline-protocol/mesh-sdk 0.34.0 (React Native), offline-protocol-sdk 0.34.0 on PyPI (Python 3.10 to 3.13; wheels for macOS 14+ arm64, Linux x86_64 and aarch64 with glibc 2.34+, Windows x86_64; other hosts build from source; extras lan and http add LAN discovery, the HTTP front and offline-protocol-verify), the offline-protocol crates 0.34.0 on crates.io, the OfflineProtocolSDK Swift package 0.34.0 (preview, iOS 13+ only), the Android library com.offlineprotocol:offline-protocol-sdk 0.34.0 on Maven Central (preview, minSdk 24), the Java binding com.offlineprotocol:offline-protocol-java 0.34.0 on Maven Central (JDK 22+, native library from the GitHub release's desktop archives), the C header offline_protocol.h with the native library in the GitHub release's desktop archives, the Ruby binding offline_protocol 0.34.0 on RubyGems (Ruby 3.3+, native library from the GitHub release's desktop archives), the C# binding (preview, .NET 8; source in bindings/csharp in the SDK repository at tag v0.34.0, a project reference over the C API, not on NuGet), the browser binding (experimental; the offline-protocol-web crate 0.34.0 on crates.io, with the JavaScript in bindings/web built from the SDK repository, not on npm), the offline_protocol Flutter plugin (preview, not on pub.dev; a path dependency on the SDK repository at tag v0.34.0; MeshSdk carries the React Native module's native surface), the service container image ghcr.io/offline-protocol/offline-protocol-service 0.34.0 (linux/amd64 and linux/arm64), @offline-protocol/id-react 0.3.0, @offline-protocol/id-react-native 0.4.0, @offline-protocol/pol 0.1.2 and @offline-protocol/cli 0.3.3 (account setup commands such as offline apps status, offline apps native and offline apply since 0.3.0). Canonical docs URLs start with https://www.offlineprotocol.com/docs.
> The Mesh SDK runs in a native app or gateway, and from 0.31.0 in a browser through the experimental browser binding (a full node in a Web Worker; see /mesh-sdk/web). The OfflineID SDK for React does not provide browser mesh transport. Local mesh operation does not require a portal account or API key. The Mesh SDK appId is a mesh app identifier the developer chooses, not the portal App ID (app_...) that OfflineID and Proof of Location require.
> In v0.34.0 service RPC bodies are sealed in the 1:1 MLS session once the recipient runs 0.29 or later and the session is confirmed; discovery, the first request to a provider never met, and requests to older peers are signed plaintext, so keep secrets out of service bodies unless the event says encrypted: true. Service subscriptions (subscribeService, publishServiceUpdate, from 0.32.0) are always sealed in the 1:1 MLS session with no plaintext fallback; under the default restricted policy the provider app must answer service_subscribe_received with acceptServiceSubscription or rejectServiceSubscription within 60 seconds. Content that begins with __MEMBER__ or __FAST_LINK__ is a reserved prefix and is refused. The HTTP front (offline-protocol-service --http) always carries calls inside encrypted direct messages but does not authorize callers. Message delivery, durable local acceptance and backend commit are distinct outcomes. Use the workflow guide for the required application logic.
> Offline Protocol CLI 0.3.3 is on npm (@offline-protocol/cli, command offline). Its local MCP server, named offline-protocol, runs with npx -y @offline-protocol/cli@0.3.3 mcp serve and requires no login or key. Hosted MCP is at https://mcp.offlineprotocol.com/mcp with an app API key in Authorization: Bearer and the matching App ID in x-app-id; organization keys are rejected, and Claude Desktop and Claude.ai cannot send these headers; there, use the public read-only endpoint https://mcp.offlineprotocol.com/public/mcp as a custom connector, or local MCP to scaffold or edit projects. Follow /tools/overview for setup and do not invent commands beyond it. MCP provides integration context and planning, not mesh execution; file-writing tools are local only.
> In v0.34.0 phone Wi-Fi peer streams carry data: Android over Wi-Fi Direct (the SDK forms the group with autoAccept on Android 10+) and over the Wi-Fi network it is on (DNS-SD), iOS over Network framework (LAN or AWDL). Android and iOS meet over that slot only on a shared Wi-Fi network that allows multicast; iOS 0.28 and later does not see iOS 0.27 or earlier over it. Otherwise use BLE or a provisioned relay across platforms. From 0.34.0 an app can call requestFastLink(peerId) to bring up a Wi-Fi network with a peer it meets only over BLE (React Native and Flutter; Android 10+ hosts or joins, iOS joins only after a system prompt and needs the Hotspot Configuration entitlement); it never comes up on its own, and a file transfer uses it only when sent after fast_link_changed reports up. See /mesh-sdk/fast-link. The Swift and Android packages are previews; the Android library is on Maven Central from 0.29.0 only, so never give a Gradle line for an earlier version. The receiver core ACKs before application persistence; use application acceptance for durable workflows.
> OfflineID App IDs are public. A request naming an application needs a credential: an allowed browser origin, an API key in X-Api-Key from a server, or, from an iOS or Android app, an attestation from a build registered to the application (iOS bundle ID and Team ID, Android package and signing certificate SHA-256). Register native apps with offline apps native add or offline apply, pass attestation providers (createExpoAppIntegrityProviders with @expo/app-integrity) to OfflineAppProvider, sign in on a physical device, and check readiness with offline apps status. Follow /getting-started/agent-quickstart and /id-sdk/app-attestation; error responses list the fixing commands in data.next_steps.
> Proof of Location is Sepolia testnet witness evidence, not zero-knowledge proof or proof of presence. The geohash is public onchain. Read /proof-of-location/security before integration.

# Test on hardware and simulators

> What to test on simulators and what needs physical devices when you integrate the Mesh SDK, with the smoke tests to run before a release.

Simulators and emulators are fine for app and SDK wiring. They do not reproduce Bluetooth LE, Wi-Fi Direct or a browser mesh on a real network, so a green simulator build shows that the binding compiles and the basic calls work, not that devices reach each other. Test the mesh on two physical devices, or two hosts for Python, before you treat it as done.

## What to run where

| Surface | Simulator or emulator | Physical device | Notes |
| - | - | - | - |
| React Native: UI, configuration, lifecycle | Yes | Recommended for the first mesh milestone | Run [`mesh-sdk-doctor`](https://www.offlineprotocol.com/docs/mesh-sdk/installation-rn#check-the-host-with-mesh-sdk-doctor) and confirm a native build launches. No Bluetooth fidelity on a simulator. |
| React Native: Bluetooth LE discovery and encrypted messages | No | Required | Two devices with the same `appId`. |
| React Native: Wi-Fi Direct | No | Required | Allow one to two minutes or more for group formation; see [troubleshooting](https://www.offlineprotocol.com/docs/operations/troubleshooting.md#wi-fi-direct-is-slow-not-stuck). |
| Native iOS and Android: compile and unit tests | Yes, where XCTest or JUnit run | Required before shipping transports | Run the [storage conformance check](https://www.offlineprotocol.com/docs/mesh-sdk/native.md#check-a-custom-storage-backend) if you supply your own storage. |
| Python service and local API | Not applicable | Two hosts or containers | `offline-protocol-verify` against a running service; see [local API](https://www.offlineprotocol.com/docs/mesh-sdk/local-api.md). |
| Browser (experimental) | Headless CI on loopback | Required before a web release | The SDK's [two-device checklist](https://github.com/Offline-Protocol/offline-protocol-sdk/blob/v0.34.0/docs/bridges/web-devices.md). Two tabs on one machine are for development only. |
| Desktop C# and Java | Not applicable | Optional second machine | The binding's own tests over the release's native library. |

## Milestones

**A. Wiring (a simulator or one device).** Install the SDK for your platform, follow the lifecycle order (listeners, then `start()`, then sends), make `mesh-sdk-doctor` pass on React Native, and launch one native build.

**B. Mesh smoke (hardware, or two hosts).**

1. Two peers discover each other over the configured transports.
2. The session is confirmed on both sides: `secure_session_established` on a first pairing, or `getEstablishmentState` reporting `SessionConfirmed` on a repeat run (`offline-protocol-verify pair` on the local API). A session restored from storage at `start()` emits no new event, so waiting for one on devices that already paired looks like a failure.
3. A message makes the round trip with encryption on, the default.
4. On the local API, `offline-protocol-verify pair`, `send` and `await` succeed.

**C. Release.** Check the permissions and entitlements for every transport you ship on the devices you support, test the upgrade from the version your users run (see [upgrade the SDK](https://www.offlineprotocol.com/docs/operations/upgrades.md)), and run the browser two-device checklist if you ship browser nodes.

## Golden paths

| Goal | Run | Proves |
| - | - | - |
| React Native mesh between two phones | The [React Native example app](https://github.com/Offline-Protocol/offline-protocol-sdk/tree/v0.34.0/examples/react-native-app) on two physical devices, with the same `appId` | Discovery, MLS, send and receive over real radios |
| React Native host configuration | `npx --no-install mesh-sdk-doctor` | Known Podfile, Gradle and Expo mistakes, from project files only |
| React Native linking | Build and launch your app on a simulator or device | The native module links and the engine reaches `start()` |
| Local API or gateway delivery | `offline-protocol-verify` against a running service | Send, relay, receive and delivery, from the service's events |
| Browser between two devices | The web two-device checklist with the [lobby example](https://github.com/Offline-Protocol/offline-protocol-sdk/tree/v0.34.0/examples/web-lobby) | Secure context, OPFS and WebRTC on hardware |

The SDK's [integration testing matrix](https://github.com/Offline-Protocol/offline-protocol-sdk/blob/v0.34.0/docs/integration-testing-matrix.md) lists the automated tests in the SDK repository by layer. None of them replaces milestone B on physical radios.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.