API
API Reference
Auto-generated package reference built from TypeScript source comments and exported surfaces.
This API section is package-oriented and auto-generated from the public TypeScript entrypoints in the monorepo.
Write API documentation as TSDoc-style comments above exported declarations in package source files. The docs generator reads those comments and rebuilds these pages automatically.
How this flow works
- Add or update comments in the package source under the relevant
src/**tree. - Run
yarn workspace docs api:generateif you want to refresh the API pages directly. - Any docs
dev,build, ortypes:checkrun also regenerates the API pages first.
Package reference map
| Page | Package | What it covers |
|---|---|---|
| SDK Package | @blemeshjs/sdk | High-level mesh manager, model extensions, and shared SDK types used across runtimes. |
| Core Package | @blemeshjs/core | Reusable mesh engine types, messages, bearers, and provisioning primitives shared across runtimes. |
| Utils Package | @blemeshjs/utils | Shared identifiers, storage abstractions, enums, message helpers, and low-level support types. |
| Crypto Package | @blemeshjs/crypto | Mesh cryptographic helpers layered on top of the shared utility and protocol packages. |
| Web Package | @blemeshjs/sdk-web | Browser transport and storage helpers for Web Bluetooth integrations, plus the shared SDK surface. |
| React Native Package | @blemeshjs/sdk-react-native | React Native transport and storage setup helpers that wrap the shared SDK for mobile runtimes. |
Writing good source comments
Use concise comments directly on exported declarations.
/**
* Creates a browser-configured mesh manager using Web Bluetooth transport and browser storage.
*
* @remarks
* Call this once during application startup and reuse the returned manager for later scans and connections.
*/
export async function createBrowserMesh(...) {
// ...
}Why this flow is better
- The package surface stays aligned with the real source of truth.
- Comments live next to the code they describe.
- Docs rebuilds automatically as part of normal docs workflows.
- Fumadocs still renders the generated pages with the same site-wide styling as the rest of the docs.