Skip to content
On this page

Status & error codes

Every verification path — hosted API, SDKs, CLI — returns results as a flat list of status codes. Success codes (sig_ok_bip322, bond_confirmed) sit alongside failure codes (sig_invalid, expired) in the same shape, so your gate can log one canonical stream instead of branching on ok: true | false.

This page is the single source of truth. If you see a code that isn't here, it's a bug — open an issue.

The response shapeLink to this section

A verification returns the same envelope on all three surfaces (/api/verify, the SDKs' verify(), oc verify --json):

JSON
{
    "ok": true,
    "codes": ["sig_ok_bip322", "bond_confirmed"],
    "network": "mainnet",
    "attestation_id": "a3f5b8c2...",
    "metrics": { "sats_bonded": 125000, "days_unspent": 47, "score": 30.12 }
}

attestation_id, identities and metrics are present when the verifier could derive them.

ok: true iff every signature code is a success AND thresholds are met. codes[] is the ordered list of everything the verifier observed — always present, even on success.

Signature codesLink to this section

CodeSeverityMeaningWhat to tell the user
sig_ok_bip322successA BIP-322 simple signature, with or without smp, valid against the declared address.—
sig_ok_legacysuccessA 65-byte legacy signmessage (BIP-137) signature valid against the declared address, on any address type: P2PKH, P2SH-P2WPKH, P2WPKH or P2TR.—
sig_invaliderrorSignature does not match message + address. A valid legacy signature from another key is this too."The signature does not match the message and address. Common issues: (1) the message was not copied exactly, (2) a different address signed it, (3) the wallet signed on another network."
sig_unsupported_scripterrorA BIP-322 full or proof-of-funds signature (ful, pof), refused unread. Before sdk 1.16.0 it meant a legacy signature on a SegWit address."Your wallet made a BIP-322 full or proof-of-funds signature. Sign with a BIP-322 simple signature, or with legacy message signing, which every address type here accepts."
invalid_schemeerrorNot sent from sdk 1.16.0: the signature's bytes decide the scheme, and the scheme input is ignored. Older verifiers sent it for a scheme that was neither bip322 nor legacy."Use a supported signing scheme."
decode_errorerrorCanonical message could not be parsed — malformed header, wrong line endings, bad base64."Copy the full canonical message from Step 2 without modification. LF line endings only, one trailing newline."
invalid_attestation_iderrorattestation_id does not equal sha256(message)."This attestation has been tampered with. Refuse it."

The sign-in check, verifyChallenge, answers with a reason of its own. It refuses a full or proof-of-funds signature as sig_unsupported_scheme, and on success returns scheme: 'bip322' | 'legacy', read from the signature. Its scheme option is deprecated and ignored. Which forms each address type accepts is on BIP-322.

Bond / chain-state codesLink to this section

CodeSeverityMeaningWhat to tell the user
bond_confirmedsuccessConfirmed UTXOs found at the address; sats_bonded and days_unspent are derivable.—
bond_zerowarnAddress has no confirmed UTXOs. Signature is still valid — the bond just doesn't exist."Send sats to this address and wait for one confirmation before retrying."
bond_pendinginfoAddress has only unconfirmed transactions."Wait for the first confirmation (≈10 min)."
bond_insufficienterrorDeclared bond: extension exceeds the confirmed balance."Lower your declared bond, or fund the address up to the declared amount."
bond_malformederrorThe signed bond: line is not a whole number of sats in plain digits, so the attestation does not say how much it bonds."Sign again with the bond written as a whole number of sats."

Policy / threshold codes (returned by /api/check)Link to this section

These are emitted in addition to the signature/bond codes above, when an /api/check call has threshold parameters (min_sats, min_days).

CodeSeverityMeaning
below_min_satserrorsats_bonded < min_sats.
below_min_dayserrordays_unspent < min_days.

When /api/check returns ok: false, these appear under a separate reasons key so your error handler can switch on the cause:

JSON
{
    "ok": false,
    "sats": 50000,
    "days": 12,
    "reasons": ["below_min_sats", "below_min_days"]
}

Context codesLink to this section

CodeSeverityMeaningWhat to tell the user
aud_mismatchwarnaudience in the signed message doesn't match what the verifier expected.Usually means the signature was made for a different host — verify-intentional or refuse, your choice.
expirederrorThe signed expires has passed or is not an RFC 3339 time; for a sign-in challenge, its expires_at."This has expired. Sign a fresh one."
not_yet_validerrorThe signed issued_at is more than two minutes ahead of the verifier's clock."This is dated in the future. Check the clock that signed it, then sign again."
network_testmodewarnSignature is on testnet or signet."Test networks can't be verified in production. Use mainnet."
bad_requesterrorStructural problem with the request body — missing fields, wrong types."Check your request shape against the docs."

Programmatic accessLink to this section

The full table above is shipped as a typed record in the JS SDK:

TypeScript
import type { StatusCode } from '@orangecheck/sdk';

import { STATUS_META } from '@orangecheck/sdk';

const meta = STATUS_META['sig_invalid'];
// → { label: 'Signature verification failed', detail: '...', severity: 'error' }

Use STATUS_META[code].label for short headlines and .detail for the verbose user-facing message. The severity field ('success' | 'info' | 'warn' | 'error') lets your UI apply the right visual treatment without branching on string keys.

The Python SDK has no STATUS_META; use the code strings in this table.

HTTP status vs. status codeLink to this section

The HTTP status says whether the request was processable; the codes[] field says what the verification actually found. Do not conflate them.

HTTPMeaning
200Request was valid and the verifier ran. ok and codes tell you what happened.
400Request shape was wrong — missing addr, malformed JSON, etc. codes may be absent.
401/api/auth/* rejected the session (e.g. not_authenticated).
403Cross-site POST to a browser-only endpoint.
404/api/check subject lookup returned no attestation.
429Rate limit hit. attest.ochk.io sends no Retry-After: wait a minute. See errors by host.
500Verifier crashed. Open an issue.

FurtherLink to this section