Wallets (public keys)

A "wallet" in Cassia is an xpub you've registered for a specific chain. Cassia derives deposit addresses from the xpub — we never see your seed, we never custody, we can't sign or move funds. Solana is the one exception: it has no xpub, so a Solana wallet is a pool of 200 addresses your browser derived — see the Solana pairing shape below.

All mutations (POST, PATCH, DELETE) require TOTP (2FA). Set up 2FA in Settings before calling these.

Endpoints

  • POST/api/public-keys
    register xpub. Body: { chain, xpub, strategy }.
  • POST/api/public-keys/batch
    atomic multi-pairing register. Body: { strategy: 'reuse'|'single_use', pairings: [{chain, xpub}, ...] } (1–10 pairings, each chain at most once). Returns { group_id, registered, skipped }. One TOTP code gates the whole operation; either every pairing commits with a shared wallet_group_id, or all are rolled back. Used by the in-browser BIP39 generator to register all 7 chain wallets from one seed in one click.
  • GET/api/public-keys
    list with usage stats: addresses_count, in_use_count, fresh_count, received_lifetime, last_activity_at, is_active.
  • PATCH/api/public-keys/:id
    switch strategy between single_use and reuse.
  • DELETE/api/public-keys/:id
    soft-delete (revoke). Historical derivations remain.

The Solana pairing shape

POST /api/public-keys/batch accepts two kinds of pairing, and Solana's is structurally different: there is no xpub, so it carries a root public key plus the pre-derived pool. A Solana pairing must use the Solana shape — { chain: "solana:mainnet", xpub } is rejected.

JSON
{
  "strategy": "single_use",
  "pairings": [
    { "chain": "eip155:1", "xpub": "xpub6C..." },
    {
      "chain": "solana:mainnet",
      "rootPublicKey": "<base58 ed25519 public key>",
      "addresses": ["<base58>", "…exactly 200 entries…"]
    }
  ]
}

addresses must contain exactly 200 base58 addresses, derived on the client at m/44'/501'/{index}'/0' for indices 0–199. Cassia derives and stores the USDT and USDC associated token accounts for every address; each invoice is watched on the associated token account for its own token. This endpoint is what the dashboard generator calls; there is no separate single-wallet Solana route, and POST /api/public-keys rejects solana:mainnet outright.

Reading the pool counters

GET /api/public-keys returns fresh_count alongside addresses_count and in_use_count. fresh_count is the number of addresses that have never been handed to an invoice — it is not addresses_count − in_use_count, which also counts already-used addresses waiting out their cooldown. On a fixed-size Solana pool that difference is the whole signal: a pool cycled once through reuse can read as “180 free” by subtraction while having zero never-used addresses left. If you build your own low-pool alerting, key it off fresh_count.

Troubleshooting

"I only see a seed phrase, not an xpub."

Correct — never paste the seed into Cassia or any website. Export the xpub separately. See wallet setup guide for the offline BIP39 tool route.

"MetaMask / Trust Wallet don't show an xpub."

They hide it. Export the 12/24-word seed from the app, then derive the xpub offline via an air-gapped BIP39 tool. Pick ETH or TRX depending on your target chain.

"Ledger / Trezor?"

Use a companion CLI (Ledger Live CLI, Electrum) or open the device in MEW Wallet — surfaces the account-level xpub at m/44'/60'/0' for EVM.

"I pasted and got 'wrong prefix'."

You probably pasted ypub/zpub (Bitcoin SegWit). Cassia accepts only standard xpub. Regenerate in the right format.

"Can I use my exchange deposit address?"

No. Exchange deposit addresses are custodial (the exchange holds the key), rotate without notice, and can't be derived from. Use your own wallet — that's the point of Cassia.

Updated . For integration help, email [email protected]

From signup to payment setup in 7 minutes

Start accepting
payments today
on 5 blockchains.

Create accountRead documentation