reference-typescript
The reference TypeScript package for producing and verifying SignedReceipt envelopes.
- Package
@cloakapi/open-receipt- Version
- 0.1.0
- Depends on
@noble/curves,@noble/hashes- License
- Apache-2.0
- Status
- Not released on npm; build it from the TypeScript source.
About
The package exposes a receipt builder, signing, and a verifier that share one canonicalization pipeline. Signatures use @noble/curves and hashing uses @noble/hashes, its only two runtime dependencies.
For a command-line check, use the Rust binary in verifier-cli.
Use it
verify.ts
import { verify } from "@cloakapi/open-receipt";
// pubKeyHex: the producer's P-256 public key, hex-encoded
const result = verify(signedReceipt, pubKeyHex);
Questions and patches
Bug reports, patches and security advisories go to open-source@cloakapi.io.