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
| URL | Contents |
|---|---|
/llms.txt | Index of every page with descriptions — a map of the docs. |
/llms-full.txt | The entire documentation as one plain-text file. Paste this into your model's context. |
/llms.mdx/docs/<page>/content.md | Any page's raw Markdown, e.g. /llms.mdx/docs/quickstart/content.md. |
The quickest way to give an assistant everything it needs:
curl https://docs.cavos.xyz/llms-full.txtThen ask it to integrate @cavos/kit into your app.
A prompt that works
Using the Cavos docs below, add
@cavos/kitto my Next.js app for Solana Devnet: a login button, wallet address, sponsored SOL transfer, loading/error states, and the documented recovery flow. Narrow the returned wallet onwallet.chainbefore execution.[paste contents of /llms-full.txt]
What an agent should know up front
- Install:
npm install @cavos/kit. - Every-chain direction, three adapters today: Starknet, Solana, and Stellar (classic
G…account) ship now. Never invent support for a roadmap chain. See Chains. - React Native: use
@cavos/kit/react-nativewith Expo Development Builds/EAS or bare React Native. Expo Go is not supported; configureredirectUri,rpId, and the native config plugin. See React Native. - 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. UseapproveThisDeviceWithPasskey/approveDeviceEverywhereto 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({ chains, defaultChain, network, identity | auth, appSalt, appId, ... }). Returns aCavosSession— callsession.wallet(chain)to get the wallet for a specific chain. Narrow onwallet.chainbefore callingexecute. - Multi-chain sessions: Pass
chains: ["starknet", "solana"]to connect multiple chains at once. Usesession.wallet("solana")to get each chain's wallet. In React, usesetChain()to switch the active chain without remounting. executediffers per chain: Starknet →wallet.execute(calls); Solana →wallet.execute(amount, destination)or allowlistedwallet.executeInstructions(instructions); Stellar →wallet.execute(amount, destination)pluswallet.invokeContract(...)for Soroban calls.- Lazy deploy: Connect NEVER deploys. Wallets start as
undeployed. The firstexecutedeploys + runs atomically.signMessageworks on undeployed wallets too. - Gas sponsorship differs per chain: Starknet uses a paymaster; Solana uses a relayer as fee payer; Stellar uses sponsored reserves and optional fee bumps. Never put a secret sponsorship credential in client-side code.
- Gate execution on status: call
executewhenstatus === "undeployed"ORstatus === "ready". Only"needs-device-approval"blocks execution — route that to multi-device. - Credential boundary:
appIdis public. The current Starknet web SDK also receivespaymasterApiKeyclient-side, so use only an app/environment-scoped key with origin, rate, and spend restrictions—never an operator or treasury secret. - Registry-first address resolution: Addresses are looked up in the Cavos registry first, not purely derived from identity. The registry key is
(userId, appId, chain, network). The first device to claim an address wins.appSaltnamespaces the local device key, not the address. - 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 viaCavos.recover(Starknet),CavosSolana.recover(Solana), or — on Stellar — reconnect on the new device and callwallet.approveThisDeviceWithRecovery(code)(the code unlocks the control key that authorizes the new device). - Social recovery is opt-in and separate: a developer may additionally enable hardware-isolated social recovery for exactly one provider per environment (Google, Apple, or email). It runs inside an AWS Nitro Enclave and is turned on with
socialRecovery: true, which uses the attestation measurement pinned in the installed package — do not ask the developer to paste a measurement.<CavosProvider>drives enrollment and recovery automatically when Cavos handles login. Describe it as hardware-isolated, non-custodial — never as trustless. Don't assume it is on: it is off unless the environment enables it. See Hardware-isolated recovery. - Bring your own auth is first class: pass
identity={{ userId, email }}to<CavosProvider>and Cavos login turns off — the modal is not mounted andlogin()throws. Passnullwhile your auth loads or after sign-out; the identity is never persisted, so your session stays the source of truth. Social recovery still works (see Hardware-isolated recovery): register your OAuth client ID for the environment and callsubmitSocialRecoveryToken(idToken)with the provider's rawid_token(not your own session JWT), fresh within five minutes. Never send the user through a second sign-in for this. - Device management is chain-shaped: on Starknet and Solana devices are on-chain signers —
listDevices()andremoveSigner(pubkey)fromuseCavos(). On Stellar they are envelope slots: usewallet.listDevices()/wallet.removeDevice({ slotId }), and know that revoking there rotates the control key and evicts every other device. See Multi-device. - Ask about the console when a value is missing:
appId, callback URLs, the Solana program allowlist, gas balance, webhooks, and API keys all live in the dashboard, per environment. See Dashboard. - When something fails, check configuration before code. The common causes are a changed
appSalt(every user silently lands on a new empty wallet), an unregistered callback URL, gating onisAuthenticatedinstead ofwalletStatus.isReady, or social recovery not enabled for the environment. See Troubleshooting. - Non-custodial invariant: the on-chain account is the sole authority over signers, and the Cavos backend never holds a signing key. Don't design flows that assume a Cavos server can add a signer. The one narrow exception is enrolled social recovery, where a restricted authority inside an attested enclave may schedule exactly one
add_signer, bounded on-chain by nonce, expiry, and timelock — still not a general server-side signing capability.
Reference pages
Quickstart
Install → gasless transaction.
Starknet
Cairo DeviceAccount + Cavos paymaster.
Solana
secp256r1 precompile + Cavos relayer.
Stellar
Classic account + local control-key unlock + Soroban.
API reference
Every public export.
Concepts
Security model & determinism.
Dashboard
Console: roles, API keys, webhooks, sponsorship.
Troubleshooting
Symptoms, causes, and how to confirm them.