Reference
HTTP API
Public JSON endpoints: resolve, registry, announcements, unsigned payments.
A public JSON API at https://www.crepus.cash/api/v1 for apps that want Crepus payments without running their own Solana RPC. No key needed, any site may call it (CORS open), and it never sees anyone's keys: it reads the chain and returns unsigned transactions. Scanning with a viewing key stays on the caller's side.
Early release
Endpoints
| Method | Path | Returns |
|---|---|---|
| GET | /api/v1 | Version, cluster, programs, the announcement index, limits |
| GET | /api/v1/resolve?to=… | The meta-address for a .sol name, wallet or meta-address |
| GET | /api/v1/registry/<wallet> | The meta-address a wallet published |
| GET | /api/v1/announcements | Crepus announcements, newest first, for scanning |
| POST | /api/v1/pay | An unsigned payment transaction for the payer's wallet |
Resolve
curl "https://www.crepus.cash/api/v1/resolve?to=bob.sol"{
"to": "bob.sol",
"label": "bob.sol",
"wallet": "3f2D…a19B",
"metaAddress": "st:sol:<K>:<V>",
"spendingKey": "<K>",
"viewingKey": "<V>"
}A name or wallet that never published a meta-address answers 404 with not_found: it cannot be paid privately yet.
Announcements
?limit= 1 to 200 (default 100) and ?before= a signature from the previous page's next. Each item is { signature, blockTime, R, viewTag }; check it with your viewing key (scanAnnouncement in the SDK).
Pay
curl -X POST https://www.crepus.cash/api/v1/pay \
-H "content-type: application/json" \
-d '{ "from": "<payer wallet>", "to": "bob.sol", "amount": "0.25" }'{
"transaction": "<base64, unsigned, recent blockhash set>",
"lastValidBlockHeight": 436901824,
"lamports": 250000000,
"fee": 0,
"stealthAddress": "<one-time address>",
"ephemeralKey": "<R>",
"viewTag": 65,
"recipient": { "label": "bob.sol", "wallet": "…", "metaAddress": "st:sol:…" }
}Decode the transaction (Transaction.from(Buffer.from(transaction, "base64"))), have the payer's wallet sign it, and send it. Pass amount as a SOL string or lamports as a number; the minimum is 0.001 SOL.
/pay, so it knows which one-time address that payment went to (the payer knows too). It cannot open it. To keep even that on your side, build the payment with the SDK's createPayment.Errors
Every error is { "error": { "code", "message" } } with a matching status: 400 for a bad request (bad_wallet, bad_amount, bad_limit…), 404 for not_found / not_registered, 503 rpc_unavailable when Solana did not answer in time.