Cavos

For agents & LLMs

Feed these docs to an LLM and let it integrate @cavos/kit for you.

These docs are built to be consumed by AI agents. If you're an LLM reading this, or a developer handing this to one, here's the fast path.

Plain-text endpoints

URLContents
/llms.txtIndex of every page with descriptions — a map of the docs.
/llms-full.txtThe entire documentation as one plain-text file. Paste this into your model's context.
/llms.mdx/docs/<page>/content.mdAny page's raw Markdown, e.g. /llms.mdx/docs/quickstart/content.md.

The quickest way to give an assistant everything it needs:

Terminal
curl https://docs.cavos.xyz/llms-full.txt

Then ask it to integrate @cavos/kit into your app.

A prompt that works

Using the Cavos docs below, add @cavos/kit to my Next.js app: a login button that calls Cavos.connect (Sepolia), shows the wallet address, and a button that runs a gasless cavos.execute. Set up passphrase recovery too.

[paste contents of /llms-full.txt]

What an agent should know up front

  • Install: npm install @cavos/kit.
  • Three chains, all production-ready: Starknet, Solana, and Stellar (classic G… multisig) are live on testnet and mainnet. See Chains.
  • Passkeys are a 2FA step-up, not a signer. After signup, prompt the user for a passkey (cavos.enrollPasskey); it approves new devices on any browser — it never signs transactions. Use approveThisDeviceWithPasskey / approveDeviceEverywhere to self-approve on a fresh device. Caveat: passkey approval on Starknet mainnet isn't available yet (Sepolia only). See Passkeys.
  • One unified entry point: Cavos.connect({ chain, network, identity | auth, appSalt, appId, ... }). The returned wallet is a discriminated union — narrow on wallet.chain before calling execute.
  • execute differs per chain: Starknet → wallet.execute(calls) (arbitrary calls); Solana → wallet.execute(amount, destination) for SOL transfers, or wallet.executeInstructions(instructions) for arbitrary CPI (SPL transfers, swaps) gated by the app's program allowlist; Stellar → wallet.execute(amount, destination) for XLM (stroops), plus wallet.balance(). Stellar is a classic G… multisig account (not Soroban); no arbitrary-call surface today.
  • Gas sponsorship: Starknet needs paymasterApiKey; Solana is gasless via the relayer activated by appId (no paymasterApiKey). Solana arbitrary execute is allowlisted per-app (dashboard → Solana Programs).
  • Gate execution on status: only call execute when status === "ready"; handle "needs-device-approval" via multi-device.
  • Secrets: appId is public (NEXT_PUBLIC_); paymasterApiKey is server-side.
  • Stable userId: the address is derived from it — never let it change for a user.
  • Recovery works on all chains: call wallet.setupRecovery(generateRecoveryCode()) once on a ready device and have the user store the code. Restore after losing every device via Cavos.recover (Starknet), CavosSolana.recover (Solana), or — on Stellar — reconnect on the new device and call wallet.approveThisDeviceWithRecovery(code) (the code unlocks the control key that authorizes the new device).
  • Non-custodial invariant: the on-chain account is the sole authority over signers; the backend never signs. Don't design flows that assume Cavos can add a signer server-side.

Reference pages

On this page