Reference
API Reference
Generated and curated reference for @meshkit/core.
Use this page for API lookup after you understand the MeshKit mental model. Start with the SDK guides if you are still learning the workflows.
Client Creation
import { createMeshkit, createMeshkitFromConfig } from "@meshkit/core";
const mesh = await createMeshkit(options);
const configured = await createMeshkitFromConfig(config, options);| API | Purpose |
|---|---|
createMeshkit(options) | Build a MeshKitClient from runtime options |
createMeshkitFromConfig(config, options) | Build a client from meshkit.config.json-style configuration |
meshkit(options) from @meshkit/meshkit | App-facing facade over Core |
meshkit.fromConfig(config, options) | Facade config helper |
Main Namespaces
| Namespace | Common APIs | Guide |
|---|---|---|
files | put, putMany, putStream, get, getStream | Files |
records | put<T>, get<T> | Records |
share | file(...).with, openCapsule, send, revoke | Sharing |
messages | to(...).send, inbox, open | Messages |
identity | create, export, import, publish, resolve | Identity and sharing |
sync | enqueue, jobs, checkpoint, flush, createScheduler | Sync |
persistence | lookup, renew, retrieve | Filecoin |
policies | create, test, audit | Lit policy |
vaults | create, addMember, share, open | Security |
capabilities | issue, revoke, verify | Security |
proofs | get | Proofs and CIDs |
doctor | run | Provider testing |
providers | current, health, logs | Providers |
Advanced namespaces such as car, observability, retrieval, interop, ai, and agent are part of the Core surface. Use them only after the main storage, identity, provider, and security paths are clear.
Shortcuts
| Shortcut | Equivalent |
|---|---|
mesh.put(...) | mesh.files.put(...) |
mesh.get(cid) | mesh.files.get(cid) |
mesh.open(capsule, options) | mesh.share.openCapsule(capsule, options) |
Defaults
| Setting | Default |
|---|---|
| Identity | self |
| Provider | LocalDevProvider when no provider is supplied |
PutOptions.contentType | application/octet-stream |
Share allowDownload | true |
| Share expiry | No expiry unless expiresIn or expiresAt is set |
Stream chunkSize | 1048576 bytes |
| Filecoin replicas | 1 |
| Filecoin duration | 180 days |
HttpIpfsProvider.timeoutMs | 15000 |
HttpIpfsProvider.retries | 2 |
Return Types
Common return types include MeshFile, MeshContent, MeshBatch, MeshStreamFile, ShareCapsule, MeshMessage, MeshSyncJob, PersistenceProof, DoctorReport, and MeshProof.