Search for embedded wallet API and you usually want the developer surface: authenticate a user, create or look up a wallet, sign, send, sponsor gas, recover a device. This post owns those API and developer-surface queries. An embedded wallet lives inside your application. The full product and SDK page is embedded wallet; the general embedded wallet head term belongs on that product pillar (what is an embedded wallet? has the plain definition). The user signs in the way they already do. The product resolves an on-chain account they can pay, receive, and sign with. There is no browser extension, no seed phrase, and no trip to another app.
The embedded wallet API is that surface on a wallet as a service platform. Cavos ships it as a client SDK, not a public REST create-wallet endpoint. The packages are @cavos/kit, @cavos/kit/react, and @cavos/kit/react-native (a work in progress). Hosted registry, paymaster, and relayer calls happen inside the kit behind an App ID. This guide is the docs-style map of that contract in @cavos/kit 0.5.2, grounded in the API reference. The React integration is the install. Best practices for embedding that wallet SDK (custody, passkeys, Gas Sponsorship in Any Token, errors, and testnet) are in the embedded wallet React SDK guide. The non-custodial guide is the custody test. The providers comparison is the shortlist. Adapters ship today for Starknet, Solana, and Stellar.
Embedded wallet API vs REST
Search embedded wallet API and you often get two products that are not interchangeable.
- A client SDK. Auth,
connect, sponsored execute inside the app. Cavos is this. There is no public create-wallet REST endpoint for your backend to call. The method list is the API reference. Full docs: docs.cavos.xyz.
- A REST or RPC signing layer. Keys, policies, and HTTP. You assemble login and approval. Turnkey-style infrastructure sits here.
The kit talks to hosted registry, paymaster, and relayer services behind an App ID. Those URLs are not a public wallet-create API. Install and first transaction: how to add an embedded wallet. Next.js App Router: how to add an embedded wallet to Next.js.
Embedded Wallet API overview (November 2026)
Authenticate, connect, then execute. That is the whole public surface.
- Auth.
CavosAuth and useCavos().login, sendOtp, verifyOtp. Login selects the user. It never signs.
- Create or look up.
Cavos.connect and CavosProvider. Registry key: (userId, appId, chain, network). Connect never deploys Starknet or Stellar.
- Sign and send.
wallet.execute, signMessage, signTransaction; Solana executeInstructions; Stellar invokeContract.
- Gas. Starknet
paymasterApiKey; Solana and Stellar hosted relayers. Relayers are not signers.
- Recover.
enrollPasskeyDefault(), approveDeviceWithPasskey(). The passkey and Nitro enclave store an encrypted MasterDEK copy for restore.
There is no public REST create-wallet endpoint and no server-side key. The method list is the API reference. The 15-line example below is the same contract.
The embedded wallet API in 15 lines
This is the whole contract with @cavos/kit: authenticate, connect, then execute. Everything else in this guide expands one of these calls.
import { Cavos } from "@cavos/kit";
// 1. Authenticate: Cavos login, or your own stable user id.
const identity = { userId: user.id, email: user.email };
// 2. Connect: look up or claim the address for (userId, appId, chain, network).
const session = await Cavos.connect({
chains: ["solana"],
defaultChain: "solana",
network: "testnet",
appSalt: "my-app", // never change after users exist
identity,
appId: process.env.NEXT_PUBLIC_CAVOS_APP_ID,
});
// 3. Execute: signed on this device. On Solana, pass fee: "sponsored" so the relayer pays.
const wallet = session.wallet("solana");
const txHash = await wallet.execute(1_000_000n, destinationAddress, { fee: "sponsored" }); // lamports
There is no server-side key and no create-wallet HTTP call in your backend. The signature is produced on the user’s device. Keys never leave the device in plaintext and are never used to sign on Cavos servers.
Cavos, LLC is a software and SaaS company. The wallet is the main product: a device-native, self-custodial embedded wallet. Signing keys are created and used on the user’s device. Cavos cannot see them, sign with them, or move funds.
What an embedded wallet API is
An embedded wallet API is not a wallet the user downloads. It is the library, plus the hosted services behind it, that your product calls to:
- Authenticate a session. Login selects which user this is. It should not, by itself, authorize a spend.
- Create or look up a wallet. Given a stable user id, return the on-chain address for this app and chain, or claim a new one.
- Handle keys. Create the signing key, store it, and decide who can produce a signature.
- Sign. Prove ownership off-chain, or authorize a transaction without broadcasting it.
- Send or execute. Submit a native transfer, a multicall, or a program/contract invocation.
- Sponsor gas. Let a first-time user transact without holding the chain’s fee token.
- Recover. Let a new device restore the means to sign after a lost, wiped, or replaced phone.
Vendors package those steps differently. Some ship a finished client SDK (auth modal, wallet handle, sponsored execute). Some ship a REST or RPC signing layer and leave auth and UX to you. The label “embedded wallet API” covers both. It does not decide custody.
What to look for when picking one
Write the answers down before you compare SDKs.
Custody model. Who can produce a valid signature without the user present? Device-native keys, MPC shares, a provider-operated HSM or TEE, and a remote enclave are different answers. “Non-custodial” is a claim. The test is who can move the assets.
Chains. Which networks are native (that chain’s account model, signatures, and fee path) and which are a compatibility layer around an EOA-shaped key. Cavos is Starknet, Solana, and Stellar only. It is not an EVM-wide wallet layer.
Client SDK vs REST. A finished SDK gives you connect and execute inside the app. A signing API gives you keys, policies, and an HTTP surface; you assemble login and approval. Confirm which layer you are buying. Cavos is the first: @cavos/kit, documented at docs.cavos.xyz. Turnkey-style infrastructure is the second. Do not plan a backend POST /wallets against Cavos.
Rate limits and pricing. Units differ: wallet creates, monthly active users, monthly active wallets, signatures, volume. Ask what is metered, what is rate-limited, and whether gas sponsorship is on the public plan. Cavos pricing publishes Free up to 1,000 wallets, Essential at $59 per month, and Complete at $139 per month with enclave recovery. Bind any client-visible sponsorship credential by app, environment, origin, rate, and spend.
Export. Can the user export a private key or seed, or only restore the same address on a new device? Addresses are derived differently across vendors. Migration is a project. Cavos restores the MasterDEK on a new device. It does not advertise a seed or private-key export.
If you still need the named-vendor table, use the providers guide. Worked one-to-one pages live under compare.
How Cavos exposes this
The public developer surface is @cavos/kit. React bindings live on the same package under @cavos/kit/react. Mobile (@cavos/kit/react-native) is a work in progress. The API reference lists every export.
There is no public “create wallet” REST endpoint for your backend to call. Cavos.connect and CavosProvider talk to the hosted registry, paymaster, and relayers behind an App ID. Your code stays on the kit.
The onboarding contract is the same on every adapter: authenticate, connect, then execute. See the quickstart.
SDK methods (what people call the API)
This is the map from the job you searched for to the export you call. None of these are public HTTP routes you POST to from your backend.
| Job | Export | Package | Docs |
|---|---|---|---|
| Authenticate | CavosAuth (getGoogleOAuthUrl, getAppleOAuthUrl, handleCallback, sendOtp, verifyOtp); useCavos().login, sendOtp, verifyOtp, openModal | @cavos/kit, @cavos/kit/react | Authentication, React |
| Create or look up a wallet | Cavos.connect; CavosProvider | @cavos/kit, @cavos/kit/react | Quickstart |
| Read session state | session.wallet(chain), chainStatus, chainAddress; useCavos() (address, wallet, walletStatus, session) | @cavos/kit, @cavos/kit/react | API reference |
| Sign and send | wallet.execute, signMessage, signTransaction; Solana executeInstructions; Stellar invokeContract; React execute is Starknet-only | @cavos/kit, @cavos/kit/react | Wallet actions |
| Gas Sponsorship in Any Token | Starknet paymasterApiKey on connect; Solana hosted relayer as fee payer; Stellar hosted relayer for reserves and fee bumps | @cavos/kit | Quickstart |
| Recover a device | enrollPasskeyDefault(), approveDeviceWithPasskey(); opt-in SocialRecoveryClient | @cavos/kit, @cavos/kit/react | Recovery |
ConnectOptions.backendUrl defaults to Cavos hosted services. That URL is not a public create-wallet REST API. appId is public. The Starknet web SDK also receives paymasterApiKey in browser code, so treat it as a client-visible, app-scoped sponsorship credential.
Auth and session
Authentication exists for one reason: a stable userId (plus optional email) that the registry keys on. The login never signs transactions. That is always the device key.
Hosted login is Google, Apple, or email. GitHub and Telegram are optional web-only providers: add 'github' or 'telegram' to modal.providers, or call login("github") / login("telegram"). They are not available in React Native. In React:
import { useCavos } from "@cavos/kit/react";
const { openModal, login, sendOtp, verifyOtp, logout } = useCavos();
openModal(); // hosted modal
login("google"); // or "apple"; "github" / "telegram" if enabled
await sendOtp(email);
await verifyOtp(email, code); // 9 characters, lowercase letters and digits
Without the provider, CavosAuth is the same contract: getGoogleOAuthUrl / getAppleOAuthUrl, handleCallback, sendOtp, verifyOtp. If you already authenticate users, pass a stable userId as identity. Cavos login turns off: the modal is not mounted and login() throws. Use an immutable primary key, not an email that can change.
See authentication.
Wallet creation
Cavos.connect looks up the address, or claims one. It never deploys Starknet or Stellar.
(userId, appId, chain, network) → registry lookup → address
import { Cavos } from "@cavos/kit";
const session = await Cavos.connect({
chains: ["solana", "stellar", "starknet"],
defaultChain: "solana",
network: "testnet",
appSalt: "my-app",
identity,
appId: process.env.NEXT_PUBLIC_CAVOS_APP_ID,
paymasterApiKey: process.env.NEXT_PUBLIC_CAVOS_PAYMASTER_API_KEY, // Starknet only
});
const solana = session.wallet("solana");
const stellar = session.wallet("stellar");
const starknet = session.wallet("starknet");
The registry is insert-only. The first device to register wins. A second device sees the existing address and enters needs-device-approval instead of creating a duplicate wallet.
| Status | Meaning | Can execute? |
|--------|---------|--------------|
| undeployed | Address derived but no on-chain account yet. | Yes. On Starknet the first execute deploys and runs atomically; on Stellar, call create() first. |
| ready | Account deployed and this device holds the key. | Yes |
| needs-device-approval | This device has no key yet. Restore the MasterDEK. | No. Restore with a passkey or the enclave. |
In React, wrap the tree once in CavosProvider and read address, walletStatus, and wallet from useCavos(). Never change appSalt after users exist: on Solana and Stellar it is also the HKDF salt for the spend key.
Key handling
The wallet’s account key is derived on the user’s device from a MasterDEK. At rest that DEK is protected by the platform’s non-extractable key: WebCrypto in the browser (React Native is a work in progress). Cavos cannot see it.
Each adapter keeps the chain’s native account model:
- Starknet. An audited OpenZeppelin account contract (AccountUpgradeable v3.0.0) controlled by one stark key derived from the MasterDEK and
appSalt. Cavos does not ship its own account implementation. There are no on-chain device signers.
- Solana. A native Ed25519 system account. The spend key is HKDF of the same MasterDEK. A relayer co-signs as fee payer. The address is an ordinary Solana public key, not a PDA.
- Stellar. A classic G… account, not a Soroban contract account. The spend key is one Ed25519 key, HKDF of the MasterDEK (
cavos-ed25519-stellar-v1, salted by appSalt). A new device restores that DEK and derives the same key.
Signing and executing
Narrow on wallet.chain so TypeScript exposes the native method. On Solana and Stellar, call the wallet directly. On Starknet, the context execute(calls) is the multicall.
const { wallet, execute, signMessage } = useCavos();
if (wallet?.status === "needs-device-approval") {
throw new Error("This device has no key yet. Restore the MasterDEK.");
}
if (wallet?.chain === "solana") {
const txHash = await wallet.execute(1_000_000n, destinationAddress, { fee: "sponsored" }); // lamports
} else if (wallet?.chain === "stellar") {
const txHash = await wallet.execute(1_000_000n, destinationAddress); // stroops
} else if (wallet?.chain === "starknet") {
const { transactionHash } = await execute([
{ contractAddress: TOKEN, entrypoint: "transfer", calldata: [to, amountLow, amountHigh] },
]);
}
const { signature, publicKey, curve } = await signMessage("Sign in to dapp.com");
signMessage works on undeployed and ready wallets. Nothing is submitted. Starknet signs SNIP-12 typed data (curve: "stark"). Solana and Stellar sign a prefixed message (curve: "ed25519"). Reconstruct the prefix with prefixedMessageBytes from @cavos/kit before verifying.
wallet.signTransaction(...) signs without broadcasting. The args differ per chain: Starknet takes a multicall; Solana and Stellar take (amount, destination). Outputs bind to on-chain state (nonce, sequence, recent blockhash). Broadcast promptly.
For arbitrary execution, Solana exposes executeInstructions (allowlisted programs) and Stellar exposes invokeContract. See wallet actions.
Gas Sponsorship in Any Token
Users should not need a native token to start. Sponsorship is chain-specific. Relayers and paymasters transport, sponsor, or submit. They are not signers.
| Adapter | Required configuration | Sponsored execution |
|---|---|---|
| Starknet | App ID, network, app salt, identity, paymasterApiKey | Paymaster sponsors deploy and execute. |
| Solana | App ID, network, app salt, identity | The account pays its own fee by default. Pass fee: "sponsored" so the hosted relayer is fee payer; arbitrary programs are allowlisted per app. |
| Stellar | App ID, network, app salt, identity | Hosted relayer can sponsor reserves and fee-bump submission. |
Add paymasterApiKey only when Starknet is in chains. A paymaster key on a chain that ignores it is a config error.
Recovery
A device that is lost, wiped, or replaced takes its key with it. Recovery is a second authority set up before that happens.
On Starknet, Solana, and Stellar, a new device restores the MasterDEK and derives the same spend key. It does not add an on-chain signer. There is no on-chain device-signer list and no on-chain social recovery.
const { walletStatus, enrollPasskeyDefault, approveDeviceWithPasskey } = useCavos();
if (walletStatus.needsDeviceApproval) {
await approveDeviceWithPasskey(); // unwraps the MasterDEK; not an on-chain device list
}
if (!walletStatus.hasPasskey) {
await enrollPasskeyDefault(); // after login; sign-up never prompts
}
walletStatus.recovery is { protected: boolean; methods: ("passkey" | "social")[] }. It starts false and flips once the lookup returns. Read it as “not known to be protected” during the first moments of a connect.
The kit documents three paths: another signed-in device, a passkey, and opt-in hardware-isolated recovery in an AWS Nitro Enclave. The enclave holds only an encrypted copy of the MasterDEK for restore. It cannot sign or move funds, and its code is open source at cavos-labs/cavos-recovery. If every device and every restore factor is gone, Cavos cannot recover the wallet. See recovery.
What to read next
- What is an embedded wallet?: a plain definition, key models, and when to use one.
- embedded wallet, embedded wallets, and the embedded wallet SDK: custody, key models, and how to choose.
- Wallet-as-a-service: platform parts, pricing models, and build versus buy.
- Non-custodial embedded wallets: who can sign, key models, and how to verify a vendor’s claim.
- How to add an embedded wallet to a React app:
CavosProvider, first sponsored transaction.
- How to add an embedded wallet to Next.js: App Router wiring for the same surface.
- Embedded wallet vs smart wallet: account model versus in-app UX.
- Best embedded wallet: how to choose a provider.
- Embedded wallet payments: USDC transfers and Gas Sponsorship in Any Token.
- Embedded wallet React SDK: best practices for embedding a wallet SDK in an app.
- Embedded wallet providers compared: pricing, chains, and key models.
- Embedded wallet vs browser extension: where users should sign.
- How to add an embedded Stellar wallet: social login, the G… before create, first sponsored execute.
- Chain pages: Starknet, Solana, Stellar.
- Quickstart, React, and API reference.
- Open-sourcing the Cavos enclave (Kit 0.5.0): the open-source recovery enclave, GitHub sign-in, and signed enclave releases.
- Sign in with Telegram (Kit 0.5.2): Telegram as an optional hosted login, and enclave release v2.
- Pricing for Free up to 1,000 wallets, Essential at $59, and Complete at $139.