Skip to content
On this page

attest.ochk.io · OC Attest API

The server-side verification + discovery surface for OC Attest, the identity verb of the orangecheck family. An attestation says "this Bitcoin address controls ≥ X sats unspent for ≥ Y days." The load-bearing primitive is /api/check — one call, one pass/fail.

Surface mapLink to this section

TagEndpointsPurpose
check/api/checkOne-call sybil-gate. ?addr=…&min_sats=…&min_days=… → { ok, score, sats, days }.
verify/api/verifyVerify addr + msg + sig — recompute id, verify the signature, measure the bond. No thresholds; returns codes + metrics.
discover/api/discoverList attestations whose signed message names a subject, from the family Nostr relay set; 503 with attestation_unread when the relays did not finish.
publish/api/publish-attestationServer-side broadcaster. Client builds + signs locally; server fans out to relays.
stats/api/statsNetwork-wide aggregate. Heavy-cached (10 min).

Auth postureLink to this section

Every endpoint is public. No auth, no API keys. Rate-limited per IP per minute (/api/check and /api/discover 60, /api/stats 30, /api/verify 10, /api/publish-attestation 5). Overflow answers 429 with { "error": "rate_limited" } and no Retry-After header. Error bodies are listed on the API reference overview.

The session-bound endpoint (/api/auth/me) on attest.ochk.io is delegated to the family auth host via oc_session cookie verification — it's documented under the auth host's API, not here.

When to use whichLink to this section

You want…Use
One-call "does this address pass?" gate/api/check (or @orangecheck/sdk's check() for in-process)
Full verification of an envelope a client built/api/verify (or @orangecheck/sdk's verify() for in-process)
Browse / list every attestation a subject has/api/discover
Publish a freshly-signed envelope to the family Nostr relay set/api/publish-attestation (or publish directly via @orangecheck/nostr-core if you want the keys)
Network-wide stats for a /status page/api/stats

ConformanceLink to this section

The HTTP routes call the published @orangecheck/sdk (check(), verify() and its discovery helpers), so they answer as the SDK does. The conformance vectors run in the SDK's own tests, and attest.ochk.io's CI sends one of them to /api/verify. If you observe drift, it's a bug.

Live spec — embeddedLink to this section

OpenAPI 3.1 · live spechttps://attest.ochk.io/api/openapi (opens in a new tab)attest.ochk.io · OC Attest
Loading the OpenAPI reference…

See alsoLink to this section