MeshKit
Reference

Configuration

MeshKit provider and runtime configuration reference.

Use configuration when the default local development provider is no longer enough. Configuration should make provider boundaries explicit and keep secrets outside committed files.

Minimal Local Config

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

Production IPFS HTTP Config

{
  "version": 1,
  "appId": "mk_production_app",
  "provider": {
    "type": "ipfs-http",
    "ipfsApiUrl": "https://ipfs-api.internal.example",
    "metadataApiUrl": "https://meshkit-metadata.internal.example",
    "tokenEnv": "MESHKIT_PROVIDER_TOKEN",
    "timeoutMs": 15000,
    "retries": 2
  }
}

Config Fields

FieldRequiredDescription
versionYesConfig schema version. Current value is 1.
appIdNoApplication identifier for operator clarity and future namespacing.
identityNoDefault client identity. Defaults to self.
providerNoStorage and metadata provider. Defaults to local-dev if omitted.
persistenceNoOptional Filecoin or persistence provider.
policyNoOptional policy provider for policy-bound shares.

Provider Types

TypeRequired fields
local-devoptional store
ipfs-httpipfsApiUrl, metadataApiUrl
pinning-serviceendpoint, storage
gateway-retrievalgatewayUrl, storage
ipfs-clusterclusterApiUrl, metadataApiUrl
fallbackproviders

Optional Services

{
  "persistence": {
    "type": "filecoin-http",
    "endpoint": "https://filecoin.internal.example",
    "tokenEnv": "MESHKIT_FILECOIN_TOKEN"
  },
  "policy": {
    "type": "lit-http",
    "endpoint": "https://policy.internal.example",
    "tokenEnv": "MESHKIT_POLICY_TOKEN"
  }
}

Secret Handling

UseAvoid
tokenEnv in committed config filesInline token in source control
runtime secret managerprinting full config objects
sanitized env presence logslogging token values

Application code can pass resolved token values when the runtime obtains them safely. CLI config should usually use tokenEnv.

Validation

npx -p @meshkit/cli meshkit doctor --json
npx -p @meshkit/cli meshkit providers test --json

Next Steps

On this page