@open-charging-cloud/wwcp-poi 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/CHANGELOG.md +300 -0
  2. package/LICENSE +661 -0
  3. package/README.md +300 -3
  4. package/dist/client.d.ts +56 -0
  5. package/dist/client.d.ts.map +1 -0
  6. package/dist/common.d.ts +34 -0
  7. package/dist/common.d.ts.map +1 -0
  8. package/dist/crypto/hash.d.ts +11 -0
  9. package/dist/crypto/hash.d.ts.map +1 -0
  10. package/dist/crypto/signature.d.ts +16 -0
  11. package/dist/crypto/signature.d.ts.map +1 -0
  12. package/dist/encoding/cbor.d.ts +25 -0
  13. package/dist/encoding/cbor.d.ts.map +1 -0
  14. package/dist/encoding/text.d.ts +24 -0
  15. package/dist/encoding/text.d.ts.map +1 -0
  16. package/dist/errors.d.ts +22 -0
  17. package/dist/errors.d.ts.map +1 -0
  18. package/dist/etags.d.ts +32 -0
  19. package/dist/etags.d.ts.map +1 -0
  20. package/dist/history/apply.d.ts +17 -0
  21. package/dist/history/apply.d.ts.map +1 -0
  22. package/dist/history/archive.d.ts +43 -0
  23. package/dist/history/archive.d.ts.map +1 -0
  24. package/dist/history/changeSet.d.ts +58 -0
  25. package/dist/history/changeSet.d.ts.map +1 -0
  26. package/dist/history/checkpoint.d.ts +83 -0
  27. package/dist/history/checkpoint.d.ts.map +1 -0
  28. package/dist/history/commit.d.ts +69 -0
  29. package/dist/history/commit.d.ts.map +1 -0
  30. package/dist/history/epoch.d.ts +44 -0
  31. package/dist/history/epoch.d.ts.map +1 -0
  32. package/dist/history/history.d.ts +149 -0
  33. package/dist/history/history.d.ts.map +1 -0
  34. package/dist/index.d.ts +59 -0
  35. package/dist/index.d.ts.map +1 -0
  36. package/dist/index.js +7555 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/json/canonical.d.ts +18 -0
  39. package/dist/json/canonical.d.ts.map +1 -0
  40. package/dist/json/decimal.d.ts +39 -0
  41. package/dist/json/decimal.d.ts.map +1 -0
  42. package/dist/json/parse.d.ts +13 -0
  43. package/dist/json/parse.d.ts.map +1 -0
  44. package/dist/json/value.d.ts +43 -0
  45. package/dist/json/value.d.ts.map +1 -0
  46. package/dist/keys.d.ts +51 -0
  47. package/dist/keys.d.ts.map +1 -0
  48. package/dist/live.d.ts +70 -0
  49. package/dist/live.d.ts.map +1 -0
  50. package/dist/merkle.d.ts +29 -0
  51. package/dist/merkle.d.ts.map +1 -0
  52. package/dist/network/certificates.d.ts +12 -0
  53. package/dist/network/certificates.d.ts.map +1 -0
  54. package/dist/network/effective.d.ts +13 -0
  55. package/dist/network/effective.d.ts.map +1 -0
  56. package/dist/network/evTaler.d.ts +51 -0
  57. package/dist/network/evTaler.d.ts.map +1 -0
  58. package/dist/network/identifications.d.ts +14 -0
  59. package/dist/network/identifications.d.ts.map +1 -0
  60. package/dist/network/partyKeys.d.ts +19 -0
  61. package/dist/network/partyKeys.d.ts.map +1 -0
  62. package/dist/network/roamingNetwork.d.ts +76 -0
  63. package/dist/network/roamingNetwork.d.ts.map +1 -0
  64. package/dist/network/tree.d.ts +44 -0
  65. package/dist/network/tree.d.ts.map +1 -0
  66. package/dist/network/versionTexts.d.ts +23 -0
  67. package/dist/network/versionTexts.d.ts.map +1 -0
  68. package/dist/proofs/attestation.d.ts +35 -0
  69. package/dist/proofs/attestation.d.ts.map +1 -0
  70. package/dist/proofs/keyStatement.d.ts +65 -0
  71. package/dist/proofs/keyStatement.d.ts.map +1 -0
  72. package/dist/proofs/priceStatement.d.ts +105 -0
  73. package/dist/proofs/priceStatement.d.ts.map +1 -0
  74. package/dist/proofs/signingKeyCertificate.d.ts +27 -0
  75. package/dist/proofs/signingKeyCertificate.d.ts.map +1 -0
  76. package/dist/proofs/stationProof.d.ts +96 -0
  77. package/dist/proofs/stationProof.d.ts.map +1 -0
  78. package/dist/proofs/trustAnchor.d.ts +54 -0
  79. package/dist/proofs/trustAnchor.d.ts.map +1 -0
  80. package/dist/qidigital/calibrationCertificate.d.ts +92 -0
  81. package/dist/qidigital/calibrationCertificate.d.ts.map +1 -0
  82. package/dist/qidigital/certificateOfConformity.d.ts +68 -0
  83. package/dist/qidigital/certificateOfConformity.d.ts.map +1 -0
  84. package/dist/qidigital/declarationOfConformity.d.ts +70 -0
  85. package/dist/qidigital/declarationOfConformity.d.ts.map +1 -0
  86. package/dist/qidigital/document.d.ts +64 -0
  87. package/dist/qidigital/document.d.ts.map +1 -0
  88. package/dist/qidigital/json.d.ts +85 -0
  89. package/dist/qidigital/json.d.ts.map +1 -0
  90. package/dist/qidigital/network.d.ts +49 -0
  91. package/dist/qidigital/network.d.ts.map +1 -0
  92. package/dist/qidigital/parts.d.ts +136 -0
  93. package/dist/qidigital/parts.d.ts.map +1 -0
  94. package/dist/verifier/chargingStation.d.ts +132 -0
  95. package/dist/verifier/chargingStation.d.ts.map +1 -0
  96. package/dist/verifier/checkpoints.d.ts +33 -0
  97. package/dist/verifier/checkpoints.d.ts.map +1 -0
  98. package/dist/verifier/evTaler.d.ts +19 -0
  99. package/dist/verifier/evTaler.d.ts.map +1 -0
  100. package/dist/verifier/evidence.d.ts +60 -0
  101. package/dist/verifier/evidence.d.ts.map +1 -0
  102. package/dist/verifier/trust.d.ts +71 -0
  103. package/dist/verifier/trust.d.ts.map +1 -0
  104. package/dist/verifier/version.d.ts +32 -0
  105. package/dist/verifier/version.d.ts.map +1 -0
  106. package/package.json +93 -5
package/CHANGELOG.md ADDED
@@ -0,0 +1,300 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0 (unreleased)
4
+
5
+ The first milestone: the examples A1 to A14 of WWCP_POI (commit `33447ac`) checked in TypeScript.
6
+
7
+ The findings of the review this port made of the C# implementation are cited as csharp-review N, N the number of the
8
+ finding in
9
+ [docs/csharp-review.md of WWCPPOIConformanceTests](https://github.com/OpenChargingCloud/WWCPPOIConformanceTests/blob/master/docs/csharp-review.md);
10
+ `docs/` of this repository held it up to `b9c786e`.
11
+
12
+ - Canonical JSON and deterministic CBOR of Styx; a lossless JSON parser keeping decimals as `System.Decimal` holds them.
13
+ - COSE keys, RFC 9679 thumbprints, signatures ES256/384/512, ES256K, ESP*, ESB*, Ed25519, Ed448, ML-DSA-44/65/87.
14
+ - Trust anchors (QR code, URL, JSON), key statements, certificates of signing keys; trust following the key statements
15
+ of a history (`OperatorTrust.followedBy`).
16
+ - Roaming networks with their ETags, effective members and the effective tree; proofs of charging stations, attestations,
17
+ the manufacturers and models of the station and its meters (`manufacturer`, `energyMeterModels`), the transparency
18
+ software and certificates of their energy meters.
19
+ - Change sets with their owners' signatures, commits, linear histories, checkpoints, their proofs and signatures by the
20
+ roaming network operator and by witnesses, archive segments; epochs, their final checkpoints and the genesis of the
21
+ next one.
22
+ - Charging station and energy meter manufacturers, parties stating their models; transparency software manufacturers and
23
+ conformity assessment bodies, parties holding their releases and certificates; the key usages `models`, `software` and
24
+ `certificates`; energy meter templates and groups.
25
+ - Price statements, their chains, checkpoint trees and proofs; evidence of a charging session as the app of example A10
26
+ keeps it (`parseEvidence`).
27
+ - The runtime status: status updates, frames of the WebSocket of a history, the runtime status of a snapshot.
28
+ - `POIClient`: the proof of a charging station and its prices, from the servers of a trust anchor.
29
+
30
+ Moving from the examples at `2d9511d` to `bbd4cbd` also made the ownership of changes the one of the C# implementation
31
+ where the port differed: identity keys of the roaming network operator counted for every change of a party, not only for
32
+ its keys; where it signs in place of a party without keys, its signing keys counted when they may sign `party`, not
33
+ when they may sign the usage of the change (csharp-review 13); its identity and signing keys counted alike for
34
+ everything it owns; and the signing keys of a party could not rotate its signing keys. The values of change sets are
35
+ kept in the order the C# implementation keeps them in (csharp-review 10).
36
+
37
+ Moving on to `801bbce`, the manufacturers became parties: the roaming network operator adds and removes them, they change
38
+ their own properties and state their models with a key that may sign `models`, every change of a model naming its
39
+ manufacturer. A change set changes only the properties of a party the C# implementation lets it change, so that the
40
+ models, releases and certificates of a party are not replaced as one of its properties by a key that may not sign them.
41
+ `forThisModel` of the transparency software of a meter asks for the version of the certificate among the versions of the
42
+ model as well.
43
+
44
+ Node.js 22.18 is the minimum, as of ChargyCore.TS: Node 20 has reached its end of life, and tsup 9, Vitest 5 and
45
+ ESLint 10 do not run on it. The code follows the ESLint rules of ChargyCore.TS; where a missing value used to be asserted
46
+ away, it is refused with a `POIError` saying what is missing. Tests of the bundle as published (its imports, its
47
+ declarations for TypeScript apps, the files `npm pack` takes) and of the library in Chromium join the tests in Node; GitHub
48
+ Actions run all of them on every push, and every night against floating dependencies, the newest codecs of Vanaheimr, and
49
+ the C# examples of WWCP_POI as they are.
50
+
51
+ The test vectors moved to WWCPPOIConformanceTests, which generates golden vectors - canonical JSON and CBOR, encodings,
52
+ the examples of section 6 of the specification, signed station proofs against a trust anchor, the documents of the run of
53
+ the C# examples, and documents to refuse - and runs them against this library and the C# implementation alike. This
54
+ repository vendors them in `tests/vectors` and runs them in `tests/conformance.test.ts`. The nightly check against the C#
55
+ examples of WWCP_POI master moved there as well.
56
+
57
+ The codecs of Vanaheimr are `@vanaheimr/cose` 0.10.0 and `@vanaheimr/metrological-cbor` 0.11.1: `@vanaheimr/cose` 0.9.0
58
+ brought a CBOR codec 0.10 of its own next to the 0.11 this library uses, so that an app installed two copies of it; now
59
+ there is one.
60
+
61
+ The digest of a price statement leaves its signature value out, as WWCP_POI does since `dbf39b0` (SPECIFICATION.md 12.1):
62
+ the SHA-256 of its signature input. The ECDSA twin `(r, n − s)` of a statement, which anybody can make of it, is the same
63
+ statement, of the same digest (csharp-review 2); `PriceStatement.sameSignedContent` is gone. The test vectors
64
+ are those WWCPPOIConformanceTests generates for it, with a new run of the C# examples at `dbf39b0`
65
+ (`tests/vectors/csharp-dbf39b0`).
66
+
67
+ The price statements of an entity are one chain in whichever spelling they name it, as WWCP_POI keys them since
68
+ `4680d99` (SPECIFICATION.md 12.1 to 12.3, `RoamingNetworkHistory.ChainOf`): by its type and its identification without
69
+ `*`, whitespace around it, or case (`priceStatementChainOf`, `PriceStatement.chain`), so that `DE*GEF*E1*1` and
70
+ `DE*GEF*E11` are one EVSE and a split view between them is seen. `follows` compares chains; `verifyPriceStatements`
71
+ refuses a statement naming an entity of the station otherwise than the roaming network does, before its signature is
72
+ looked at; `verifyCheckpointPriceStatements` refuses a checkpoint naming two statements of one entity and sequence with
73
+ different digests, in the order of its tree, both in the words of WWCP_POI. A sequence is at most 2^53 − 1
74
+ (`MAX_PRICE_STATEMENT_SEQUENCE`), as it was read here already. Not ported, as they bound what a server takes: a statement
75
+ more than 1,000,000 beyond the current one of its entity, and the statements a server keeps per operator for its next
76
+ checkpoint. The golden vectors hold both refusals (`tests/vectors/poi-refusals.json`, 75 vectors): the
77
+ statement of example A10 naming its EVSE as `DE*GEF*E11`, checked with the proof of its station
78
+ (`entityPriceStatement`), and checkpoint 4 naming a fourth statement of one sequence, in the other spelling and of
79
+ another price (`checkpointPriceStatements`, its control the checkpoint and its statements as published).
80
+
81
+ The holders of a quorum are counted as the trust anchor names them, as WWCP_POI does since `3e32f48` (SPECIFICATION.md
82
+ 4.1, 8.6; csharp-review 1): a trust anchor names the keys per holder, the `@id` of its key or the array of the
83
+ `@id`s of its keys (`TrustAnchor.holders`; in the URL the holders separated by `,`, the keys of one holder by `;`).
84
+ `KeyStatement.verifyHolders` counts the holders as the verifier knows them and refuses a statement naming the trusted
85
+ keys otherwise; a station proof, `OperatorTrust` and the signatures of checkpoints count an attestation or a signature
86
+ for the holder of the trusted identity key that certified its key. A change set naming a key of a party with another
87
+ holder than before is refused.
88
+
89
+ A change set is identified by its content, as WWCP_POI does since `bc3b1bd` (SPECIFICATION.md 4, 5.2;
90
+ csharp-review 4): its `@id` is the SHA-256 of its canonical JSON with its `@context`, without `@id` and
91
+ signatures (`changeSetIdentification`), so that nobody commits another change set in the place of one. `ChangeSet.parse`
92
+ refuses a change set identified otherwise, and one naming change sets in `metadata.rebasedFrom` it was not rebased from;
93
+ `Commit.parse` reads the change set of a commit as well and refuses a commit with one parent whose change set has no
94
+ changes or the identification of a merge. The test vectors are those of a new run of the C# examples at `bc3b1bd`
95
+ (`tests/vectors/csharp-bc3b1bd`).
96
+
97
+ A change set gives its new values as the content holds them, as WWCP_POI requires since `80e4ccc` (SPECIFICATION.md 2,
98
+ 4; csharp-review 10): a new value is applied as it is given, no longer written anew as the C# model would, and
99
+ one that names a JSON-LD context in what it embeds (custom data aside, which keeps it), gives identified elements, keys,
100
+ certificates or the lists of section 2 out of their order or twice, or a timestamp not UTC to the millisecond is
101
+ refused. An old value is compared as it is given. The test vectors are those of a new run of the C# examples at
102
+ `80e4ccc` (`tests/vectors/csharp-80e4ccc`).
103
+
104
+ An attestation gives its `validUntil`, at most 24 hours after its `signedAt`, as WWCP_POI requires since `be07037`
105
+ (SPECIFICATION.md 8.5, 8.6, 12.1; csharp-review 7): `Attestation.parse` refuses one without or valid longer
106
+ (`MAX_ATTESTATION_VALIDITY`), so that none is valid forever. The `signedAt` of an attestation or a price statement is the
107
+ choice of its signer: the signing key of an attestation counts when it is valid when it attested and at the time the proof
108
+ is checked, and a price statement is current no longer than its key.
109
+
110
+ A version naming twice an identification WWCP_POI keeps unique within the roaming network is refused, as WWCP_POI refuses
111
+ it (`DuplicateGridConnectionPoint` to `DuplicateEnergyMeterTemplate` of RoamingNetwork.cs): grid connection points, energy
112
+ meters, parking garages, spaces, sensors, space groups, space templates and products, transparency software releases and
113
+ certificates, energy meter templates and groups, the EVSE, charging station and charging pool groups of operators and
114
+ providers, and charging tariff offers, compared as their C# types compare them, without case but parking products, the
115
+ groups by the prefix of their party, `DE-GDF` as `DE*GDF` (`duplicateIdentification`). `RoamingNetwork.parse` checks every
116
+ version it reads, also the one a change set leads to: before, an operator could add a group of the identification a group
117
+ of the provider of its prefix has, and its change set was taken with the after ETags this library calculates. The golden
118
+ vectors `version-twice-*` of WWCPPOIConformanceTests hold both implementations to it, refused in the same words (`reason`).
119
+
120
+ The roaming network operator signs in place of a party without signing keys, e.g. the certificates of a conformity
121
+ assessment body or the grid connection points of a grid operator not taking part, by a signing key that may sign
122
+ `party`, as the examples certify its keys, as WWCP_POI does since `36bb176` (SPECIFICATION.md 4.1; csharp-review 13):
123
+ `checkOwnership` counts its signing keys that may sign `party` besides those that may sign the usage of the change.
124
+ A change set taken before is taken still.
125
+
126
+ A change set naming `rebasedFrom` with a change, but an `Add` or `AddElement`, without `oldValue` is refused, as WWCP_POI
127
+ refuses it since `1717ee2` (SPECIFICATION.md 4; csharp-review 12): only old values tell that a change set
128
+ committed meanwhile changed what it changes, which such a rebase may have overwritten. One not rebased is read as before.
129
+ The golden vector `changeSet-rebased-without-old-value` holds both implementations to it.
130
+
131
+ A model of charging stations or energy meters names its `hardwareRevisions` and `firmwareVersions`, and a charging
132
+ station and an energy meter one `hardwareRevision` and one `firmwareVersion` of it, as WWCP_POI does since `7e0b0ac`
133
+ (csharp-review 16); a certificate (`ConformityCertificate`, the `certificates` of a conformity assessment body)
134
+ is for a model of charging stations or of energy meters, in the hardware revisions and firmware versions it covers, and
135
+ names its components, the transparency software and, of a station model, the energy meters it was issued with; a
136
+ station and a meter name the certificates of their models in `certificateIds`, and the `transparencySoftwareStatus` of
137
+ a meter names a release and its legal status, no certificate, as WWCP_POI does since `987fa26` (csharp-review 17).
138
+ Change sets change them, effective members take them of their templates, and a certificate is unique within the
139
+ network. `verifyChargingStation` gives the `certificates` the station and its meters name, each with `forThisModel`:
140
+ whether it is for the model, the hardware revision and the firmware version of what names it; the `transparencySoftware`
141
+ of a meter gives the certificates naming its release, no longer a certificate of its own. The test vectors are those of
142
+ a new run of the C# examples at `987fa26` (`tests/vectors/csharp-987fa26`).
143
+
144
+ A charging station signing measurements itself names its `serialNumber`, `transparencySoftwareStatus`,
145
+ `signatureMethods` and `publicKeys` as an energy meter does, and the `modelURL` of its model; an EVSE names its
146
+ `iso15118Certificate`, as WWCP_POI does since `52f1172`. Change sets change them; an effective station takes the model
147
+ URL, the releases and the signature methods of its templates besides its own, never the serial number, the public keys
148
+ or the ISO 15118 certificate of the single device; and a change set giving the releases of a station or a meter out of
149
+ the order of their identifications, or one twice, is refused. `verifyChargingStation` gives the releases the station
150
+ names among its `transparencySoftware`, proven by the certificates of the station; each entry names what names it,
151
+ `namedBy` as of a certificate, in place of `energyMeterId` (`NamedTransparencySoftware` in place of
152
+ `MeterTransparencySoftware`). The test vectors stay those of the run at `987fa26`: no station of its examples signs
153
+ measurements itself.
154
+
155
+ The first checkpoint of an epoch takes signatures of the algorithms of its epoch and of the epoch before, no other, as
156
+ WWCP_POI does since `65e658d` (SPECIFICATION.md 11.3; csharp-review 14): a history started by
157
+ `startNextEpoch` knows the profiles of the epoch it closed, one started from a snapshot those its `epoch` names as
158
+ `previousProfiles` (`History.previousEpochProfiles`), and those of the first epoch are the default ones; without them
159
+ it takes the algorithms of its own epoch alone. A snapshot of the epoch 2 naming profiles of the epoch before is refused.
160
+
161
+ A certificate the roaming network operator adds or changes in place of a conformity assessment body without signing keys
162
+ says so, `"statedBy": "roamingNetworkOperator"`, as WWCP_POI requires since `65e658d` (SPECIFICATION.md 4.1;
163
+ csharp-review 15): a change set adding or changing a certificate whose `statedBy` does not say who signs it, as
164
+ the version before has the keys of the body, is refused. `verifyChargingStation` gives each certificate with `statedBy`,
165
+ `ConformityAssessmentBody` or `RoamingNetworkOperator`, in place of `bodyHasKeys`, which could not tell them apart once
166
+ the body had keys. The test vectors stay those of the run at `987fa26`: none of its examples has a third epoch or a
167
+ certificate stated in place of a body.
168
+
169
+ A version naming a hardware revision, firmware version or serial number WWCP_POI refuses is refused, read or led to by a
170
+ change set, as WWCP_POI reads them since `c31e5e3` and `3672b06` (`HardwareRevision`, `FirmwareVersion`,
171
+ `SerialNumber`): a text as it is given, not empty and neither beginning nor ending with whitespace as `Char.IsWhiteSpace`
172
+ tells it, of charging stations, energy meters and their templates, of the models of their manufacturers, and of
173
+ certificates and the energy meters they were issued with, each once in a model, a certificate and such an energy meter
174
+ (`ModelVersions.Of`), in the words of WWCP_POI (`invalidVersionText`, which `RoamingNetwork.parse` checks with
175
+ `duplicateIdentification`, and for certificates `invalidCertificates`, below). Whether one is of the model of what names
176
+ it stays with the references, which this library
177
+ leaves to WWCP_POI. The test vectors stay those of the run at `987fa26`, whose versions name none it refuses; the vectors
178
+ `version-text-*` of WWCPPOIConformanceTests, its head so changed, hold both implementations to it, refused in the same
179
+ words (`reason`).
180
+
181
+ The golden vectors of WWCPPOIConformanceTests hold, besides the run of the C# examples, small histories it signs itself
182
+ (`tests/vectors/poi-histories.json`), replayed step by step in `tests/conformance.test.ts`: who signs in place of a
183
+ party without keys, who states a certificate, old values and rebases, keys expired and removed, new values as the
184
+ content holds them, `lastChange` of what embeds a change, and three epochs (csharp-review 3, 8, 10, 12 to 15). Ten of
185
+ them - the references a version holds, the groups of e-mobility providers, grid connection points - this library
186
+ leaves to WWCP_POI, and does not run. They found a deviation of this library (D8 of WWCPPOIConformanceTests): a change
187
+ set signed, besides by its owner, by a key of a party not valid at its `createdAt` was taken here, and refused by
188
+ WWCP_POI. Every signature by a key of a party of the version is now by one valid at the `createdAt` of the change set,
189
+ also one besides the signatures of the owners, refused otherwise in the words of WWCP_POI (`TryGetSigners`); only a new
190
+ identity key, which proves its possession, may be one valid later (SPECIFICATION.md 4.1).
191
+
192
+ A version naming a certificate WWCP_POI refuses to read is refused, read or led to by a change set, as
193
+ `ConformityCertificate` and `CertifiedEnergyMeter` of WWCP_POI read them (`src/network/certificates.ts`,
194
+ `invalidCertificates`, which `RoamingNetwork.parse` checks after `invalidVersionText`): for exactly one model, with its
195
+ manufacturer; at least one hardware revision and one firmware version, also of each energy meter it was issued with, as
196
+ an object of its manufacturer and its model; an absolute `documentURL`, a legislation not empty, timestamps with an
197
+ explicit offset, `notBefore` not after `notAfter` to the tick; at least one release, each once (compared ordinally once
198
+ trimmed, as WWCP_POI does), none both verified and compatible (compared without case); energy meters of a charging
199
+ station model only, each model once, compared without case. Refused in the words and in the order of WWCP_POI: first
200
+ what it reads as the arguments of a certificate, by their path, then what its constructor checks. Its versions as
201
+ texts moved there from `invalidVersionText`, in the same words. The vectors `version-certificate-*` of
202
+ WWCPPOIConformanceTests found that this library took all of them (D9) and hold both implementations to it. Whether a
203
+ certificate's model, versions, releases and legislation are those of the network stays with the references, which this
204
+ library leaves to WWCP_POI; an unknown property, also of a certificate, this library does not refuse.
205
+
206
+ A history starts from a snapshot of another server only anchored in the trust anchor of the roaming network, fail
207
+ closed, as a peer of WWCP_POI starts since `ff2c56f` (SPECIFICATION.md 10.5, *Anchored*; `History.fromSnapshot` with
208
+ `SnapshotOptions`): a snapshot of a checkpoint by the checkpoint, signed in the role of the roaming network operator by
209
+ signing keys of as many holders as the trust anchor and the key statement of its version require, each certified by a
210
+ trusted identity key of its holder, valid when it signed and at `at` (`ChargingStationProof.verifyCheckpoint`, as
211
+ `Verify(Checkpoint, TrustAnchor)` of WWCP_POI); a snapshot of the head by the `attestations` it carries since then (8.5),
212
+ which must attest the root of its head as for a proof of the root (`ChargingStationProof.ofRoot`, as `VerifyHead` of
213
+ WWCP_POI). Without a trust anchor no snapshot is taken, unless the caller takes it `unanchored` explicitly, e.g. a genesis
214
+ whose key statement it verifies against the trust anchor itself; an archive segment replays its base so, anchored by the
215
+ checkpoint of its end. Before, a snapshot of the head carrying attestations was refused, and every snapshot taken
216
+ unanchored. An attestation of a snapshot that cannot be read is refused, not left out.
217
+
218
+ A signed commit or checkpoint, also the commit of a snapshot, is refused without a verifier of its signatures, as
219
+ WWCP_POI does (`CheckSignatures`): before, its signatures were taken unchecked when `HistoryOptions.verifyCommit` or
220
+ `verifyCheckpoint` was left out (O3 of WWCPPOIConformanceTests). `verifyCommit` checks the commit of a snapshot as well,
221
+ its version before unknown there (`before` undefined).
222
+
223
+ QI-Digital documents, the proof of concept of WWCP_POI (`WWCP_POI3/RoamingNetwork/QIDigital`, as of `6a0f96e`, which
224
+ example A14 uses), are read and checked, not signed (`src/qidigital/`): the digital calibration certificate of a charging
225
+ station or an energy meter (`DigitalCalibrationCertificate`), the digital certificate of conformity of a model or, of a
226
+ module of quality assurance, of the quality system of a manufacturer (`DigitalCertificateOfConformity`), and the digital
227
+ declaration of conformity of a model (`DigitalDeclarationOfConformity`). Each is refused in the words and the order of
228
+ WWCP_POI: only its own properties, its context, timestamps exactly as signed, numbers as numbers, what its constructor
229
+ checks after its properties were read. Its signature input and its digest are what WWCP_POI writes again of what it read
230
+ (`Content()`), not the text as given: numbers without trailing zeros, a whole one as an integer, identifications trimmed,
231
+ a charging station as `DE*GEF*S1`, `mainSigner` false, an empty list or text and a revision 0 as WWCP_POI writes them.
232
+ Checked against a roaming network as WWCP_POI checks them: the issuer a party of it, its key one that may sign the
233
+ document and valid when it signed and at `at`; the notified body with its number, notified for the legislation; the
234
+ model, its manufacturer, revisions and versions; the charging station or energy meter of a calibration certificate as it
235
+ is at runtime, with what its templates give it, and with the serial number the roaming network gives it, not the one the
236
+ certificate names (csharp-review 23). And against each other: a declaration and each certificate it names, a certificate
237
+ and the item of a calibration certificate it covers. A text in languages of no language, one that is no text and a
238
+ language given twice are refused, not left out, as WWCP_POI refuses them since `bbe8fb8`: left out, they would travel
239
+ unsigned with a signed document.
240
+ A URL is read as Hermod reads it as far as a document URL needs it: trimmed, https unless it names a scheme, of http or
241
+ https with a host.
242
+
243
+ The test vectors are those of a new run of the C# examples at `33447ac` (`tests/vectors/csharp-33447ac`), the first with
244
+ example A14: the QI-Digital documents of the meter of DE*GEF*E2*1 as WWCP_POI signed them, with ML-DSA-65 by the PTB and
245
+ EM-LAB and with ES256 by SAALE, are checked against QA as example A14 published it, refused changed in the words of
246
+ WWCP_POI, and written again as WWCP_POI wrote them. EM-LAB is a member of QA since, so the head is revision 8 of epoch 2.
247
+ `examples/validate-examples.ts` checks example A14 as its `Validate()` does, and starts from the snapshots of examples A4,
248
+ A5 and A11 anchored in the trust anchor, from the genesis and the live snapshot of example A12 unanchored, as the
249
+ examples do: since the anchored start it refused them.
250
+
251
+ The golden vectors hold the QI-Digital documents of example A14 too (`tests/vectors/poi-qidigital.json`), run in
252
+ `tests/conformance.test.ts` as WWCPPOIConformanceTests runs them against WWCP_POI: the four documents verified against
253
+ QA, the declaration of conformity against the certificates it names, both certificates covering the meter of
254
+ DE*GEF*E2*1, a calibration certificate of the charging station DE*GEF*S2, signed by the generator with a key QA patched
255
+ gives EM-LAB, and 38 refusals, each with its control, of documents or of QA patched. Both implementations refuse a text
256
+ of no language, or one that is no text (D10 there, fixed in WWCP_POI `bbe8fb8`), and the calibration certificate of a
257
+ station against one of another serial number, or of none (csharp-review 23).
258
+
259
+ EV Taler, phase 1 of the concept of WWCP_POI for paying for charging with GNU Taler (`concepts/EVTaler.md`), as of
260
+ `ec3dace`: a charging station operator names its merchant at a GNU Taler merchant backend and the exchanges whose coins it
261
+ accepts (`evTaler`, `evTalerMerchantOf`), refused where WWCP_POI refuses it and in its words: base URLs of HTTPS without
262
+ user, query and fragment, ending in '/', read as Hermod reads them; keys as GNU Taler writes them (`isTalerPublicKey`);
263
+ at least one exchange, each once, of an ISO 4217 currency of Styx and with a name. A change of it needs a signing key
264
+ that may sign the new usage `payments`. Payment options are an open set of names: any nonempty text, none twice whatever
265
+ its case, united with those of the templates of a charging pool without case; a charging pool or template naming EVTaler
266
+ needs the merchant of its operator, after the last change of a change set. An app reads the EV Taler tariff of an EVSE
267
+ and the exchanges in its currency from the proof of its station (`evTalerTariffOf`, `evTalerExchangesAt`), and what
268
+ drivers see, "EV Taler (Example Exchange, EUR)" (`paymentOptionName`). The JSON, the CBOR and the tree of a version with
269
+ a merchant are those WWCP_POI writes: `tests/evTaler.test.ts` holds the ETags WWCP_POI3 calculates of QA with the merchant
270
+ of its EVTalerTests. Not yet: golden vectors of WWCPPOIConformanceTests, and a station proof with a merchant as WWCP_POI
271
+ signs it (example A15 came after the frozen run). Nothing here takes or makes a payment.
272
+
273
+ The keys of the parties of a roaming network are read where it is read, as WWCP_POI reads them wherever it reads a
274
+ party (`POIPartyKeys.TryParse` and `Check`), in its words (D12 of WWCPPOIConformanceTests): before, a party's keys were
275
+ only read where they were used, so a version naming an unknown usage of a party's key was taken. Every key as
276
+ `POIPublicKey.parse` reads it, none twice, none both a signing and an identity key, no identity key naming usages; the
277
+ parties in the order WWCP_POI reads them, the charging station operators last; the identity keys of the roaming network
278
+ operator in the same words (`src/network/partyKeys.ts`). Checked against WWCP_POI3 at `ec3dace` itself, on 47 versions
279
+ of QA with keys valid and not, of every kind of party: 40 are read as WWCP_POI3 reads them, in the same words; 5 both
280
+ refuse, in other words of `POIPublicKey.parse` within the same wrapper (a key without identification or key, not
281
+ Base64, expiring before it becomes valid, of another JSON-LD context); 2 name a `notAfter` WWCP_POI takes and writes
282
+ otherwise (a date only, an offset), refused here as every timestamp not written as POI writes it. `poi-refusals.json` of
283
+ WWCPPOIConformanceTests vendored, 89 vectors: the 13 of EV Taler and `version-key-usage-unknown`, D12 closed.
284
+
285
+ A key is read in the words and order of `POIPublicKey.TryParse` of WWCP_POI (`POIPublicKey.parse`): its identification
286
+ and key as texts, then its JSON-LD context, then both given ("A public key needs its identification and its key!"); a
287
+ key .NET can not read as Base64 in the words of .NET, one it reads but writes otherwise as not canonical; "Invalid COSE
288
+ key: …", "A public key must not contain private parts!", "The holder of a public key must be a text!"; a key expiring
289
+ before it becomes valid where the constructor of WWCP_POI refuses it, after its holder and usages, before its
290
+ thumbprint. Checked against WWCP_POI3 at `ec3dace` itself, on 45 more versions of QA with keys valid and not: 34 in its
291
+ words. Still other words: a key of CBOR WWCP_POI3 can not read (the words of `@vanaheimr/cose` and
292
+ `@vanaheimr/metrological-cbor`, not of their C# originals), a timestamp both refuse ("Invalid value for 'not before'!"
293
+ there). Refused here, taken and written otherwise by WWCP_POI3: a key not in deterministic CBOR, a timestamp not written
294
+ as POI writes it, a `notBefore` or `notAfter` of null.
295
+
296
+ `poi-histories.json` of WWCPPOIConformanceTests `0734641` vendored: 8 replays of EV Taler in a history the generator
297
+ signs, who may sign the merchant of DE*GEF (a signing key for `payments`; the roaming network operator only in place
298
+ of a party without signing keys) and a charging pool naming EVTaler with and without it. A change needing signatures is
299
+ named as WWCP_POI names it, with the property it changes, e.g. "Change 0: UpdateProperty of the
300
+ ChargingStationOperator 'DE*GEF' ('evTaler') needs a signature by …".