live · mainnetoc · docs
specs · api · guides
docs / overview

SDKs

Every published package in the OrangeCheck ecosystem, with what it does, which protocol it serves, and a link to the full API reference. All packages are MIT-licensed and live in the oc-packages monorepo (TypeScript) or oc-py (Python).

The detailed per-export, per-type, per-signature reference under each TypeScript package is auto-generated from the source via TypeDoc on every release. TSDoc comments in the .ts source are the source of truth; per-package READMEs are short taglines + install + a 30-second example. Hand-written narrative (quickstart, "why this protocol") lives under each protocol's section (OC Attest, OC Pledge, etc.).

Which to install

Match the job to the package; click through to the reference.

You're building…Install
Gate an HTTP route@orangecheck/gate
Sign-in-with-Bitcoin flow@orangecheck/sdk · issueChallenge / verifyChallenge
React app rendering badges@orangecheck/react
Browser wallet integration@orangecheck/wallet-adapter
Server-side TypeScript verifier@orangecheck/sdk
Python / Django / FastAPI serviceorangecheck (PyPI)
Scripts + one-shot checks@orangecheck/cli
Nostr relay filter@orangecheck/relay-filter
Airdrop list filter@orangecheck/airdrop-gate
E2E-encrypted envelopes@orangecheck/lock-core + lock-device
Timestamped signed statements@orangecheck/stamp-core + stamp-ots
Stake-weighted poll tally@orangecheck/vote-core
Scoped, bonded delegated signing@orangecheck/agent-core
Bonded commitments / future claims@orangecheck/pledge-core
Verify HMAC webhook deliveries@orangecheck/webhook-verify

Cross-cutting

Serve every sibling protocol.

PackagePurpose
@orangecheck/sdkCore TypeScript SDK — check(), verify(), createAttestation(), issueChallenge(), scoring.
orangecheck (Python)Python SDK. Same surface as @orangecheck/sdk, same conformance vectors.
@orangecheck/clioc shell — check / verify / create / challenge / discover.
@orangecheck/gateHTTP middleware for Express / Next / Fastify / Hono / Workers.
@orangecheck/react<OcBadge>, <OcGate>, <OcChallengeButton>.
@orangecheck/wallet-adapterOne sign(message) API across UniSat / Xverse / Leather / Alby.
@orangecheck/relay-filterSybil-filter policy for Nostr relays. Strfry plugin + framework-agnostic core.
@orangecheck/airdrop-gateSybil-resistant allowlist filter — turn a candidate list into a filtered set.
@orangecheck/webhook-verifyHMAC verification helpers for webhook deliveries from fleet / me / attest.
@orangecheck/auth-coreEd25519 JWT verify + cookie helpers — consumer half of the ochk.io auth host.
@orangecheck/auth-clientReact provider + hooks for cross-subdomain auth via the ochk.io host.
@orangecheck/nostr-coreBrowser Nostr client (publishEvent, queryEvents, DEFAULT_RELAYS).
@orangecheck/uiShared shadcn-style UI primitives across the family.

Per-protocol packages

OC Lock

PackagePurpose
@orangecheck/lock-cryptoX25519 / HKDF-SHA256 / AES-256-GCM primitives. Narrow surface, audited.
@orangecheck/lock-coreEnvelope format, RFC-8785 canonicalization, seal(), unseal().
@orangecheck/lock-deviceDevice-key generation, BIP-322-bound binding statements, Nostr directory publish.

OC Stamp

PackagePurpose
@orangecheck/stamp-coreCanonical message, envelope format, stamp() + verify(), optional OC Attest reference.
@orangecheck/stamp-otsOpenTimestamps calendar client, proof upgrade, pluggable anchor verifier.

OC Vote

PackagePurpose
@orangecheck/vote-coreReference implementation of oc-vote-protocol — canonicalize, pollId, commit, voterWeight, deterministic tally().
@orangecheck/vote-reactReact components for OC Vote — badge, poll, useTally.

OC Agent

PackagePurpose
@orangecheck/agent-coreDelegation envelope, scope grammar, delegate(), act(), verifyAct(), revocation lookup.
@orangecheck/agent-signerProducer-side signer — wraps a wallet to emit agent-action envelopes.
@orangecheck/agent-mcpModel Context Protocol bindings for agent envelopes.
@orangecheck/agent-anthropicAdapter for Anthropic SDK tool-use canonicalization.
@orangecheck/agent-openaiAdapter for OpenAI SDK tool-call canonicalization.
@orangecheck/agent-langgraphAdapter for LangGraph tool-call canonicalization.
@orangecheck/agent-vercelAdapter for Vercel AI SDK tool-call canonicalization.

OC Pledge

PackagePurpose
@orangecheck/pledge-corePledge envelope, claim grammar, outcome canonicalization, pledge(), attest(), dispute(), deterministic state-machine eval.

Commercial products

PackagePurpose
@orangecheck/me-clientme.ochk.io client SDK — auth, accounts, billable events.

Semver

Everything below 1.0 is pre-stable. Minor bumps CAN change exported types; patch bumps won't. Check the per-package README before upgrading; diff the changelog if something looks ambiguous.

@orangecheck/sdk, @orangecheck/agent-core, @orangecheck/pledge-core, @orangecheck/lock-core, @orangecheck/stamp-core, @orangecheck/vote-core are at v1.0.0+ — wire-format-stable; type changes are semver-respecting.

Cross-implementation conformance

The TypeScript SDK and the Python SDK ship vendored copies of the same canonical test vectors from the protocol repos. CI re-runs both suites on every push and fails on drift. This means: a canonical message built in TS and a canonical message built in Python for the same inputs are byte-identical. Ditto attestation IDs, poll IDs, stamp envelope IDs, pledge IDs. If you ever observe otherwise, it's a bug — please file it.

Local generation of the auto-gen reference

Clone oc-packages and oc-docs as siblings, then:

cd oc-packages
yarn install
yarn docs:gen <pkg>     # regenerate one package
yarn docs:gen:all       # regenerate every package
yarn docs:check         # exit 1 if regenerated docs differ from committed oc-docs

The generator writes into ../oc-docs/src/pages/sdk/<pkg>/. CI gates drift via Phase 3.5: release tags auto-PR the regenerated tree to oc-docs (gated on OC_DOCS_BOT_TOKEN).