MeshKit
Reference

Types

Important MeshKit public types and interfaces.

Use this page to understand the operational meaning of common exported TypeScript types.

import type { MeshFile, MeshKitOptions, ShareCapsule } from "@meshkit/core";

export const meshkitOptions: MeshKitOptions = {
  identity: "docs-device",
  provider: { type: "local-dev" },
};

export function summarize(file: MeshFile, capsule?: ShareCapsule) {
  return {
    cid: file.cid,
    encrypted: file.encrypted,
    recipients: capsule?.recipients ?? [],
  };
}

Client And Config Types

TypeMeaning
MeshKitClientMain client with files, records, share, messages, identity, sync, providers, proofs, and advanced namespaces
MeshKitOptionsRuntime options passed to createMeshkit
MeshKitConfigDocument-shaped config accepted by createMeshkitFromConfig
MeshKitProviderInputProvider instance, provider name, or provider config object
MeshTelemetryOptionsEvent callback and sink behavior

Storage Types

TypeMeaning
MeshFileStored encrypted object with CID, name, size, proof, encrypted flag, and helpers
MeshContentDecrypted content reader returned by files.get, open, or message open
MeshBatchBatch manifest plus child MeshFile entries
MeshStreamFileStream manifest and root CID for chunked encrypted content
MeshProofProvider proof metadata for a CID

Sharing And Identity Types

TypeMeaning
ShareCapsuleAccess record wrapping a content key for recipients
ShareOptionsExpiry, policy, vault, capability, and download hint options
OpenOptionsIdentity and capability options for opening shared content
IdentityRecordPublic and optional private identity export/import record
MeshMessageMailbox entry backed by a share capsule

Operations Types

TypeMeaning
MeshSyncJobDurable sync or retry work record
PersistenceProofFilecoin or persistence provider proof record
DoctorReportHealth checks for provider/runtime configuration
ProviderLogSanitized provider operation log entry
MeshKitErrorClassified error with code, message, suggestion, and optional details

Next Steps

On this page