Cookbook¶
Hand-authored recipes that take you from "I have an Android project" to "I shipped a Midnight dApp." Each recipe is a step-by-step runbook with a verification gate after every meaningful step — written so a human or an LLM-driven agent can follow it.
Click into any recipe and you'll see a Copy prompt for your agent button. The button copies a templated prompt that points your agent (Claude Code, Cursor, Codex, etc.) at the raw markdown context bundle for that recipe. Paste the prompt into your agent and let it execute the recipe in your project.
Why agent-friendly?
Each recipe's raw .md source is the same content the rendered page
shows — the agent doesn't need to scrape HTML or guess at structure.
A site-root /llms.txt lists every recipe so any
LLM-aware tool that supports the llms.txt convention
auto-discovers the full cookbook in one fetch.
Recipes¶
-
Add Kuira to an Android project
Install the SDK, set your passkey rpId, configure the Hilt module. ~10 minutes.
-
Bind your app to a passkey domain
Get the debug signing fingerprint, write a single-fingerprint
assetlinks.json, host it on yourrpId, verify Forge works on device. Development-only — release-signing is its own future recipe. -
Bootstrap a passkey-derived sigil session: DID + wallet seed from a single biometric. ~15 minutes.
-
Hello Compact — write your first contract
The 6-line counter that ships with the kuira-starter-android template, walked through line by line. Toolchain pinning, compile,
mn contract inspectverification. For deeper Compact learning, points at the official Midnight examples. -
Deploy and call a Compact contract
Compile a
.compactcontract, sync artifacts into your assets, deploy via the SDK, and call a circuit. ~30 minutes. -
Run kuiraDoctor before each release
The
kuiraDoctorGradle task runs five preflight checks that catch misconfigurations at build time —assetlinks.jsonreachability + applicationId match,minSdkfloor, debug- cleartext manifest, Compact runtime pin, SDK-bundled-runtime layer — before they surface as runtime crashes on a user's device. Run before each release. -
Back up wallet data across devices
Register a Google Cloud OAuth client for the
drive.appdatascope so the wallet's encrypted sync state rides the user's own Drive to a new device — a fast delta restore instead of a full genesis replay. Covers theappDataFolderinvisibility and the same-account caveat. -
Reveal & restore the recovery phrase
Build your own 24-word reveal + restore on the
WalletRecoverycontract — you own the secure screen (FLAG_SECURE, clipboard policy, timing) while the SDK owns the crypto. Plus tuning the session auto-lock that scrubs a revealed phrase.
Recipe conventions¶
Every recipe page follows the same shape, which makes them predictable both for humans and agents:
| Section | Purpose |
|---|---|
| Frontmatter | Tags, prerequisites, raw-bundle URL — machine-readable metadata. |
| Outcome | One sentence: what the developer has at the end. |
| Prerequisites | What must be true before starting. |
| Steps | Numbered, each with code + a Verify gate. |
| Troubleshooting | Common failures + their fixes. |
| Agent prompt | The button at the top of every recipe. |
If the cookbook framework grows to include session state, live-step gates, or CLI-based verifiers in a future release, the existing recipes keep working — the new machinery layers on top without rewriting the content.