Skip to content

Quickstart

The shortest path from nothing to a running Kuira dApp, in order — each step has a check so you know it worked. New to Android? Do the Prerequisites first.

This clones the counter starter — a complete, runnable dApp — and makes it yours.

1. Clone the starter

git clone https://github.com/kuiralabs/kuira-starter-android
cd kuira-starter-android

2. Point it at a domain you control (passkey)

The starter's passkey relying-party id is kuiralabs.github.io — you must change it to a domain you host, or every sigil-forge fails with RP_ID_MISMATCH.

  • Set PASSKEY_RP_ID in app/src/main/java/.../di/PasskeyConfigModule.kt to your domain.
  • Host assetlinks.json at https://<your-domain>/.well-known/assetlinks.json with your app's package + SHA-256 signing fingerprint.

Full walkthrough: Bind your app to a passkey domain.

Check

curl -s https://<your-domain>/.well-known/assetlinks.json returns HTTP 200, application/json, listing the SHA-256 from ./gradlew :app:signingReport.

3. Start localnet

mn localnet up
On Windows, if this fails with spawnSync … ETIMEDOUT, use docker compose -f ~/.midnight/localnet/compose.yml up -d instead (see Prerequisites).

Check

mn localnet status shows the node, indexer, and proof server up. Docker is running (docker info).

4. Wire the device to localnet

Nothing to do — the app reaches localnet at 10.0.2.2. (Use SDK 0.1.0-alpha05+ for an x86_64 AVD.)

Forward the three localnet ports to the phone:

adb reverse tcp:9944 tcp:9944 && adb reverse tcp:8088 tcp:8088 && adb reverse tcp:6300 tcp:6300

5. Build & run

./gradlew :app:installDebug      # or hit Run ▶ in Android Studio
SIM-less phone with no "Install via USB"? Use the adb push fallback.

Check

The app launches and shows the wallet panel — no java.lang.UnsatisfiedLinkError. (If you hit one, you're on an x86_64 emulator with alpha03 — use 0.1.0-alpha05+ or an arm64 AVD.)

6. Forge your sigil

Tap Forge sigil. A passkey-derived identity + embedded wallet is created in one biometric.

Check

The wallet panel shows an address. (If Forge fails with RP_ID_MISMATCH, re-check step 2.)

7. Fund the wallet

Copy the wallet address from the panel, then airdrop NIGHT:

mn airdrop 1000 --wallet <addr> --network undeployed

Register dust IN-APP — not from the CLI

Now tap Register dust in the wallet panel to generate the DUST that pays gas. Do this in the appmn dust register --wallet <name> operates on a named mn wallet generate wallet and cannot target the app's embedded wallet address.

Check

The panel shows NIGHT, then DUST after ~30 seconds.

8. Deploy & call the contract

Tap Deploy counter, then Increment.

Check

The count updates after one block (~3s on localnet). If Deploy hangs at "Balancing" and never finishes → the wallet has no DUST → finish step 7 (fund + tap Register dust in-app), then retry.


You have a working zero-knowledge dApp. Next: