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
| Field | Required | Description |
|---|---|---|
version | Yes | Config schema version. Current value is 1. |
appId | No | Application identifier for operator clarity and future namespacing. |
identity | No | Default client identity. Defaults to self. |
provider | No | Storage and metadata provider. Defaults to local-dev if omitted. |
persistence | No | Optional Filecoin or persistence provider. |
policy | No | Optional policy provider for policy-bound shares. |
Provider Types
| Type | Required fields |
|---|---|
local-dev | optional store |
ipfs-http | ipfsApiUrl, metadataApiUrl |
pinning-service | endpoint, storage |
gateway-retrieval | gatewayUrl, storage |
ipfs-cluster | clusterApiUrl, metadataApiUrl |
fallback | providers |
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
| Use | Avoid |
|---|---|
tokenEnv in committed config files | Inline token in source control |
| runtime secret manager | printing full config objects |
| sanitized env presence logs | logging 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