MeshKit
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);
APIPurpose
createMeshkit(options)Build a MeshKitClient from runtime options
createMeshkitFromConfig(config, options)Build a client from meshkit.config.json-style configuration
meshkit(options) from @meshkit/meshkitApp-facing facade over Core
meshkit.fromConfig(config, options)Facade config helper

Main Namespaces

NamespaceCommon APIsGuide
filesput, putMany, putStream, get, getStreamFiles
recordsput<T>, get<T>Records
sharefile(...).with, openCapsule, send, revokeSharing
messagesto(...).send, inbox, openMessages
identitycreate, export, import, publish, resolveIdentity and sharing
syncenqueue, jobs, checkpoint, flush, createSchedulerSync
persistencelookup, renew, retrieveFilecoin
policiescreate, test, auditLit policy
vaultscreate, addMember, share, openSecurity
capabilitiesissue, revoke, verifySecurity
proofsgetProofs and CIDs
doctorrunProvider testing
providerscurrent, health, logsProviders

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

ShortcutEquivalent
mesh.put(...)mesh.files.put(...)
mesh.get(cid)mesh.files.get(cid)
mesh.open(capsule, options)mesh.share.openCapsule(capsule, options)

Defaults

SettingDefault
Identityself
ProviderLocalDevProvider when no provider is supplied
PutOptions.contentTypeapplication/octet-stream
Share allowDownloadtrue
Share expiryNo expiry unless expiresIn or expiresAt is set
Stream chunkSize1048576 bytes
Filecoin replicas1
Filecoin duration180 days
HttpIpfsProvider.timeoutMs15000
HttpIpfsProvider.retries2

Return Types

Common return types include MeshFile, MeshContent, MeshBatch, MeshStreamFile, ShareCapsule, MeshMessage, MeshSyncJob, PersistenceProof, DoctorReport, and MeshProof.

Next Steps

On this page