Appearance
@tamga-network/mdoc
A minimal ISO/IEC 18013-5 mdoc (mobile document) profile in pure TypeScript (@noble, React Native compatible): deterministic CBOR, COSE_Sign1, the MobileSecurityObject, selective disclosure and device authentication. Tamga issues the identity credential as an mdoc next to its SD-JWT VC, e.g. for age checks that receive age_over_18 and nothing else (ADR-0013).
Install
sh
npm install @tamga-network/mdocUsage
ts
import { issueMdoc, discloseMdoc, verifyIssuerSigned } from "@tamga-network/mdoc";cbor.ts deterministic CBOR (RFC 8949 §4.2.1) · cose.ts COSE_Sign1 (ES256, x5chain), COSE_Key · mdoc.ts issue, disclose, verify, device signing, OpenID4VP session transcript.
Not included (by design)
- NFC/BLE transport — planned (ADR-0012, phase 1).
- The full ISO 18013-7 Annex B session transcript — the demo uses a deterministic digest; interoperability testing is a pilot item.
Status
Pre-release (0.1.0) on npm — written and tested; the API may still change before 1.0. Every release is built from this repository by GitHub Actions and carries npm provenance (verifiable link to the source commit).
Links
- Working examples, run in CI against the real packages:
examples/ - Integration guides and specifications: docs.tamga.network
- Code: Apache-2.0 · Documentation: CC BY 4.0