Skip to main content
Use this page to point coding agents at the right Cloak docs before they write code.

Canonical AI files

FilePurpose
/llms.txtTop-level index of docs routes and integration entrypoints
/llms-full.txtCurated full export for agents that prefer one file
/sdk/llms.txtExhaustive SDK contract and runtime invariants
/.well-known/llms.txtCompatibility alias that points to canonical files
  1. /llms.txt
  2. /llms-full.txt
  3. /sdk/llms.txt
  4. /sdk/quickstart
  5. /sdk/utxo-transactions

One-shot prompt: simple SOL send flow

Use this as your first message in Claude Code, Cursor, or Windsurf.
Implement a minimal Cloak integration for a simple SOL send flow using @cloak.dev/sdk.Read these docs first and follow them exactly:
  • /llms.txt
  • /llms-full.txt
  • /sdk/llms.txt
  • /sdk/quickstart
  • /sdk/utxo-transactions
  • /sdk/wallet-integration
Build requirements:
  1. Use the UTXO API (not legacy note APIs) and keep transaction amounts as bigint.
  2. Implement deposit then full withdraw (send) flow:
    • deposit with transact(...)
    • send with fullWithdraw(...)
  3. Include one integration path using keypair bytes and one using wallet-adapter where relevant.
  4. Add progress and error states suitable for production UX.
  5. Never log secrets (private keys, viewing keys (nk), raw note payloads, seed material). Transaction signatures are public and may be logged for support/debugging.
  6. Rely on SDK default stale-root handling for standard flows; do not add custom retry loops unless explicitly requested.
  7. Use SDK defaults for program, relay, and circuits. Do not ask end users to configure these.
  8. For script-only tasks, default to keypair path + lamports CLI (<recipientPubkey> <lamports>).
  9. For script-only tasks, parse recipient/amount from CLI args (not env) and exit explicitly (process.exit(0|1)).
Return format:
  • capability matrix (used / not used) for: note API, UTXO API, scanner/compliance, viewing keys/metadata encryption, relay/proof/Merkle helpers, utility modules
  • file-by-file patches
  • commands run
  • verification summary

Success checklist

  • UTXO flow is the primary execution path.
  • externalAmount semantics are correct (>0 deposit, <0 withdraw).
  • All tx amount math stays in bigint.
  • No secret leakage in logs or telemetry.
  • No raw private key env var (SENDER_PRIVATE_KEY) and no float amount parsing (AMOUNT_SOL, parseFloat).
  • No RECIPIENT_ADDRESS/SEND_LAMPORTS env contract for one-file scripts; use CLI args.
  • Script exits explicitly on success/failure (process.exit(0|1)).
  • Docs references are included in the implementation notes.

Ultra-short prompt fallback

When the user prompt is short/vague (including non-English prompts), default to this output shape:
  • one file only
  • keypair-based send path
  • CLI: npx tsx send-sol-private.ts <recipientPubkey> <lamports>
  • recipient/amount read from process.argv
  • env vars: SOLANA_RPC_URL, KEYPAIR_PATH
  • no user-facing relay/circuits/program config
  • explicit process.exit(0) on success and process.exit(1) on failure
Example short prompt that should still produce valid output: faca um script com esse sdk para mandar sol privado https://docs.cloak.ag