NIGHTPASS App

Digital Product Passports on Midnight for two product families: the EU battery passport (Regulation 2023/1542) and the component passport for safety-related parts of regulated plants. One dataset, a different view per audience: public, legitimate interest, authority. Sensitive numbers like “recycled cobalt share is at least the legal minimum” are proven without revealing the value. Only a payload hash and public metadata go on-chain. Everything else stays encrypted off-chain. NIGHTPASS is the shielded twin of DAYPASS on Cardano and is built on NIGHTGATE.

Highlights

  • Three disclosure levels (Annex XIII): public metadata for consumers, chemistry, capacity and recycled shares for recyclers, everything incl. supplier identities for authorities, enforced server-side by after READ handlers
  • Field-bound ZK claims: value <= threshold, value >= threshold or membership in a published allow-list, bound to a Merkle root over the passport’s fields anchored at attest time. Up to 8 claims in one transaction
  • One contract: attestation-vault: attest, passport id binding, disclosure grants, content-root anchoring, claims
  • One transaction per anchor: attest, id binding and content root land in a single batched transaction
  • No crypto needed: keys and proving stay on the NIGHTPASS server, a NIGHTGATE sponsor pays the fees and submits
  • Versioned anchors and handover: a substantive change re-anchors as a new version, every old version stays verifiable; a passport can be handed to a new operator on-chain
  • On-chain disclosure grants: an active grant raises a partner’s level per passport
  • Catena-X export: CX-0143 aspect JSON + Predicate Attestation Credential (PAC) with valueDisclosed: false

Stack

LayerTech
NetworkMidnight preprod
Chain accessa NIGHTGATE API through @odatano/nightgate-tx, with an agent grant or a gateway key
Smart contractCompact (attestation-vault)
BackendSAP CAP (@sap/cds ^10), Node.js >= 22, TypeScript
Frontendproducer cockpit, passport viewer, public Passport Explorer
Signingserver wallets or Lace (DApp-Connector)
DataspaceCatena-X CX-0143 + PAC

Anchor Flow

ERP goods receipt (signed webhook)
  → createPassport → auto-anchor:
     1. registerDocument                          tx   the registrar assigns the passport id
     2. attest + bindDocument + anchorContentRoot tx   one batched transaction
     3. prove                                     tx   optional, up to 8 claims

Live example (preprod): passport BAT-TRY-20260724205823-7A26, anchored by a public visitor with a zero-funded wallet in 4.1 minutes, three transactions. Try it at demo.zkpassport.eu.

Apps and Services on :4004

/producer/webapp/index.html   producer cockpit (create, attest, disclose, prove)
/passport/webapp/             passport viewer, one app / three levels
/explorer/                    public Passport Explorer, live on-chain verification
/api/v1/bms-sim               BmsSimulatorService (simulated BMS telemetry)
/api/v1/producer              ProducerService
/api/v1/passport              PassportService

Anonymous resolves to the public level; demo users producer / recycler / authority. Dataspace partners log in with their BPN and see only passports granted to them, at the granted level.

Quick Start

Requires Node.js >= 22.

git clone https://github.com/ODATANO/NIGHTPASS && cd NIGHTPASS
npm install            # postinstall generates @cds-models + builds the connector lib
cp .env.example .env   # ENCRYPTION_KEY, NIGHTGATE_API_URL, NIGHTGATE_AGENT_TOKEN, PASSPORT_CONTRACT_ADDRESS
npm run deploy         # creates db/passport.db
npm start              # http://localhost:4004

Open http://localhost:4004/ for the launchpad.

Sourcecode

github.com/ODATANO/NIGHTPASS