@open-charging-cloud/wwcp-poi 0.1.1 → 0.3.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.
- package/CHANGELOG.md +382 -0
- package/README.md +534 -362
- package/dist/crypto/ber.d.ts +48 -0
- package/dist/crypto/ber.d.ts.map +1 -0
- package/dist/crypto/certificates.d.ts +21 -0
- package/dist/crypto/certificates.d.ts.map +1 -0
- package/dist/crypto/curves.d.ts +25 -0
- package/dist/crypto/curves.d.ts.map +1 -0
- package/dist/crypto/ecc.d.ts +34 -0
- package/dist/crypto/ecc.d.ts.map +1 -0
- package/dist/crypto/publicKeys.d.ts +51 -0
- package/dist/crypto/publicKeys.d.ts.map +1 -0
- package/dist/crypto/rsa.d.ts +30 -0
- package/dist/crypto/rsa.d.ts.map +1 -0
- package/dist/encoding/text.d.ts +9 -0
- package/dist/encoding/text.d.ts.map +1 -1
- package/dist/evTaler/amounts.d.ts +89 -0
- package/dist/evTaler/amounts.d.ts.map +1 -0
- package/dist/evTaler/contractTerms.d.ts +107 -0
- package/dist/evTaler/contractTerms.d.ts.map +1 -0
- package/dist/evTaler/meterValue.d.ts +65 -0
- package/dist/evTaler/meterValue.d.ts.map +1 -0
- package/dist/evTaler/payURI.d.ts +28 -0
- package/dist/evTaler/payURI.d.ts.map +1 -0
- package/dist/evTaler/settlement.d.ts +85 -0
- package/dist/evTaler/settlement.d.ts.map +1 -0
- package/dist/evTaler/step.d.ts +72 -0
- package/dist/evTaler/step.d.ts.map +1 -0
- package/dist/history/apply.d.ts +6 -1
- package/dist/history/apply.d.ts.map +1 -1
- package/dist/history/changeSet.d.ts +18 -2
- package/dist/history/changeSet.d.ts.map +1 -1
- package/dist/history/checkpoint.d.ts +7 -0
- package/dist/history/checkpoint.d.ts.map +1 -1
- package/dist/history/commit.d.ts +13 -1
- package/dist/history/commit.d.ts.map +1 -1
- package/dist/history/elements.d.ts +19 -0
- package/dist/history/elements.d.ts.map +1 -0
- package/dist/history/epoch.d.ts +2 -0
- package/dist/history/epoch.d.ts.map +1 -1
- package/dist/history/history.d.ts +46 -6
- package/dist/history/history.d.ts.map +1 -1
- package/dist/history/preconditions.d.ts +22 -0
- package/dist/history/preconditions.d.ts.map +1 -0
- package/dist/index.d.ts +18 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10296 -1558
- package/dist/index.js.map +1 -1
- package/dist/json/canonical.d.ts.map +1 -1
- package/dist/keys.d.ts +2 -0
- package/dist/keys.d.ts.map +1 -1
- package/dist/network/certificates.d.ts +16 -4
- package/dist/network/certificates.d.ts.map +1 -1
- package/dist/network/countries.d.ts +16 -0
- package/dist/network/countries.d.ts.map +1 -0
- package/dist/network/evTaler.d.ts +1 -14
- package/dist/network/evTaler.d.ts.map +1 -1
- package/dist/network/identifications.d.ts +6 -6
- package/dist/network/identifications.d.ts.map +1 -1
- package/dist/network/measurementPublicKey.d.ts +7 -0
- package/dist/network/measurementPublicKey.d.ts.map +1 -0
- package/dist/network/offers.d.ts +53 -0
- package/dist/network/offers.d.ts.map +1 -0
- package/dist/network/partyKeys.d.ts +8 -5
- package/dist/network/partyKeys.d.ts.map +1 -1
- package/dist/network/poiJSON.d.ts +172 -0
- package/dist/network/poiJSON.d.ts.map +1 -0
- package/dist/network/poiValues.d.ts +48 -0
- package/dist/network/poiValues.d.ts.map +1 -0
- package/dist/network/reading.d.ts +46 -0
- package/dist/network/reading.d.ts.map +1 -0
- package/dist/network/references.d.ts +36 -0
- package/dist/network/references.d.ts.map +1 -0
- package/dist/network/roamingNetwork.d.ts +10 -11
- package/dist/network/roamingNetwork.d.ts.map +1 -1
- package/dist/network/timeZones.d.ts +8 -0
- package/dist/network/timeZones.d.ts.map +1 -0
- package/dist/network/tree.d.ts +14 -0
- package/dist/network/tree.d.ts.map +1 -1
- package/dist/network/versionTexts.d.ts +1 -7
- package/dist/network/versionTexts.d.ts.map +1 -1
- package/dist/network/writtenForm.d.ts.map +1 -1
- package/dist/proofs/priceStatement.d.ts.map +1 -1
- package/dist/proofs/stationProof.d.ts +2 -0
- package/dist/proofs/stationProof.d.ts.map +1 -1
- package/dist/proofs/trustContext.d.ts +6 -0
- package/dist/proofs/trustContext.d.ts.map +1 -1
- package/dist/verifier/chargingStation.d.ts +5 -0
- package/dist/verifier/chargingStation.d.ts.map +1 -1
- package/dist/verifier/checkpoints.d.ts +6 -0
- package/dist/verifier/checkpoints.d.ts.map +1 -1
- package/dist/verifier/documentKeys.d.ts +27 -0
- package/dist/verifier/documentKeys.d.ts.map +1 -0
- package/dist/verifier/historicalMeasurements.d.ts +96 -0
- package/dist/verifier/historicalMeasurements.d.ts.map +1 -0
- package/dist/verifier/measurementKeys.d.ts +48 -0
- package/dist/verifier/measurementKeys.d.ts.map +1 -0
- package/dist/verifier/observedVersions.d.ts +70 -0
- package/dist/verifier/observedVersions.d.ts.map +1 -0
- package/dist/verifier/pricePublication.d.ts +74 -0
- package/dist/verifier/pricePublication.d.ts.map +1 -0
- package/dist/verifier/sessionPrices.d.ts +75 -0
- package/dist/verifier/sessionPrices.d.ts.map +1 -0
- package/dist/verifier/trustTransitions.d.ts +67 -0
- package/dist/verifier/trustTransitions.d.ts.map +1 -0
- package/package.json +15 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../../src/network/references.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAkC,KAAK,UAAU,EAAkB,MAAM,kBAAkB,CAAC;AACnG,OAAO,EAE+B,KAAK,OAAO,EAAW,MAAM,cAAc,CAAC;AAiJlF;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,CAgBlD;AAwUD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,UAAU,UAAU,KAAG,MAAM,GAAG,SAChB,CAAC;AA6UrD,sIAAsI;AACtI,eAAO,MAAM,oBAAoB,GAAI,UAAU,UAAU,KAAG,MAAM,GAAG,SAChB,CAAC;AAkBtD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,GAAG,YAAY,GAAG,IAAI,CAEzG;AAiJD,4HAA4H;AAC5H,wBAAgB,aAAa,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,GAAE,SAAS,GAAG,YAAwB,GAAG,OAAO,CAUjH;AAmoBD;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,SAAS,UAAU,EAAE,IAAI,SAAS,GAAG,YAAY,EAAE,SAAS,UAAU,KAAG,MAAM,GAAG,SACxD,CAAC"}
|
|
@@ -45,23 +45,22 @@ export declare class RoamingNetwork {
|
|
|
45
45
|
private constructor();
|
|
46
46
|
/**
|
|
47
47
|
* Reads a roaming network and refuses it unless it is a valid version: of its `@context`, with `eTags` that are those
|
|
48
|
-
* of its content, where it lists any, without keys of its own, with a valid roaming network operator, and
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* nor what WWCP_POI takes and writes otherwise than the content holds it (`notWrittenAsHeld`),
|
|
54
|
-
* also the version a change set leads to. Its `eTags` may be left out: what binds a version is the commit whose ETags it
|
|
55
|
-
* has (`matchesCommitETags`).
|
|
48
|
+
* of its content, where it lists any, without keys of its own, with a valid roaming network operator, and nothing
|
|
49
|
+
* WWCP_POI3 refuses as it reads its parties (`invalidReading`), nor as it makes the roaming network of them, a reference
|
|
50
|
+
* it does not resolve or an identification it keeps unique given twice (`invalidReferences`), nor what WWCP_POI takes
|
|
51
|
+
* and writes otherwise than the content holds it (`notWrittenAsHeld`), also the version a change set leads to. Its
|
|
52
|
+
* `eTags` may be left out: what binds a version is the commit whose ETags it has (`matchesCommitETags`).
|
|
56
53
|
*/
|
|
57
54
|
static parse(value: JSONValue | undefined): RoamingNetwork;
|
|
58
55
|
/**
|
|
59
56
|
* Reads the version the given change set leads to, its content after the last change, and refuses it as `parse`
|
|
60
57
|
* does, but in the words WWCP_POI3 names what it refuses of the network there (RoamingNetwork.ChangeSets.cs): its
|
|
61
|
-
* operator
|
|
62
|
-
* constructor
|
|
58
|
+
* operator, the identifications it keeps unique within the roaming network and the references bare, not as arguments of
|
|
59
|
+
* its constructor, in its order there; a reference the given version before resolves as what the change set withdrew
|
|
60
|
+
* while it is still named. The groups, offers and payment options of its charging station operators it checks after
|
|
61
|
+
* the last change (`invalidGroupOrOffer`, `invalidPaymentOption`), before what it reads.
|
|
63
62
|
*/
|
|
64
|
-
static afterChangeSet(content: JSONObject): RoamingNetwork;
|
|
63
|
+
static afterChangeSet(content: JSONObject, before?: JSONObject): RoamingNetwork;
|
|
65
64
|
private static read;
|
|
66
65
|
/** The effective content (8.1), calculated once. */
|
|
67
66
|
get effectiveContent(): JSONObject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roamingNetwork.d.ts","sourceRoot":"","sources":["../../src/network/roamingNetwork.ts"],"names":[],"mappings":"AAkBA,OAAO,EAA2D,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC5H,OAAO,EAAmE,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AACzG,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AASxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAc,YAAY,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAmB,2BAA2B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAU,oCAAoC,CAAC;AAI/E,eAAO,MAAM,uBAAuB,QAAuC,CAAC;AAgB5E,iFAAiF;AACjF,eAAO,MAAM,SAAS,GAAI,MAAM,SAAS,YAAY,EAAE,KAAG,GAAG,CAAC,MAAM,CACnB,CAAC;AAGlD;;;GAGG;AACH,qBAAa,sBAAsB;aAGX,EAAE,EAAuB,MAAM;aAC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*/
|
|
2
|
+
export declare function knownTimeZone(name: string): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* The error of the given time zone of a charging pool or a charging pool template (`POITimeZones.Known`), if it is none it
|
|
5
|
+
* may have or this platform does not know it.
|
|
6
|
+
*/
|
|
7
|
+
export declare const unknownTimeZone: (name: string, of: string) => string | undefined;
|
|
8
|
+
//# sourceMappingURL=timeZones.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeZones.d.ts","sourceRoot":"","sources":["../../src/network/timeZones.ts"],"names":[],"mappings":"AA6DA,uHAAuH;AACvH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAanD;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,EAAE,IAAI,MAAM,KAAG,MAAM,GAAG,SACkF,CAAC"}
|
package/dist/network/tree.d.ts
CHANGED
|
@@ -39,6 +39,20 @@ export declare function prunedDigest(entity: JSONObject, kind: TreeNodeKind, alg
|
|
|
39
39
|
/** The root of a pruned roaming network and what it gives completely (8.4). */
|
|
40
40
|
export declare function prunedTree(roamingNetwork: JSONObject, algorithm: HashAlgorithm): PrunedTree;
|
|
41
41
|
/** The digest in hex, for messages. */
|
|
42
|
+
/**
|
|
43
|
+
* Whether a proof gives the given child array of the given entity completely, as `RoamingNetworkProof.GivesCompletely` of
|
|
44
|
+
* WWCP_POI d35c780 tells it (8.4, POI3-ISSUES.md S29): as an array, or none, as an entity without such children has.
|
|
45
|
+
* Pruned it gives none of them, partial some, as leaves: what an app shows of it is then not all the entity has, e.g. not
|
|
46
|
+
* every EVSE of a station, tariff of an EVSE or certificate of a model. Of an entity as the proof gives it, e.g. in
|
|
47
|
+
* `ChargingStationProof.roamingNetwork`, not as the verified station resolves it.
|
|
48
|
+
*/
|
|
49
|
+
export declare const givesCompletely: (entity: JSONObject, childArray: string) => boolean;
|
|
50
|
+
/**
|
|
51
|
+
* How many children the given child array of the given entity of a proof has, also where it gives only some or none of
|
|
52
|
+
* them, as `RoamingNetworkProof.SizeOf` tells it: 0 where it gives none, the length of an array, the `@size` of a pruned
|
|
53
|
+
* or partial one; undefined where that is no whole number this platform holds exactly.
|
|
54
|
+
*/
|
|
55
|
+
export declare const sizeOf: (entity: JSONObject, childArray: string) => number | undefined;
|
|
42
56
|
export declare const hexDigest: (digest: Uint8Array) => string;
|
|
43
57
|
export { without };
|
|
44
58
|
//# sourceMappingURL=tree.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../src/network/tree.ts"],"names":[],"mappings":"AAkBA,OAAO,EAA+B,OAAO,EAAE,KAAK,UAAU,EAAkB,MAAM,kBAAkB,CAAC;AAGzG,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAa,mBAAmB,CAAC;AAE7E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAqC,aAAa,CAAC;AAIvE,8GAA8G;AAC9G,MAAM,MAAM,YAAY,GAClB,gBAAgB,GAChB,yBAAyB,GACzB,cAAc,GACd,iBAAiB,GACjB,mBAAmB,GACnB,cAAc,GACd,iBAAiB,GACjB,6BAA6B,GAC7B,yBAAyB,GACzB,kCAAkC,GAClC,0BAA0B,GAC1B,MAAM,CAAC;AAGb;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CA8E/F,CAAC;AAGF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,GAAG,UAAU,CAEzG;AAED,gEAAgE;AAChE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,GAAG,UAAU,CAyBrG;AAED,mGAAmG;AACnG,wBAAgB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|
@@ -3,7 +3,7 @@ export declare const objectsOf: (value: JSONValue | undefined) => JSONObject[];
|
|
|
3
3
|
/** Whether the given value is a text `TryParse` takes: not empty, neither beginning nor ending with whitespace. */
|
|
4
4
|
export declare const isText: (value: JSONValue) => boolean;
|
|
5
5
|
/** The given text as `String.Trim` gives it, as the identifications of WWCP_POI take it. */
|
|
6
|
-
export declare
|
|
6
|
+
export declare function trimmed(text: string): string;
|
|
7
7
|
export declare const MODEL_VERSIONS: {
|
|
8
8
|
hardwareRevisions: string;
|
|
9
9
|
firmwareVersions: string;
|
|
@@ -15,10 +15,4 @@ export declare const MODEL_VERSIONS: {
|
|
|
15
15
|
* with, `whose` in words.
|
|
16
16
|
*/
|
|
17
17
|
export declare function versionTwice(holder: JSONObject, whose: string): string | undefined;
|
|
18
|
-
/**
|
|
19
|
-
* The error, when the given content names a hardware revision, firmware version or serial number WWCP_POI refuses where it
|
|
20
|
-
* reads it, as WWCP_POI says it, after what names it; undefined for none. The charging stations and energy meters, their
|
|
21
|
-
* templates and the models of their manufacturers name them; the certificates `invalidCertificates` reads.
|
|
22
|
-
*/
|
|
23
|
-
export declare function invalidVersionText(content: JSONObject): string | undefined;
|
|
24
18
|
//# sourceMappingURL=versionTexts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionTexts.d.ts","sourceRoot":"","sources":["../../src/network/versionTexts.ts"],"names":[],"mappings":"AAiBA,OAAO,EAA0B,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"versionTexts.d.ts","sourceRoot":"","sources":["../../src/network/versionTexts.ts"],"names":[],"mappings":"AAiBA,OAAO,EAA0B,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAY3F,eAAO,MAAM,SAAS,GAAI,OAAO,SAAS,GAAG,SAAS,KAAG,UAAU,EACnB,CAAC;AAYjD,mHAAmH;AACnH,eAAO,MAAM,MAAM,GAAI,OAAO,SAAS,KAAG,OACkG,CAAC;AAE7I,4FAA4F;AAC5F,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAa5C;AAED,eAAO,MAAM,cAAc;;;CAAmF,CAAC;AAE/G;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAUlF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writtenForm.d.ts","sourceRoot":"","sources":["../../src/network/writtenForm.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"writtenForm.d.ts","sourceRoot":"","sources":["../../src/network/writtenForm.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAkE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAyTnI,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAoBrE,CAAC;AA+QF;;;GAGG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CAchE;AAGD,wHAAwH;AACxH,MAAM,WAAW,UAAU;IACvB,QAAQ,CAAC,IAAI,EAAK,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAG,MAAM,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAmJ5I;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAMxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceStatement.d.ts","sourceRoot":"","sources":["../../src/proofs/priceStatement.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAmC,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpG,OAAO,EAAc,OAAO,EAAqB,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAuC,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAG5F,OAAO,EAAa,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAgB,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"priceStatement.d.ts","sourceRoot":"","sources":["../../src/proofs/priceStatement.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAmC,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpG,OAAO,EAAc,OAAO,EAAqB,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAuC,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAG5F,OAAO,EAAa,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAgB,0BAA0B,CAAC;AASrE,eAAO,MAAM,uBAAuB,QAA6D,CAAC;AAClG,eAAO,MAAM,6BAA6B,QAA4D,CAAC;AAEvG,mDAAmD;AACnD,eAAO,MAAM,4BAA4B,sDAAyD,CAAC;AAEnG,2IAA2I;AAC3I,eAAO,MAAM,4BAA4B,QAA0B,CAAC;AAEpE;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,YAAY,MAAM,EAAE,UAAU,MAAM,KAAG,MACH,CAAC;AA+F3E;;;;GAIG;AACH,qBAAa,cAAc;aAGH,gBAAgB,EAAG,MAAM;aACzB,UAAU,EAAS,MAAM;aACzB,QAAQ,EAAW,MAAM;aACzB,WAAW,EAAQ,UAAU;aAC7B,SAAS,EAAU,MAAM;aACzB,UAAU,EAAS,MAAM,GAAG,SAAS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sHAAsH;AACtH,eAAO,MAAM,oBAAoB,GAAI,OAAO,SAAS,GAAG,SAAS,KAAG,cAAc,EACe,CAAC;AAGlG;;;GAGG;AACH,qBAAa,mBAAmB;aAGR,YAAY,EAAK,MAAM;aACvB,cAAc,EAAG,cAAc;aAC/B,KAAK,EAAY,MAAM;aACvB,IAAI,EAAa,MAAM;aACvB,SAAS,EAAQ,SAAS,UAAU,EAAE;aACtC,IAAI,EAAa,UAAU;IAN/C,OAAO;WAUO,KAAK,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,mBAAmB;IAoBtE;;;;OAIG;IACI,MAAM,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI;CAwB9C;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -11,6 +11,8 @@ import type { Checkpoint, CheckpointProof } from '../history/checkpoint.ts';
|
|
|
11
11
|
export declare const PROOF_CONTEXT: string;
|
|
12
12
|
/** What a verified proof attests, and by whom. */
|
|
13
13
|
export interface VerifiedProof {
|
|
14
|
+
/** Conservative expiry of counted attestations and their certified signing/identity keys. */
|
|
15
|
+
readonly validUntil: number;
|
|
14
16
|
/** The root the proof leads to: the `effectiveTree` ETag of its version. */
|
|
15
17
|
readonly eTag: ETag;
|
|
16
18
|
/** The roaming network with what the proof gives completely; pruned arrays as they are. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stationProof.d.ts","sourceRoot":"","sources":["../../src/proofs/stationProof.ts"],"names":[],"mappings":"AAkBA,OAAO,EAA0B,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC3F,OAAO,EAA0B,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAc,KAAK,IAAI,EAAE,MAAU,aAAa,CAAC;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAY,8BAA8B,CAAC;AAE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,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Epoch } from '../history/epoch.ts';
|
|
1
2
|
import type { POIPublicKey } from '../keys.ts';
|
|
2
3
|
import type { KeyStatement } from './keyStatement.ts';
|
|
3
4
|
import { TrustAnchor } from './trustAnchor.ts';
|
|
@@ -28,7 +29,10 @@ export interface TrustEvaluation {
|
|
|
28
29
|
* decisions for each operation. It is not persisted, and cannot be constructed from a serialized green flag.
|
|
29
30
|
*/
|
|
30
31
|
export declare class TrustContext {
|
|
32
|
+
private readonly statement;
|
|
31
33
|
readonly evaluatedAt: number;
|
|
34
|
+
readonly epoch: Epoch;
|
|
35
|
+
readonly epochs: readonly Epoch[];
|
|
32
36
|
readonly anchor: TrustAnchor;
|
|
33
37
|
readonly authorizedAnchor: TrustAnchor;
|
|
34
38
|
readonly trustedHolders: readonly (readonly string[])[];
|
|
@@ -38,6 +42,8 @@ export declare class TrustContext {
|
|
|
38
42
|
readonly requiredConsensus: number;
|
|
39
43
|
readonly validUntil: number;
|
|
40
44
|
private constructor();
|
|
45
|
+
/** Attach only profiles established by a verified transition; the bootstrap keeps the first epoch. */
|
|
46
|
+
static withEpoch(reference: TrustContext, epoch: Epoch, epochs?: readonly Epoch[]): TrustContext;
|
|
41
47
|
static create(anchor: TrustAnchor, statement: KeyStatement, options: TrustEvaluationOptions): TrustContext;
|
|
42
48
|
static evaluate(anchor: TrustAnchor, statement: KeyStatement, options: TrustEvaluationOptions): TrustEvaluation;
|
|
43
49
|
/** The context represents exactly one evaluation time; a different time requires fresh local decisions. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trustContext.d.ts","sourceRoot":"","sources":["../../src/proofs/trustContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"trustContext.d.ts","sourceRoot":"","sources":["../../src/proofs/trustContext.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAa,KAAK,KAAK,EAAC,MAAM,q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AAc,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC;IAC/D,SAAgB,gBAAgB,EAAE,MAAM,CAAC;IACzC,SAAgB,wBAAwB,EAAE,MAAM,CAAC;IACjD,SAAgB,kBAAkB,EAAE,MAAM,CAAC;IAC3C,SAAgB,iBAAiB,EAAE,MAAM,CAAC;IAC1C,SAAgB,UAAU,EAAE,MAAM,CAAC;IAEnC,OAAO;IAeP,sGAAsG;WACxF,SAAS,CAAC,SAAS,EAAC,YAAY,EAAC,KAAK,EAAC,KAAK,EAAC,MAAM,GAAC,SAAS,KAAK,EAAU,GAAE,YAAY;WAG1F,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,sBAAsB,GAAG,YAAY;WAOnG,QAAQ,CAAC,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,sBAAsB,GAAG,eAAe;IAkDtH,2GAA2G;IACpG,cAAc,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM;IAM1D,6FAA6F;IACtF,eAAe,CAAC,SAAS,EAAE,YAAY,EAAE,iBAAiB,GAAE,SAAS,YAAY,EAAO,EACxE,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,UAAU,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;CASjG;AAED,yHAAyH;AACzH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,GAAG,WAAW,CAEvE"}
|
|
@@ -7,6 +7,11 @@ import { TrustContext } from '../proofs/trustContext.ts';
|
|
|
7
7
|
import type { TrustAnchor } from '../proofs/trustAnchor.ts';
|
|
8
8
|
/** A charging station as a verified proof gives it: everything here is attested by the roaming network operator. */
|
|
9
9
|
export interface VerifiedChargingStation {
|
|
10
|
+
/** Evaluation time and conservative freshness bound of the counted root attestations. */
|
|
11
|
+
readonly verification: {
|
|
12
|
+
readonly at: number;
|
|
13
|
+
readonly validUntil: number;
|
|
14
|
+
};
|
|
10
15
|
readonly roamingNetwork: {
|
|
11
16
|
readonly id: string;
|
|
12
17
|
readonly name: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chargingStation.d.ts","sourceRoot":"","sources":["../../src/verifier/chargingStation.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAkC,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACnG,OAAO,KAAK,EAAE,IAAI,EAAE,MAA6B,aAAa,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAA0B,YAAY,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAkB,2BAA2B,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAoD,MAAM,6BAA6B,CAAC;AAC/G,OAAO,EAAE,YAAY,EAAE,MAA0B,2BAA2B,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAsB,0BAA0B,CAAC;AAI5E,oHAAoH;AACpH,MAAM,WAAW,uBAAuB;IAEpC,QAAQ,CAAC,cAAc,EAAG;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IAC/H,qHAAqH;IACrH,QAAQ,CAAC,QAAQ,EAAS,UAAU,CAAC;IACrC,yDAAyD;IACzD,QAAQ,CAAC,YAAY,EAAK,UAAU,CAAC;IACrC,qHAAqH;IACrH,QAAQ,CAAC,eAAe,EAAE,UAAU,CAAC;IACrC,QAAQ,CAAC,KAAK,EAAY,SAAS,UAAU,EAAE,CAAC;IAChD,wGAAwG;IACxG,QAAQ,CAAC,OAAO,EAAU,WAAW,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC,CAAC;IACrE,yEA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C,yIAAyI;IACzI,QAAQ,CAAC,OAAO,EAAS,UAAU,CAAC;IACpC,iIAAiI;IACjI,QAAQ,CAAC,YAAY,EAAI,UAAU,CAAC;IACpC,6IAA6I;IAC7I,QAAQ,CAAC,YAAY,EAAI,SAAS,gBAAgB,EAAE,CAAC;CACxD;AA2ID;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAI,WAAW,GAAG,YAAY,EACpC,KAAK,EAAK,SAAS,GAAG,oBAAoB,EAC1C,OAAO,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,uBAAuB,CAiG1J;AAGD,qEAAqE;AACrE,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,SAAS,EAAG,cAAc,CAAC;IACpC,yFAAyF;IACzF,QAAQ,CAAC,MAAM,EAAM,MAAM,CAAC;CAC/B;AAGD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAM,uBAAuB,EACpC,UAAU,EAAG,SAAS,EACtB,OAAO,GAAM;IAAE,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAAA;CAAO,GAAG,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CA6EnH"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type JSONValue } from '../json/value.ts';
|
|
2
2
|
import { POIPublicKey } from '../keys.ts';
|
|
3
|
+
import { type RoleSignature } from '../history/commit.ts';
|
|
3
4
|
import type { Checkpoint } from '../history/checkpoint.ts';
|
|
4
5
|
import type { OperatorTrust } from './trust.ts';
|
|
5
6
|
/** A witness a verifier trusts, with its key: trusted independently of the network (10.2), e.g. by configuration. */
|
|
@@ -17,6 +18,11 @@ export interface CheckpointSignatures {
|
|
|
17
18
|
readonly witnessedBy: readonly string[];
|
|
18
19
|
/** Signatures that did not count: by untrusted keys, in another role, or invalid. */
|
|
19
20
|
readonly ignored: readonly string[];
|
|
21
|
+
/**
|
|
22
|
+
* The signatures that verified, in their order: those a history takes the checkpoint with (`verifyCheckpoint` of
|
|
23
|
+
* `HistoryOptions`, S39), the others left out.
|
|
24
|
+
*/
|
|
25
|
+
readonly verified: readonly RoleSignature[];
|
|
20
26
|
}
|
|
21
27
|
/**
|
|
22
28
|
* Verifies the signatures of a checkpoint a verifier requires (10.2): as the roaming network operator, by its trusted
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkpoints.d.ts","sourceRoot":"","sources":["../../src/verifier/checkpoints.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAO,KAAK,SAAS,EAAE,MAAkB,kBAAkB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAyB,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"checkpoints.d.ts","sourceRoot":"","sources":["../../src/verifier/checkpoints.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAO,KAAK,SAAS,EAAE,MAAkB,kBAAkB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAyB,YAAY,CAAC;AAC7D,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAsB,0BAA0B,CAAC;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAmB,YAAY,CAAC;AAI7D,qHAAqH;AACrH,MAAM,WAAW,cAAc;IAC3B,QAAQ,CAAC,OAAO,EAAG,MAAM,CAAC;IAC1B,QAAQ,CAAC,GAAG,EAAO,YAAY,CAAC;CACnC;AAED,mHAAmH;AACnH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS,GAAG,cAAc,EAAE,CAKxE;AAGD,2DAA2D;AAC3D,MAAM,WAAW,oBAAoB;IACjC,wFAAwF;IACxF,QAAQ,CAAC,QAAQ,EAAO,SAAS,MAAM,EAAE,CAAC;IAC1C,mEAAmE;IACnE,QAAQ,CAAC,WAAW,EAAI,SAAS,MAAM,EAAE,CAAC;IAC1C,qFAAqF;IACrF,QAAQ,CAAC,OAAO,EAAQ,SAAS,MAAM,EAAE,CAAC;IAC1C;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAO,SAAS,aAAa,EAAE,CAAC;CACpD;AAGD;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAG,UAAU,EACvB,KAAK,EAAQ,aAAa,EAC1B,OAAO,GAAM;IAAE,SAAS,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,oBAAoB,CAsExJ;AAGD,mIAAmI;AACnI,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,GAAG,IAAI,CAoB7E"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { JSONValue } from '../json/value.ts';
|
|
2
|
+
import type { TrustContext } from '../proofs/trustContext.ts';
|
|
3
|
+
import type { HistoricalTrustContext } from './historicalMeasurements.ts';
|
|
4
|
+
/** Library extension: this usage authorizes charging transparency envelopes, independently of price statements. */
|
|
5
|
+
export declare const CHARGING_DOCUMENT_USAGE: "chargeTransparencyRecords";
|
|
6
|
+
export interface AuthorizedChargingDocumentKeys {
|
|
7
|
+
readonly evseId: string;
|
|
8
|
+
readonly chargingStationId: string;
|
|
9
|
+
readonly operatorId: string;
|
|
10
|
+
readonly at: number;
|
|
11
|
+
readonly commitId: string;
|
|
12
|
+
readonly revision: number;
|
|
13
|
+
readonly keys: readonly {
|
|
14
|
+
readonly id: string;
|
|
15
|
+
readonly algorithm: string;
|
|
16
|
+
readonly encodings: readonly string[];
|
|
17
|
+
readonly value: string;
|
|
18
|
+
readonly keyUsage: readonly string[];
|
|
19
|
+
}[];
|
|
20
|
+
}
|
|
21
|
+
/** Authentication and key normalization are shared by web, desktop and mobile callers. No envelope-supplied key is an authority input. */
|
|
22
|
+
export declare function verifyChargingDocumentKeys(context: TrustContext | HistoricalTrustContext, proof: JSONValue, request: {
|
|
23
|
+
readonly evseId: string;
|
|
24
|
+
readonly operatorId: string;
|
|
25
|
+
readonly at: number;
|
|
26
|
+
}): AuthorizedChargingDocumentKeys;
|
|
27
|
+
//# sourceMappingURL=documentKeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentKeys.d.ts","sourceRoot":"","sources":["../../src/verifier/documentKeys.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAyB,kBAAkB,CAAC;AAErE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAsB,2BAA2B,CAAC;AAC9E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAY,6BAA6B,CAAC;AAMhF,mHAAmH;AACnH,eAAO,MAAM,uBAAuB,EAAG,2BAAoC,CAAC;AAE5E,MAAM,WAAW,8BAA8B;IAC3C,QAAQ,CAAC,MAAM,EAAc,MAAM,CAAC;IACpC,QAAQ,CAAC,iBAAiB,EAAG,MAAM,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAU,MAAM,CAAC;IACpC,QAAQ,CAAC,EAAE,EAAkB,MAAM,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAY,MAAM,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAY,MAAM,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAgB,SAAS;QAClC,QAAQ,CAAC,EAAE,EAAU,MAAM,CAAC;QAC5B,QAAQ,CAAC,SAAS,EAAG,MAAM,CAAC;QAC5B,QAAQ,CAAC,SAAS,EAAG,SAAS,MAAM,EAAE,CAAC;QACvC,QAAQ,CAAC,KAAK,EAAO,MAAM,CAAC;QAC5B,QAAQ,CAAC,QAAQ,EAAI,SAAS,MAAM,EAAE,CAAC;KAC1C,EAAE,CAAC;CACP;AAYD,0IAA0I;AAC1I,wBAAgB,0BAA0B,CAAC,OAAO,EAAG,YAAY,GAAG,sBAAsB,EAC/C,KAAK,EAAK,SAAS,EACnB,OAAO,EAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,8BAA8B,CAkClK"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { JSONValue } from '../json/value.ts';
|
|
2
|
+
import type { TrustAnchor } from '../proofs/trustAnchor.ts';
|
|
3
|
+
import { TrustContext } from '../proofs/trustContext.ts';
|
|
4
|
+
import { KeyStatement } from '../proofs/keyStatement.ts';
|
|
5
|
+
import { POIPublicKey } from '../keys.ts';
|
|
6
|
+
import { Checkpoint } from '../history/checkpoint.ts';
|
|
7
|
+
import type { TrustedWitness } from './checkpoints.ts';
|
|
8
|
+
import { type MeasurementKeyFormat, type VerifiedMeterKeyBinding } from './measurementKeys.ts';
|
|
9
|
+
/** Versioned TS-library extension, not a change to the existing Evidence wire schema. */
|
|
10
|
+
export declare const HISTORICAL_METER_EVIDENCE_CONTEXT = "https://open.charging.cloud/contexts/wwcp/historicalMeterEvidence/v1";
|
|
11
|
+
export interface HistoricalMeterEvidence {
|
|
12
|
+
readonly evseId: string;
|
|
13
|
+
readonly versions: readonly {
|
|
14
|
+
readonly proof: JSONValue;
|
|
15
|
+
readonly commitProof?: JSONValue;
|
|
16
|
+
readonly checkpoints: readonly {
|
|
17
|
+
readonly checkpoint: JSONValue;
|
|
18
|
+
readonly operator: JSONValue;
|
|
19
|
+
}[];
|
|
20
|
+
}[];
|
|
21
|
+
}
|
|
22
|
+
export interface HistoricalMeterKeyBinding extends Omit<VerifiedMeterKeyBinding, 'evidence'> {
|
|
23
|
+
readonly evidence: Omit<VerifiedMeterKeyBinding['evidence'], 'association'> & {
|
|
24
|
+
readonly association: 'historical-attestation';
|
|
25
|
+
readonly measurementTimes: readonly number[];
|
|
26
|
+
readonly historicalStatementDigest: string;
|
|
27
|
+
readonly attestationValidUntil: number;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface HistoricalMeterVerification {
|
|
31
|
+
readonly bindings: readonly HistoricalMeterKeyBinding[];
|
|
32
|
+
readonly versions: readonly {
|
|
33
|
+
readonly commitId: string;
|
|
34
|
+
readonly publication: 'missing' | 'rno-checkpoint' | 'witnessed-checkpoint';
|
|
35
|
+
readonly checkpointId?: string;
|
|
36
|
+
readonly witnessedBy: readonly string[];
|
|
37
|
+
}[];
|
|
38
|
+
readonly checkedAt: number;
|
|
39
|
+
readonly timeBasis: 'signed-measurement-timestamps';
|
|
40
|
+
readonly independentTime: 'not-proven';
|
|
41
|
+
readonly latestVersion: 'not-proven';
|
|
42
|
+
}
|
|
43
|
+
export interface HistoricalMeterPolicy {
|
|
44
|
+
readonly witnesses?: readonly TrustedWitness[];
|
|
45
|
+
readonly requiredWitnesses?: number;
|
|
46
|
+
readonly requirePublication?: boolean;
|
|
47
|
+
/** Caller-authorized compromise information, never read from the evidence bundle. */
|
|
48
|
+
readonly revocations?: readonly {
|
|
49
|
+
readonly keyId: string;
|
|
50
|
+
readonly invalidFrom: number;
|
|
51
|
+
}[];
|
|
52
|
+
}
|
|
53
|
+
export declare function parseHistoricalMeterEvidence(value: JSONValue): HistoricalMeterEvidence;
|
|
54
|
+
export declare function historicalOperatorContext(current: TrustContext | HistoricalTrustContext, operator: JSONValue, at: number): TrustContext;
|
|
55
|
+
/** Fresh local permission for historical verification, independent of today's statement expiry. Not persisted. */
|
|
56
|
+
export declare class HistoricalTrustContext {
|
|
57
|
+
readonly evaluatedAt: number;
|
|
58
|
+
private readonly authorities;
|
|
59
|
+
readonly authorizedAnchor: TrustAnchor;
|
|
60
|
+
readonly roamingNetworkId: string;
|
|
61
|
+
readonly roamingNetworkOperatorId: string;
|
|
62
|
+
readonly requiredConsensus: number;
|
|
63
|
+
readonly keyStatementDigest: string;
|
|
64
|
+
/** An operation deadline, not historical document validity or a lease on local trust. */
|
|
65
|
+
readonly validUntil: number;
|
|
66
|
+
readonly trustedHolders: readonly (readonly string[])[];
|
|
67
|
+
readonly epoch: TrustContext['epoch'];
|
|
68
|
+
readonly epochs: TrustContext['epochs'];
|
|
69
|
+
private constructor();
|
|
70
|
+
/** Contexts must be reconstructed from current local roots and verified transition certificates, never serialized success flags. */
|
|
71
|
+
static fromVerifiedAuthorities(reference: TrustContext, authorities: readonly {
|
|
72
|
+
readonly context: TrustContext;
|
|
73
|
+
readonly from: number;
|
|
74
|
+
readonly until: number;
|
|
75
|
+
}[], now: number): HistoricalTrustContext;
|
|
76
|
+
authorityAt(at: number): TrustContext | undefined;
|
|
77
|
+
static create(anchor: TrustAnchor, reference: KeyStatement, options: {
|
|
78
|
+
readonly trustedIdentityKeyIds: Iterable<string>;
|
|
79
|
+
readonly otherIdentityKeys?: readonly POIPublicKey[];
|
|
80
|
+
readonly now?: number;
|
|
81
|
+
}): HistoricalTrustContext;
|
|
82
|
+
}
|
|
83
|
+
/** Current caller authorization and historical document validity are deliberately different clocks. */
|
|
84
|
+
export declare function verifyHistoricalMeterEvidence(current: TrustContext | HistoricalTrustContext, value: JSONValue, request: {
|
|
85
|
+
readonly evseId: string;
|
|
86
|
+
readonly meterSerialNumber: string;
|
|
87
|
+
readonly measurementTimes: readonly number[];
|
|
88
|
+
readonly keyFormat: MeasurementKeyFormat;
|
|
89
|
+
}, policy?: HistoricalMeterPolicy): HistoricalMeterVerification;
|
|
90
|
+
/** Shared checkpoint authority for meter and price evidence. A witness is never authorized by its own bundle. */
|
|
91
|
+
export declare function verifyAuthorizedCheckpoint(current: TrustContext | HistoricalTrustContext, checkpoint: Checkpoint, operator: JSONValue, policy?: HistoricalMeterPolicy): {
|
|
92
|
+
readonly checkpoint: Checkpoint;
|
|
93
|
+
readonly signedBy: readonly string[];
|
|
94
|
+
readonly witnessedBy: readonly string[];
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=historicalMeasurements.d.ts.map
|
|
@@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AAY,GAAG,sBAAsB,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE;IACrH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1G,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;CAC5C,EAAE,MAAM,GAAE,qBAA0B,GAAG,2BAA2B,CAgFlE;AAGD,iHAAiH;AACjH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,YAAY,GAAG,sBAAsB,EAAE,UAAU,EAAE,UAAU,EAC7G,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAE,qBAA0B,GAAG;IAAE,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAkC/K"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { POIError } from '../errors.ts';
|
|
2
|
+
import { type JSONValue } from '../json/value.ts';
|
|
3
|
+
import { TrustContext } from '../proofs/trustContext.ts';
|
|
4
|
+
export type MeasurementKeyFormat = 'spki-der' | 'cose-key';
|
|
5
|
+
export type MeasurementKeyProblem = 'missing-meter' | 'identity-mismatch' | 'ambiguous-key' | 'unsupported-key' | 'invalid-key';
|
|
6
|
+
export declare class MeasurementKeyError extends POIError {
|
|
7
|
+
readonly code: MeasurementKeyProblem;
|
|
8
|
+
constructor(code: MeasurementKeyProblem, message: string);
|
|
9
|
+
}
|
|
10
|
+
/** P-256 pilot. The declared format is required; a 64-character ID never determines its derivation scheme. */
|
|
11
|
+
export interface MeasurementPublicKey {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly idScheme: 'sha256-spki' | 'sha256-cose-key-thumbprint';
|
|
14
|
+
readonly canonicalId: string;
|
|
15
|
+
readonly sourceFormat: MeasurementKeyFormat;
|
|
16
|
+
readonly value: string;
|
|
17
|
+
readonly encodings: readonly string[];
|
|
18
|
+
readonly algorithm: 'ECDSA-secp256r1';
|
|
19
|
+
}
|
|
20
|
+
export interface VerifiedMeterKeyBinding {
|
|
21
|
+
readonly evseId: string;
|
|
22
|
+
readonly chargingStationId: string;
|
|
23
|
+
readonly meterId: string;
|
|
24
|
+
readonly meterSerialNumber: string;
|
|
25
|
+
readonly key: MeasurementPublicKey;
|
|
26
|
+
readonly evidence: {
|
|
27
|
+
readonly roamingNetworkId: string;
|
|
28
|
+
readonly roamingNetworkOperatorId: string;
|
|
29
|
+
readonly commitId: string;
|
|
30
|
+
readonly revision: number;
|
|
31
|
+
readonly treeRoot: string;
|
|
32
|
+
readonly keyStatementDigest: string;
|
|
33
|
+
readonly verifiedAt: number;
|
|
34
|
+
readonly validUntil: number;
|
|
35
|
+
/** A current authenticated snapshot is not historical installation/key-rotation evidence. */
|
|
36
|
+
readonly association: 'current-snapshot';
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export declare function parseMeasurementPublicKey(value: JSONValue, format: MeasurementKeyFormat): MeasurementPublicKey;
|
|
40
|
+
/** Re-verifies the original proof against an authorized context. Never searches other EVSEs or tries unrelated keys. */
|
|
41
|
+
export declare function verifyMeterKey(context: TrustContext, proof: JSONValue, request: {
|
|
42
|
+
readonly evseId: string;
|
|
43
|
+
readonly meterSerialNumber: string;
|
|
44
|
+
readonly meterId?: string;
|
|
45
|
+
readonly keyId?: string;
|
|
46
|
+
readonly keyFormat: MeasurementKeyFormat;
|
|
47
|
+
}): VerifiedMeterKeyBinding;
|
|
48
|
+
//# sourceMappingURL=measurementKeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measurementKeys.d.ts","sourceRoot":"","sources":["../../src/verifier/measurementKeys.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,C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,CAAC;QAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;QACpC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,6FAA6F;QAC7F,QAAQ,CAAC,WAAW,EAAE,kBAAkB,CAAC;KAC5C,CAAC;CACL;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,oBAAoB,GAAG,oBAAoB,CA0C9G;AAED,wHAAwH;AACxH,wBAAgB,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE;IAC7E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IACvF,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;CACrE,GAAG,uBAAuB,CAsB1B"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { JSONValue } from '../json/value.ts';
|
|
2
|
+
import type { ChargingStationProof } from '../proofs/stationProof.ts';
|
|
3
|
+
import type { Checkpoint } from '../history/checkpoint.ts';
|
|
4
|
+
import type { PriceStatement } from '../proofs/priceStatement.ts';
|
|
5
|
+
/** Authenticated observations supplied by the caller, never imported success flags. Comparison grants no authority. */
|
|
6
|
+
export interface VersionObservation {
|
|
7
|
+
readonly kind: 'station' | 'checkpoint' | 'price' | 'live' | 'policy';
|
|
8
|
+
readonly chain: string;
|
|
9
|
+
readonly epoch: string;
|
|
10
|
+
readonly position: number;
|
|
11
|
+
readonly digest: string;
|
|
12
|
+
readonly revision?: number;
|
|
13
|
+
readonly previous?: string;
|
|
14
|
+
readonly identity?: string;
|
|
15
|
+
readonly original: string;
|
|
16
|
+
readonly final?: boolean;
|
|
17
|
+
readonly rootDigest?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface VersionConflict {
|
|
20
|
+
readonly code: 'fork' | 'identity' | 'link';
|
|
21
|
+
readonly kind: VersionObservation['kind'];
|
|
22
|
+
readonly chain: string;
|
|
23
|
+
readonly epoch: string;
|
|
24
|
+
readonly position: number;
|
|
25
|
+
readonly known: string;
|
|
26
|
+
readonly incoming: string;
|
|
27
|
+
readonly original: string;
|
|
28
|
+
readonly observedAt: number;
|
|
29
|
+
}
|
|
30
|
+
export interface ObservedVersions {
|
|
31
|
+
readonly version: 1;
|
|
32
|
+
readonly points: readonly VersionObservation[];
|
|
33
|
+
readonly transitions?: readonly {
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly sequence: number;
|
|
36
|
+
readonly fromPolicyId: string;
|
|
37
|
+
readonly toPolicyId: string;
|
|
38
|
+
readonly fromEpoch: number;
|
|
39
|
+
readonly toEpoch: number;
|
|
40
|
+
readonly original: string;
|
|
41
|
+
}[];
|
|
42
|
+
readonly heads: Readonly<Record<string, {
|
|
43
|
+
readonly epoch: string;
|
|
44
|
+
readonly position: number;
|
|
45
|
+
readonly digest: string;
|
|
46
|
+
}>>;
|
|
47
|
+
readonly conflicts: readonly VersionConflict[];
|
|
48
|
+
}
|
|
49
|
+
export interface VersionIssue {
|
|
50
|
+
readonly code: 'fork' | 'identity' | 'link' | 'known-fork' | 'rollback' | 'continuity-missing' | 'epoch-transition';
|
|
51
|
+
readonly kind: VersionObservation['kind'];
|
|
52
|
+
readonly chain: string;
|
|
53
|
+
readonly detail: string;
|
|
54
|
+
}
|
|
55
|
+
export interface VersionComparison {
|
|
56
|
+
readonly accepted: boolean;
|
|
57
|
+
readonly status: 'first-seen' | 'matches' | 'advanced' | 'historical' | 'rejected';
|
|
58
|
+
readonly issues: readonly VersionIssue[];
|
|
59
|
+
readonly state: ObservedVersions;
|
|
60
|
+
}
|
|
61
|
+
export declare function emptyObservedVersions(): ObservedVersions;
|
|
62
|
+
export declare function observedVersionsChecksum(value: JSONValue): string;
|
|
63
|
+
/** Deterministic negative constraints. Current selection is monotonic; historical inspection permits older coordinates, never contradictory ones. */
|
|
64
|
+
export declare function compareObservedVersions(before: ObservedVersions, candidates: readonly VersionObservation[], mode: 'current' | 'historical', observedAt: number): VersionComparison;
|
|
65
|
+
/** Metadata projection only: callers must authenticate each original with the normal role/quorum verifiers first. */
|
|
66
|
+
export declare function stationVersionObservation(proof: ChargingStationProof, epoch?: string): VersionObservation;
|
|
67
|
+
export declare function checkpointVersionObservation(checkpoint: Checkpoint): VersionObservation;
|
|
68
|
+
export declare function priceVersionObservation(statement: PriceStatement): VersionObservation;
|
|
69
|
+
export declare function checkpointRootVersionObservation(checkpoint: Checkpoint): VersionObservation;
|
|
70
|
+
//# sourceMappingURL=observedVersions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observedVersions.d.ts","sourceRoot":"","sources":["../../src/verifier/observedVersions.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAGlE,uHAAuH;AACvH,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,IAAI,EAAC,SAAS,GAAC,YAAY,GAAC,OAAO,GAAC,MAAM,GAAC,QAAQ,CAAC;IAC7D,QAAQ,CAAC,KAAK,EAAC,MAAM,CAAC;IAAA,QAAQ,CAAC,KAAK,EAAC,MAAM,CAAC;IAAA,QAAQ,CAAC,QAAQ,EAAC,MAAM,CAAC;IAAA,QAAQ,CAAC,MAAM,EAAC,MAAM,CAAC;IAC5F,QAAQ,CAAC,QAAQ,CAA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AK,GAAC,MAAS,GAAE,kBAAkB,CAEvG;AACD,wBAAgB,4BAA4B,CAAC,UAAU,EAAC,UAAU,GAAE,kBAAkB,CAGrF;AACD,wBAAgB,uBAAuB,CAAC,SAAS,EAAC,cAAc,GAAE,kBAAkB,CAGnF;AAED,wBAAgB,gCAAgC,CAAC,UAAU,EAAC,UAAU,GAAE,kBAAkB,CAEzF"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { JSONObject, JSONValue } from '../json/value.ts';
|
|
2
|
+
import { POIPublicKey } from '../keys.ts';
|
|
3
|
+
import type { Checkpoint } from '../history/checkpoint.ts';
|
|
4
|
+
import type { PriceStatement } from '../proofs/priceStatement.ts';
|
|
5
|
+
/** Experimental extensions, not the checkpoint witness wire format or an RFC 3161 token. */
|
|
6
|
+
export declare const PRICE_PUBLICATION_RECEIPT_CONTEXT = "https://open.charging.cloud/contexts/wwcp/pricePublicationReceipt/v1";
|
|
7
|
+
export declare const WITNESS_PUBLICATION_POLICY_CONTEXT = "https://open.charging.cloud/contexts/wwcp/witnessPublicationPolicy/v1";
|
|
8
|
+
/** Bind the actual original CPO signature and the complete selected tariff, including its currency. */
|
|
9
|
+
export declare function pricePublicationOfferHashes(statement: PriceStatement, tariff: JSONObject): {
|
|
10
|
+
readonly priceStatementSHA256: string;
|
|
11
|
+
readonly tariffSHA256: string;
|
|
12
|
+
};
|
|
13
|
+
export interface PublicationWitness {
|
|
14
|
+
readonly id: string;
|
|
15
|
+
/** Independently approved organization identity; several keys/aliases never add votes. */
|
|
16
|
+
readonly organization: string;
|
|
17
|
+
readonly networks: readonly string[];
|
|
18
|
+
readonly keys: readonly POIPublicKey[];
|
|
19
|
+
readonly notBefore: number;
|
|
20
|
+
readonly notAfter: number;
|
|
21
|
+
/** Locally accepted upper bound, never taken from a receipt. */
|
|
22
|
+
readonly clockErrorMs: number;
|
|
23
|
+
/** Explicit receipt endpoints, not a guessed discovery URL. */
|
|
24
|
+
readonly endpoints: readonly string[];
|
|
25
|
+
readonly json: JSONObject;
|
|
26
|
+
}
|
|
27
|
+
export interface WitnessPublicationPolicy {
|
|
28
|
+
readonly requiredOrganizations: number;
|
|
29
|
+
readonly witnesses: readonly PublicationWitness[];
|
|
30
|
+
readonly json: JSONObject;
|
|
31
|
+
}
|
|
32
|
+
/** Syntax only. Callers must additionally apply their own public-network transport policy before fetching. */
|
|
33
|
+
export declare function publicPublicationURL(text: string): string;
|
|
34
|
+
/** Parsing a suggested policy never authorizes it. Only the caller supplies the accepted policy. */
|
|
35
|
+
export declare function parseWitnessPublicationPolicy(value: JSONValue): WitnessPublicationPolicy;
|
|
36
|
+
export declare class PricePublicationReceipt {
|
|
37
|
+
readonly json: JSONObject;
|
|
38
|
+
readonly observedAt: number;
|
|
39
|
+
readonly signedAt: number;
|
|
40
|
+
private constructor();
|
|
41
|
+
static parse(value: JSONValue): PricePublicationReceipt;
|
|
42
|
+
signingBytes(): Uint8Array;
|
|
43
|
+
digest(): string;
|
|
44
|
+
}
|
|
45
|
+
export interface PricePublicationVerification {
|
|
46
|
+
readonly status: 'witnessed-before-signed-start' | 'not-proven' | 'invalid';
|
|
47
|
+
readonly requiredOrganizations: number;
|
|
48
|
+
readonly organizations: readonly string[];
|
|
49
|
+
readonly timeBasis: 'trusted-witness-clocks-versus-signed-start';
|
|
50
|
+
readonly actualStartTime: 'not-independently-proven';
|
|
51
|
+
readonly receipts: readonly {
|
|
52
|
+
readonly witnessId: string;
|
|
53
|
+
readonly organization?: string;
|
|
54
|
+
readonly keyId?: string;
|
|
55
|
+
readonly receiptDigest?: string;
|
|
56
|
+
readonly latestPublicationAt?: number;
|
|
57
|
+
readonly sourceURL?: string;
|
|
58
|
+
readonly status: 'counted' | 'duplicate-organization' | 'after-start' | 'untrusted' | 'invalid';
|
|
59
|
+
readonly detail: string;
|
|
60
|
+
}[];
|
|
61
|
+
}
|
|
62
|
+
/** Inclusion and CPO signatures are checked by the calling shared session-price verifier first. */
|
|
63
|
+
export declare function verifyPricePublication(receipts: readonly JSONValue[], policy: WitnessPublicationPolicy | undefined, subject: {
|
|
64
|
+
readonly roamingNetworkId: string;
|
|
65
|
+
readonly evseId: string;
|
|
66
|
+
readonly statement: PriceStatement;
|
|
67
|
+
readonly tariff: JSONObject;
|
|
68
|
+
readonly checkpoints: readonly Checkpoint[];
|
|
69
|
+
readonly chargingStarted: number;
|
|
70
|
+
readonly now: number;
|
|
71
|
+
readonly excludedKeyMaterial?: readonly string[];
|
|
72
|
+
readonly excludedIdentities?: readonly string[];
|
|
73
|
+
}): PricePublicationVerification;
|
|
74
|
+
//# sourceMappingURL=pricePublication.d.ts.map
|