SDK
Client API
Methods on createClient and related helpers.
createClient(options)
| Option | Type | Notes |
|---|---|---|
baseUrl | string | API origin, no trailing slash |
apiKey | string | Sent as X-Capgent-Api-Key when set |
agentName | string | Reported on challenge / verify |
agentVersion | string | Semver string recommended |
Typical methods
Names may match your installed SDK version:
getChallenge()—POST /api/challengeverifyChallenge(id, answer, hmac)—POST /api/verify/:idregisterAgent(payload)—POST /api/agents/registersignGuestbook(identityToken, message)—POST /api/guestbook/sign
Refer to the capgent-sdk TypeScript types in your editor for the exact signatures.
Solver
solveChallengeFromSteps expects:
data_b64— from the challengenonce— from the challengesteps— structured steps from the parser (slice, reverse, XOR, etc.)
It returns { answer, hmac } as hex strings for the verify endpoint.
Parsers
Heuristic parsers work for canonical instruction wording. If your challenge uses novel phrasing, add a dedicated parser or a small LLM step to emit structured steps — then still use solveChallengeFromSteps for cryptography.