@passwerk/core
v0.1.1
Published
MCP-free core library: ingest, extract, map, validate, gap-report and emit EU Digital Battery Passports
Maintainers
Readme
@passwerk/core
MCP-free, browser-safe library that turns a neutral PassportDraft into an EU Digital Battery
Passport in the official AAS format (IDTA 02035) and validates it in three layers.
import { emitAasJson, emitAasx, samples, validate } from '@passwerk/core';
const report = validate(samples['ev-valid']); // L1 -> emit -> L2 + L3, verdict 'valid'
const { output, verdict } = emitAasJson(draft); // canonical JSON, re-validated
const aasx = emitAasx(draft); // OPC package with the JSON inside, re-validated from bytesPassportDraft:{ meta, attributes: { [attributeId]: Field } }on the DIN DKE SPEC 99100 grain of@passwerk/rules. Numbers are decimal strings, dates ISO-8601.- Emitters read every idShort, semanticId and valueType from the bundled template catalogue.
- Verdicts are
valid,valid_with_warningsorinvalidand always come from running the validators on the emitted output.
Emitters exist for IDTA 02035-1 (Nameplate), -3 (Carbon Footprint), -4 (Technical Data),
-5 (Product Condition), -6 (Material Composition) and -7 (Circularity). Part 2 (Handover
Documentation) follows with ingest in Phase 4 (ADR D-014). Designs:
docs/superpowers/specs/2026-09-03-core-model-emit-validate-design.md and
docs/superpowers/specs/2026-09-04-core-emit-parts-4-5-7-design.md.
