MeshKit
Providers

Local Dev Provider

Local encrypted storage for development and examples.

LocalDevProvider is the default provider for deterministic examples, tests, and quickstarts. It is useful because it supports the MeshKit provider contract without requiring Kubo, a metadata service, tokens, or network access.

It is not production storage.

Use It For

  • SDK quickstarts
  • Unit tests and examples
  • Local demos
  • Provider-contract learning
  • Offline experiments with files, records, sharing, messages, and sync

Do not use it for durable user data, production retention, compliance evidence, or live provider validation.

Example

import { createMeshkit, LocalDevProvider } from "@meshkit/core";

const provider = new LocalDevProvider();

const mesh = await createMeshkit({
  provider,
  identity: "local-demo",
});

const file = await mesh.files.put("local.txt", "encrypted local demo");
const snapshot = provider.exportState();

console.log(file.cid, Object.keys(snapshot.objects).length);

Config Form

{
  "version": 1,
  "appId": "mk_local_dev",
  "provider": {
    "type": "local-dev",
    "store": ".meshkit/local-dev.json"
  }
}

The store path is useful for CLI workflows that need a repeatable local file. Treat it as development state.

What It Supports

LocalDevProvider supports the broad provider contract in one local boundary:

  • encrypted bytes
  • proofs
  • capsules and revocation
  • mailboxes
  • sync jobs
  • vault and capability records
  • logs and health checks

That breadth makes it good for testing MeshKit workflows. It does not make it a production durability layer.

Common Mistakes

  • Shipping with LocalDevProvider because the quickstart passed.
  • Treating exported local state as a backup strategy.
  • Using local provider proof output as live provider evidence.
  • Forgetting that browser, mobile, and server runtimes have different production key and storage boundaries.

Next Steps

On this page