Skip to content

SDK packages

The Ratify Protocol ships reference SDKs in five languages. All five are byte-for-byte interoperable — they produce identical canonical JSON, identical hybrid signatures, and pass the same 59-fixture conformance suite.

LanguageRegistryPackageVersionInstall
Gopkg.go.devgithub.com/identities-ai/ratify-protocolv1.0.0-alpha.8go get github.com/identities-ai/[email protected]
TypeScriptnpm — coming soon@identities-ai/ratify-protocol1.0.0-alpha.8(install from source until org is approved — see below)
PythonPyPIratify-protocol1.0.0a8pip install ratify-protocol==1.0.0a8
Rustcrates.ioratify-protocol1.0.0-alpha.8cargo add [email protected]
C/C++GitHub Releaseslibratify_c.a / libratify_c.so1.0.0-alpha.8Build from source: cargo build --release in sdks/c/

All five versions are released atomically — every tagged release of the protocol contains the same version of every SDK. A consumer using v1.0.0-alpha.8 in Go and v1.0.0-alpha.8 in Python is guaranteed to produce and verify byte-identical bundles.

C/C++ SDKlibratify_c.a (static) and libratify_c.so (shared) with a cbindgen-generated ratify.h header (includes C++ extern "C" guards). Supports embedded RTOS targets (FreeRTOS, Zephyr) via custom entropy. Wire format and conformance fixtures unchanged from alpha.7.

The verifier’s deterministic core is bracketed by pluggable hooks so high-performance, stateful, or compliance-grade implementations can plug in without forking the wire format:

  • RevocationProvider / PolicyProvider / AuditProvider (§17.1–§17.3) — the three core hooks. Each returns (value, error) so lookup failures fail closed.
  • VerificationReceipt (§17.5) — verifier-signed, hash-chained attestation of “this bundle was verified at this time with this outcome.” The cryptographic complement of AuditProvider.
  • PolicyVerdict (§17.6) — HMAC-bound cached policy decision; lets a commercial backend skip live evaluation on subsequent calls. Bound to VerifierContext so a verdict cached for one context cannot leak into another.
  • ConstraintEvaluator registry (§17.7) — pluggable evaluators for extension constraint types (verify.max_concurrent_sessions, etc). Unknown types still fail closed.
  • AnchorResolver (§17.8) — populates VerifyResult.anchor so audit providers observe identity-bound receipts (SSO assertion, government ID, etc).
  • IsRevoked closure is deprecated in alpha.7 and slated for removal in v1.0.0-beta.1. Use Revocation (§17.1) instead.

See Provider architecture for the full picture.

Install from source (TypeScript while npm is pending)

Section titled “Install from source (TypeScript while npm is pending)”
Terminal window
git clone https://github.com/identities-ai/ratify-protocol
cd ratify-protocol/sdks/typescript
npm install
npm run build # → dist/
# Then in your own project, point to the local build:
npm install ../ratify-protocol/sdks/typescript

Once @identities-ai is approved on npm, the canonical install will be:

Terminal window
npm install @identities-ai/[email protected]

Verifying you’ve installed the real thing

Section titled “Verifying you’ve installed the real thing”

Each registry exposes the source of every published version. To prove the package you installed matches the repo:

Terminal window
# Python — PyPI lets you download the wheel directly
pip download ratify-protocol==1.0.0a8 --no-deps -d /tmp
# Compare the wheel's sha256 against the GitHub Release's sha256
# Rust — crates.io publishes via the same git tag
cargo install --version 1.0.0-alpha.8 --git https://github.com/identities-ai/ratify-protocol
# Then run cargo test in the install dir → all 59 fixtures pass
# Go — the Go module proxy serves directly from the GitHub tag
GOPROXY=https://proxy.golang.org go get github.com/identities-ai/[email protected]
# pkg.go.dev shows the source view linked back to the GitHub repo
# C/C++ — build from source or download pre-built libraries from GitHub Releases
git clone https://github.com/identities-ai/ratify-protocol
cd ratify-protocol/sdks/c
cargo build --release
# → target/release/libratify_c.a + libratify_c.so + include/ratify.h

The conformance fixtures are the practical interop check: any SDK passing all 59 produces the same canonical bytes as every other SDK at that version.

All five SDKs are published from a single CI pipeline triggered by a v* tag:

git tag v1.0.0-alpha.8
git push origin v1.0.0-alpha.8
┌─────────────────────────────────────────────┐
│ .github/workflows/release.yml fires │
│ │
│ 1. gate-tests: │
│ - Go tests + race detector │
│ - Test vectors regenerate byte-ident. │
│ - Release-sync (versions aligned) │
│ - TS conformance (59 fixtures) │
│ - Python conformance (59 fixtures) │
│ - Rust conformance (59 fixtures) │
│ - C conformance (42 fixtures) │
│ - Tag ↔ SDK version coherence │
│ │
│ 2. If all pass: │
│ - publish-pypi (Trusted Publisher OIDC) │
│ - publish-crates (token) │
│ - publish-npm (token, when enabled) │
│ - publish-go (pkg.go.dev auto-warm) │
│ - github-release (notes + testvectors │
│ + pre-built C libraries) │
└─────────────────────────────────────────────┘

Any conformance failure blocks the entire release. There is no “publish Python but skip the broken Rust” path — versions stay aligned by design.

See the protocol repo’s docs/RELEASES.md for the full release process and recovery procedures.

During the alpha series, fixture bytes may change between versions. Each alpha release documents the diff in the GitHub Release notes. Consumers pinning to alpha.6 and alpha.7 should expect a small migration.

After 1.0.0 stable ships, fixture bytes are frozen for the entire v1 lifetime. Minor and patch releases add new optional fields and new scopes without changing existing byte representations.