Operations 9
POST
/api/ladder/wallet-link/challenge
Start linking a wallet to this account — the message to sign
#
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/rokha-ai:rokha-ai-wallets-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
contact:
name: Rokha
url: https://rokha.ai
description: 'The public API of Rokha, the Agent Lab. Build a tool,
run it for real with a trace, sell it or hire it out. Agents use the same
doors over MCP at `/mcp/jsonrpc`. Versioning: `GET /api/schema/version`.'
license:
name: MIT
url: https://github.com/rokha-ai/rokha-sdk/blob/main/LICENSE
title: Rokha Public Wallets API
version: 1.0.0
servers:
- description: Local development (default Erebus port)
url: http://localhost:3000
- description: Production (hosted Erebus)
url: https://erebus.rokha.ai
security: []
tags:
- description: Wallet sign-in (Solana, EVM)
name: Wallets
paths:
/api/ladder/wallet-link/challenge:
post:
description: 'Signed in. Names a Solana wallet and gets back the exact text the
wallet must sign (ed25519 over a server nonce — the same proof a wallet
login is; a signature, never a transaction). One outstanding challenge
per account, ten minutes. Refused: another account''s login wallet
(409 — sign in with it instead), this account''s own login wallet (it
counts already), a malformed address (400).'
operationId: walletLinkChallenge
requestBody:
content:
application/json:
schema:
properties:
wallet:
description: A Solana address (base58)
type: string
required:
- wallet
type: object
required: true
responses:
'200':
content:
application/json:
schema:
properties:
message:
type: string
wallet:
type: string
type: object
description: The message to sign
'400':
description: Not a Solana wallet
or this account's own login wallet: null
'401':
description: Sign in first
'409':
description: That wallet is another account's login
'429':
description: One challenge at a time
security:
- bearerAuth: []
summary: Start linking a wallet to this account — the message to sign
tags:
- Wallets
/api/ladder/wallet-link/remove:
post:
operationId: walletLinkRemove
requestBody:
content:
application/json:
schema:
properties:
wallet:
type: string
required:
- wallet
type: object
required: true
responses:
'200':
content:
application/json:
schema:
properties:
ok:
type: boolean
type: object
description: '`ok` true when a link of yours was removed'
'401':
description: Sign in first
security:
- bearerAuth: []
summary: Drop one of this account's own wallet links
tags:
- Wallets
/api/ladder/wallet-link/verify:
post:
description: Signed in. Verifies the signature over the outstanding challenge and stores the link; a fresh signature moves a link that belonged to another account. Fails closed on a missing, stale or mismatched challenge and on a bad signature. Refresh the session token afterwards so what the wallet holds counts right away.
operationId: walletLinkVerify
requestBody:
content:
application/json:
schema:
properties:
signature:
description: The 64-byte ed25519 signature — base58, or the bytes comma-joined
type: string
wallet:
type: string
required:
- wallet
- signature
type: object
required: true
responses:
'200':
content:
application/json:
schema:
properties:
ok:
type: boolean
wallet:
type: string
type: object
description: Linked
'400':
description: 'No'
stale or mismatched challenge: null
'401':
description: Sign in first
or the signature does not verify: null
'409':
description: That wallet is another account's login
security:
- bearerAuth: []
summary: Finish linking a wallet — the signature over the challenge
tags:
- Wallets
/api/ladder/wallet-links:
get:
description: Signed in. `login_is_wallet` is true when the login itself is a Solana wallet (it counts without a link). Everything a proven wallet holds counts to the account that proved it.
operationId: walletLinks
responses:
'200':
content:
application/json:
schema:
properties:
login_is_wallet:
type: boolean
wallets:
items:
properties:
proven_at:
format: date-time
type: string
wallet:
type: string
type: object
type: array
type: object
description: OK
'401':
description: Sign in first
security:
- bearerAuth: []
summary: The wallets this account proved by signature
tags:
- Wallets
/api/wallets:
get:
operationId: listSupportedWallets
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WalletListResponse'
description: Supported wallet types per chain
summary: List supported wallet types
tags:
- Wallets
/api/wallets/challenge:
post:
operationId: createWalletChallenge
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WalletChallengeRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WalletChallengeResponse'
description: Challenge created
summary: Create a wallet signing challenge
tags:
- Wallets
/api/wallets/detect:
post:
description: 'Reads the user-agent''s wallet provider injections (window.ethereum,
window.solana, etc.) — practically a hint for frontends; safe to
skip for non-browser SDKs.'
operationId: detectWallets
responses:
'200':
content:
application/json:
schema:
additionalProperties: true
type: object
description: Detection result
summary: Detect wallets installed in the user's browser
tags:
- Wallets
/api/wallets/status:
get:
operationId: getWalletStatus
responses:
'200':
content:
application/json:
schema:
additionalProperties: true
type: object
description: Status
summary: Wallet auth status for the current session
tags:
- Wallets
/api/wallets/verify:
post:
operationId: verifyWalletSignature
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WalletVerifyRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WalletVerifyResponse'
description: Verified — JWT + session info
'401':
$ref: '#/components/responses/Unauthorized'
summary: Verify a signed challenge and issue a session
tags:
- Wallets
components:
schemas:
WalletChallengeResponse:
description: Sign `message` with the wallet's key, then POST /api/wallets/verify with `challenge_id` and the signature. The challenge expires in 10 minutes and burns on use.
properties:
challenge_id:
format: uuid
type: string
message:
description: The exact text to sign.
type: string
wallet_address:
type: string
required:
- challenge_id
- message
- wallet_address
type: object
WalletVerifyResponse:
description: '`session_token` is the JWT: send it as `Authorization: Bearer <token>` on every request. A fresh sign-in revokes the token you were already holding.'
properties:
message:
type: string
network:
description: solana or an EVM network name.
nullable: true
type: string
registration_error:
nullable: true
type: string
session_token:
description: The JWT; absent when `success` is false.
nullable: true
type: string
success:
type: boolean
user_id:
format: uuid
nullable: true
type: string
required:
- success
- message
type: object
WalletListResponse:
additionalProperties: true
properties:
ethereum:
items:
type: string
type: array
solana:
items:
type: string
type: array
type: object
WalletVerifyRequest:
properties:
challenge_id:
format: uuid
type: string
signature:
type: string
wallet_address:
type: string
required:
- challenge_id
- signature
- wallet_address
type: object
WalletChallengeRequest:
properties:
chain:
description: Auto-detected from the address when absent.
enum:
- solana
- evm
type: string
wallet_address:
type: string
wallet_type:
description: phantom, metamask, etc.
type: string
required:
- wallet_address
- wallet_type
type: object
ErrorResponse:
properties:
code:
type: string
error:
description: Machine-readable error code
type: string
message:
type: string
name:
type: string
required:
- error
type: object
responses:
Unauthorized:
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: Missing or invalid auth
securitySchemes:
bearerAuth:
bearerFormat: JWT
description: 'JWT issued by `/api/wallets/verify` (after `/api/wallets/challenge`),
or `/api/auth/google/callback`. Send as
`Authorization: Bearer <token>`. Refresh via `/api/auth/refresh`
before expiry (24h default).
'
scheme: bearer
type: http