@phosra/sdk-dev/protocol is @openchildsafety/ocss re-exported verbatim. Phosra adds zero cryptographic logic to this subpath. If you later integrate a different OCSS-conformant provider, this import is identical across all of them.
The management/protocol boundary
@phosra/sdk-dev has two clearly-named halves. Understanding the split matters because it is the ownership-boundary made legible in code:
The root import (
@phosra/sdk-dev) does not re-export the protocol surface. This is intentional: it keeps crypto off the management import and makes the OCSS/Phosra boundary legible to tree-shakers and to readers.
See Phosra Developer SDK for the full SDK reference including the management half.
What the protocol surface covers
The/protocol subpath is the OCSS reference TypeScript library. It covers the full Trust Framework verification surface:
- Receipt signing and verification — sign OCSS write receipts with an Ed25519 signing key; verify receipts against the Trust List.
- Sealed envelopes — create and open the two-layer OCSS envelope (the
harm_contextrouter-blind lane). - Rule vocabulary and canon — the 123-category rule vocabulary as typed identifiers; canonical JSON serialization for deterministic hashing.
- Family hash derivation — compute the family-scoped hash that appears in receipts and attestation exports.
- Trust List resolution — fetch and verify the Trust List; resolve a signing party’s key from it.
Installation
@openchildsafety/ocss@0.1.5 is published on npm. @phosra/sdk-dev — the unified wrapper that will re-export it as /protocol — is a planned future package; install the exact public OCSS version directly for now (tracked on the status page).@openchildsafety/ocss is a peer dependency — the open OCSS library. Installing it separately keeps the OCSS version pinnable independently of the Phosra management client version.
Usage
Sign a write receipt
Verify a receipt against the Trust List
Sealed envelopes (router-blind lane)
open. This is cryptographic enforcement of the router-blind invariant (OCSS §3A.3), not a policy.
Resolve the Trust List
Verify a signed document to root (copy-paste ready)
Importing directly from @openchildsafety/ocss
Because/protocol is a verbatim re-export, you can import directly from @openchildsafety/ocss if you prefer — the symbols are identical:
@phosra/sdk-dev is not published yet, so every example on this page imports from
@openchildsafety/ocss directly — the published package. When the wrapper ships, the
/protocol subpath will re-export it verbatim and both import forms will resolve to the
same object identities./protocol is recommended when you want the dependency footprint of @phosra/sdk-dev to cover both halves in package.json. Import directly from @openchildsafety/ocss if you are not using the Phosra management surface at all.
Subpath exports
Further reading
- Phosra Developer SDK — the full SDK reference, including the management half
- Trust Framework — the Trust List and signing model the protocol surface implements
- OCSS specification — normative text for signed verbs, envelopes, and the §9.4 attestation export