Skip to main content
This page gives you a copy-paste setup so Claude Code can generate production-ready app code with @cloak.ag/sdk. Focus: help teams ship wallet-connected apps fast, with the current UTXO + chain-note architecture.

CLAUDE.md template

Create CLAUDE.md in your project:

Cloak SDK App Context (Current)

We integrate @cloak.ag/sdk.

Runtime model

  • Main integration surface is UTXO helpers:
    • transact
    • partialWithdraw
    • fullWithdraw
    • swapWithChange
  • Build for bigint amounts and explicit wallet adapter wiring.

Security

  • Never log private key material, UTXO secrets, or raw viewing keys.
  • Keep wallet signatures in memory only when possible.
  • Treat local encrypted storage as required for user state.

Program IDs

  • Program ID: c1oak6tetxYnNfvXKFkpn1d98FxtK7B68vBQLYQpWKp
Set programId explicitly in app config.

Fee model

  • Fixed fee: 5_000_000 lamports
  • Variable fee: amount * 3 / 1000
  • Fees apply to withdrawals/swaps on-chain.

Required UX behavior

  • Require viewing-key registration before protocol actions.
  • For history, load cached compliance first, then rescan on demand.
  • Show progress for proof generation and scanning.

Docs to follow

  • /sdk/quickstart
  • /sdk/utxo-transactions
  • /sdk/wallet-integration
  • /sdk/api-reference
  • /services/relay-api
  • /architecture/viewing-keys-compliance

Prompt Pack

Use these prompts directly in Claude Code.
Build a React + wallet-adapter integration for @cloak.ag/sdk with these constraints:
  • UTXO-first flow (transact, partialWithdraw, swapWithChange)
  • bigint-safe amount handling
  • progress callbacks for proof/scanning
  • typed error mapping for stale root and relay/network errors
  • no secret logging
Return:
  1. files to create/update,
  2. full code,
  3. run commands.
Implement production-ready handlers for deposit, private send, partial/full withdraw, and swap using current SDK APIs.Requirements:
  • Enforce viewing-key registration before actions
  • Keep local encrypted cache for compliance history
  • Reuse Merkle tree output where applicable
  • Add user-facing loading states and retries
Also add minimal unit tests for amount math and state transitions.
Implement a Privacy History page that:
  • loads encrypted cached report first
  • offers explicit clear cache + rescan
  • uses SDK scanner-derived fee/net fields
  • renders transaction table + summary + CSV export
Keep UX smooth: avoid immediate modal popups on first paint when cache may exist.
Given my current code, identify all SDK integration mismatches and patch them.Then run:
  • Type checks
  • Lint
  • one end-to-end happy path command
Return only:
  • changed files
  • why each change was needed
  • verification output summary.