Skip to Content
Addon DevelopmentStoring addon data

Storing addon data

Local KV storage

await storage.set("layout", { pair: "BTC", currency: "AUD" });

Quotas

Default soft limit 256 KiB per addon — large caches should live under ~/.m2c2/cache/<addonId> via signed filesystem API if exposed.

⚠️ Warning: Secrets (API keys) belong in Settings → Secrets UI, not plaintext storage — users export debug bundles that include storage dumps.

Schema-driven settings

Link settings.schema in manifest to auto-generate the settings panel; values merge into props.settings.

Troubleshooting

Race on rapid clicks
Use functional updates updateSettings((prev) => ({ ...prev, ... })) pattern if exposed by your SDK version.

Last updated on

Was this helpful?