@open-charging-cloud/wwcp-poi 0.1.0 → 0.1.1
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 +155 -1
- package/README.md +70 -8
- package/dist/common.d.ts +9 -0
- package/dist/common.d.ts.map +1 -1
- package/dist/history/apply.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1671 -198
- package/dist/index.js.map +1 -1
- package/dist/keys.d.ts.map +1 -1
- package/dist/network/certificates.d.ts +6 -4
- package/dist/network/certificates.d.ts.map +1 -1
- package/dist/network/evTaler.d.ts +13 -0
- package/dist/network/evTaler.d.ts.map +1 -1
- package/dist/network/identifications.d.ts +15 -2
- package/dist/network/identifications.d.ts.map +1 -1
- package/dist/network/partyKeys.d.ts.map +1 -1
- package/dist/network/roamingNetwork.d.ts +9 -0
- package/dist/network/roamingNetwork.d.ts.map +1 -1
- package/dist/network/versionTexts.d.ts +3 -2
- package/dist/network/versionTexts.d.ts.map +1 -1
- package/dist/network/writtenForm.d.ts +24 -0
- package/dist/network/writtenForm.d.ts.map +1 -0
- package/dist/proofs/keyStatement.d.ts +6 -1
- package/dist/proofs/keyStatement.d.ts.map +1 -1
- package/dist/proofs/signingKeyCertificate.d.ts +5 -0
- package/dist/proofs/signingKeyCertificate.d.ts.map +1 -1
- package/dist/proofs/stationProof.d.ts +3 -2
- package/dist/proofs/stationProof.d.ts.map +1 -1
- package/dist/proofs/trustContext.d.ts +50 -0
- package/dist/proofs/trustContext.d.ts.map +1 -0
- package/dist/verifier/chargingStation.d.ts +2 -1
- package/dist/verifier/chargingStation.d.ts.map +1 -1
- package/dist/verifier/trust.d.ts +3 -2
- package/dist/verifier/trust.d.ts.map +1 -1
- package/dist/verifier/version.d.ts +2 -1
- package/dist/verifier/version.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/keys.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|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,GAAG,OAAO;IAIxC,2FAA2F;IACpF,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAMvC;;;;;;OAMG;WACW,KAAK,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,EAAE,IAAI,SAAiB,GAAG,YAAY;IA2FtF,0DAA0D;WAC5C,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,YAAY,EAAE;CAiBrF"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { type JSONObject } from '../json/value.ts';
|
|
2
2
|
/**
|
|
3
|
-
* The error, when WWCP_POI refuses the given certificate, as `ConformityCertificate.TryParse` reads it
|
|
4
|
-
* its arguments, by their path
|
|
3
|
+
* The error, when WWCP_POI refuses the given certificate, as `ConformityCertificate.TryParse` reads it, in its words: what
|
|
4
|
+
* it reads as its arguments, by their path, then what its constructor checks, as an argument of its parameter where it
|
|
5
|
+
* names one.
|
|
5
6
|
*/
|
|
6
7
|
export declare function invalidCertificate(certificate: JSONObject): string | undefined;
|
|
7
8
|
/**
|
|
8
|
-
* The error, when the given content names a certificate WWCP_POI refuses to read,
|
|
9
|
-
*
|
|
9
|
+
* The error, when the given content names a certificate WWCP_POI refuses to read, or a conformity assessment body naming
|
|
10
|
+
* them it refuses, as WWCP_POI says it; undefined for none. Body by body, as WWCP_POI reads them: what it reads of the
|
|
11
|
+
* body, its certificates, then what its constructor checks.
|
|
10
12
|
*/
|
|
11
13
|
export declare function invalidCertificates(content: JSONObject): string | undefined;
|
|
12
14
|
//# sourceMappingURL=certificates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"certificates.d.ts","sourceRoot":"","sources":["../../src/network/certificates.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"certificates.d.ts","sourceRoot":"","sources":["../../src/network/certificates.ts"],"names":[],"mappings":"AAkBA,OAAO,EAA0B,KAAK,UAAU,EAAkB,MAAM,kBAAkB,CAAC;AA6U3F;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAE9E;AAsED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAe3E"}
|
|
@@ -26,6 +26,19 @@ export interface EVTalerMerchant {
|
|
|
26
26
|
* same key is refused, so that it is compared with the one of a contract as a text.
|
|
27
27
|
*/
|
|
28
28
|
export declare const isTalerPublicKey: (value: JSONValue | undefined) => value is string;
|
|
29
|
+
/**
|
|
30
|
+
* A URL as Hermod reads it (`URL.TryParse`), as far as a base URL needs it: trimmed, with the scheme https unless it names
|
|
31
|
+
* one, which is a name of RFC 3986, then its user information, host, port, path, query and fragment. Its text is what it
|
|
32
|
+
* writes again: as given, trimmed, the scheme put in front where it named none.
|
|
33
|
+
*/
|
|
34
|
+
export interface HermodURL {
|
|
35
|
+
readonly text: string;
|
|
36
|
+
readonly scheme: string;
|
|
37
|
+
readonly user: boolean;
|
|
38
|
+
readonly query: boolean;
|
|
39
|
+
readonly fragment: boolean;
|
|
40
|
+
}
|
|
41
|
+
export declare function hermodURL(given: string): HermodURL | undefined;
|
|
29
42
|
/**
|
|
30
43
|
* The merchant of a charging station operator as `EVTalerMerchant.TryParse` reads it, with its exchanges in the ordinal
|
|
31
44
|
* order of their master public keys; its error otherwise, as WWCP_POI words it.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evTaler.d.ts","sourceRoot":"","sources":["../../src/network/evTaler.ts"],"names":[],"mappings":"AAmBA,OAAO,EAA0B,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC3F,OAAO,EAAwB,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"evTaler.d.ts","sourceRoot":"","sources":["../../src/network/evTaler.ts"],"names":[],"mappings":"AAmBA,OAAO,EAA0B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AAK,EAAE,SAAS,GAAG,eAAe,GAAG,MAAM,CAuE5E;AAGD,uGAAuG;AACvG,eAAO,MAAM,YAAY,GAAI,gBAAgB,SAAS,GAAG,SAAS,KAAG,OAC8F,CAAC;AAyDpK;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAiCtE;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GAAI,SAAS,UAAU,KAAG,MAAM,GAAG,SAGP,CAAC;AAGhE,8HAA8H;AAC9H,eAAO,MAAM,iBAAiB,GAAI,UAAU,eAAe,KAAG,QACkD,CAAC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { type JSONObject } from '../json/value.ts';
|
|
2
|
+
/**
|
|
3
|
+
* What the constructor of the roaming network refuses, as its TryParse names it: an argument of the given parameter, e.g.
|
|
4
|
+
* of its `ConformityAssessmentBodies`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const inRoamingNetwork: (error: string, parameter: string) => string;
|
|
2
7
|
/** A text as `StringComparison.OrdinalIgnoreCase` compares it: every character by its simple upper case. */
|
|
3
8
|
export declare const ignoringCase: (text: string) => string;
|
|
4
9
|
/**
|
|
@@ -6,9 +11,17 @@ export declare const ignoringCase: (text: string) => string;
|
|
|
6
11
|
* charging stations and EVSEs, and of their grid connection points.
|
|
7
12
|
*/
|
|
8
13
|
export declare function energyMetersOf(operators: readonly JSONObject[], gridOperators: readonly JSONObject[]): JSONObject[];
|
|
14
|
+
/**
|
|
15
|
+
* The error, when an entity of the given content names no identification, or one of another JSON type WWCP_POI3 refuses,
|
|
16
|
+
* as it says it; undefined for none. Its parties in the order it reads them, each before what it holds.
|
|
17
|
+
*/
|
|
18
|
+
export declare function invalidIdentification(content: JSONObject): string | undefined;
|
|
9
19
|
/**
|
|
10
20
|
* The error, when the given content names an identification twice that WWCP_POI keeps unique within the roaming network,
|
|
11
|
-
* as WWCP_POI says it; undefined for none.
|
|
21
|
+
* as WWCP_POI says it of a version, or after the last change of a change set; undefined for none. Of a version, it refuses
|
|
22
|
+
* them as the constructor of the roaming network does, in its order, each as an argument of its parameter, which its
|
|
23
|
+
* TryParse names: "The given JSON representation of a roaming network is invalid: … (Parameter 'GridOperators')". After the
|
|
24
|
+
* last change of a change set, it names them bare, in the order it checks them there (RoamingNetwork.ChangeSets.cs).
|
|
12
25
|
*/
|
|
13
|
-
export declare function duplicateIdentification(content: JSONObject): string | undefined;
|
|
26
|
+
export declare function duplicateIdentification(content: JSONObject, of: 'version' | 'change set'): string | undefined;
|
|
14
27
|
//# sourceMappingURL=identifications.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identifications.d.ts","sourceRoot":"","sources":["../../src/network/identifications.ts"],"names":[],"mappings":"AAiBA,OAAO,EAA0B,KAAK,UAAU,EAAkB,MAAM,kBAAkB,CAAC;AAiB3F,4GAA4G;AAC5G,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,KAAG,MAI7B,CAAC;AA2EhB;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,SAAS,UAAU,EAAE,EAAE,aAAa,EAAE,SAAS,UAAU,EAAE,GAAG,UAAU,EAAE,CAgCnH;
|
|
1
|
+
{"version":3,"file":"identifications.d.ts","sourceRoot":"","sources":["../../src/network/identifications.ts"],"names":[],"mappings":"AAiBA,OAAO,EAA0B,KAAK,UAAU,EAAkB,MAAM,kBAAkB,CAAC;AAiB3F;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,MAAM,EAAE,WAAW,MAAM,KAAG,MACoC,CAAC;AAEzG,4GAA4G;AAC5G,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,KAAG,MAI7B,CAAC;AA2EhB;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,SAAS,UAAU,EAAE,EAAE,aAAa,EAAE,SAAS,UAAU,EAAE,GAAG,UAAU,EAAE,CAgCnH;AA2ED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CA8C7E;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,GAAG,YAAY,GAAG,MAAM,GAAG,SAAS,CA2C7G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partyKeys.d.ts","sourceRoot":"","sources":["../../src/network/partyKeys.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAkC,KAAK,UAAU,EAAkB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"partyKeys.d.ts","sourceRoot":"","sources":["../../src/network/partyKeys.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAkC,KAAK,UAAU,EAAkB,MAAM,kBAAkB,CAAC;AAInG,OAAO,EAAE,YAAY,EAAE,MAAO,YAAY,CAAC;AA2B3C,2BAA2B;AAC3B,MAAM,WAAW,SAAS;IACtB,QAAQ,CAAC,WAAW,EAAI,SAAS,YAAY,EAAE,CAAC;IAChD,QAAQ,CAAC,YAAY,EAAG,SAAS,YAAY,EAAE,CAAC;CACnD;AA+BD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CA6BpF;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAwBxE"}
|
|
@@ -50,10 +50,19 @@ export declare class RoamingNetwork {
|
|
|
50
50
|
* revision, firmware version or serial number WWCP_POI refuses (`invalidVersionText`), nor a certificate WWCP_POI
|
|
51
51
|
* refuses to read (`invalidCertificates`), nor an EV Taler merchant or payment options it refuses (`invalidEVTaler`),
|
|
52
52
|
* nor keys of a party it refuses (`invalidPartyKeys`),
|
|
53
|
+
* nor what WWCP_POI takes and writes otherwise than the content holds it (`notWrittenAsHeld`),
|
|
53
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
|
|
54
55
|
* has (`matchesCommitETags`).
|
|
55
56
|
*/
|
|
56
57
|
static parse(value: JSONValue | undefined): RoamingNetwork;
|
|
58
|
+
/**
|
|
59
|
+
* Reads the version the given change set leads to, its content after the last change, and refuses it as `parse`
|
|
60
|
+
* does, but in the words WWCP_POI3 names what it refuses of the network there (RoamingNetwork.ChangeSets.cs): its
|
|
61
|
+
* operator and the identifications it keeps unique within the roaming network bare, not as arguments of its
|
|
62
|
+
* constructor.
|
|
63
|
+
*/
|
|
64
|
+
static afterChangeSet(content: JSONObject): RoamingNetwork;
|
|
65
|
+
private static read;
|
|
57
66
|
/** The effective content (8.1), calculated once. */
|
|
58
67
|
get effectiveContent(): JSONObject;
|
|
59
68
|
/** The `effectiveTree` ETag of the given hash algorithm (8.2). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roamingNetwork.d.ts","sourceRoot":"","sources":["../../src/network/roamingNetwork.ts"],"names":[],"mappings":"AAkBA,OAAO,
|
|
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,EA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I1B,IAAW,IAAI,IAAI,SAAS,GAAG,SAAS,CAEvC;IAED,IAAW,WAAW,IAAI,SAAS,GAAG,SAAS,CAE9C;IAED,qDAAqD;IAC9C,wBAAwB,IAAI,UAAU,EAAE;IAK/C,8EAA8E;IACvE,uBAAuB,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS;CAIrE"}
|
|
@@ -10,8 +10,9 @@ export declare const MODEL_VERSIONS: {
|
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
12
|
* The error, when the given holder names a hardware revision or firmware version twice, which `ModelVersions.Of` refuses
|
|
13
|
-
* once both were read (`A hardware revision of the charging station model 'GD-DC300'
|
|
14
|
-
* a certificate or an energy meter a certificate was issued
|
|
13
|
+
* once both were read, as an argument of its `Versions` (`A hardware revision of the charging station model 'GD-DC300'
|
|
14
|
+
* must not be given twice! (Parameter 'Versions')`): a model, a certificate or an energy meter a certificate was issued
|
|
15
|
+
* with, `whose` in words.
|
|
15
16
|
*/
|
|
16
17
|
export declare function versionTwice(holder: JSONObject, whose: string): string | undefined;
|
|
17
18
|
/**
|
|
@@ -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;AAa3F,eAAO,MAAM,SAAS,GAAI,OAAO,SAAS,GAAG,SAAS,KAAG,UAAU,EACnB,CAAC;AAkBjD,mHAAmH;AACnH,eAAO,MAAM,MAAM,GAAI,OAAO,SAAS,KAAG,OACW,CAAC;AAEtD,4FAA4F;AAC5F,eAAO,MAAM,OAAO,GAAI,MAAM,MAAM,KAAG,MACT,CAAC;AAyB/B,eAAO,MAAM,cAAc;;;CAAmF,CAAC;AAE/G
|
|
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;AAa3F,eAAO,MAAM,SAAS,GAAI,OAAO,SAAS,GAAG,SAAS,KAAG,UAAU,EACnB,CAAC;AAkBjD,mHAAmH;AACnH,eAAO,MAAM,MAAM,GAAI,OAAO,SAAS,KAAG,OACW,CAAC;AAEtD,4FAA4F;AAC5F,eAAO,MAAM,OAAO,GAAI,MAAM,MAAM,KAAG,MACT,CAAC;AAyB/B,eAAO,MAAM,cAAc;;;CAAmF,CAAC;AAE/G;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAUlF;AAgCD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAoB1E"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type JSONObject, type JSONValue } from '../json/value.ts';
|
|
2
|
+
export declare const PROPERTIES_OF: Readonly<Record<string, readonly string[]>>;
|
|
3
|
+
/**
|
|
4
|
+
* The given value as WWCP_POI reads it, of an object of the given kind (`PROPERTIES_OF`): without the properties it does
|
|
5
|
+
* not read, of the objects within it as well.
|
|
6
|
+
*/
|
|
7
|
+
export declare function asRead(value: JSONValue, kind: string): JSONValue;
|
|
8
|
+
/** Where a value is not written as the content holds it, e.g. "chargingPools[1].paymentOptions", and how it is held. */
|
|
9
|
+
export interface NotWritten {
|
|
10
|
+
readonly path: string;
|
|
11
|
+
readonly reason: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Where the given value of the given property, at the given path, is not written as the content holds it; undefined where
|
|
15
|
+
* it is. A new value names each element of an ordered list once, and leaves out the lastChange the change set gives it; a
|
|
16
|
+
* version leaves an element given twice to what refuses it in the words of WWCP_POI.
|
|
17
|
+
*/
|
|
18
|
+
export declare function notWritten(value: JSONValue, property: string | undefined, path: string, of: 'version' | 'new value'): NotWritten | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* The error, as WWCP_POI3 words it since 3de830a, when the given content of a version is not written as the content holds
|
|
21
|
+
* it, its own JSON-LD context aside; undefined where it is.
|
|
22
|
+
*/
|
|
23
|
+
export declare function notWrittenAsHeld(content: JSONObject): string | undefined;
|
|
24
|
+
//# sourceMappingURL=writtenForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writtenForm.d.ts","sourceRoot":"","sources":["../../src/network/writtenForm.ts"],"names":[],"mappings":"AAkBA,OAAO,EAA6C,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAwQ9G,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAarE,CAAC;AAiIF;;;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,CAoI5I;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CA2CxE"}
|
|
@@ -22,7 +22,12 @@ export declare class KeyStatement {
|
|
|
22
22
|
readonly signatures: readonly KeyStatementSignature[];
|
|
23
23
|
readonly json: JSONObject;
|
|
24
24
|
private constructor();
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Reads a key statement as `RoamingNetworkKeyStatement.TryParse` of WWCP_POI3 reads it, in its words and order: its
|
|
27
|
+
* context, the roaming network and its operator, its identity keys, `signedAt` and `validUntil` as POI writes them,
|
|
28
|
+
* `minConsensus`, its signatures. Then what this library refuses besides, as whatever is not signed is not taken: a
|
|
29
|
+
* property it does not know, identity keys out of the order of their `@id`s, a `validUntil` before its `signedAt`.
|
|
30
|
+
*/
|
|
26
31
|
static parse(value: JSONValue | undefined): KeyStatement;
|
|
27
32
|
/** The statement as it is signed: without `signatures`, with its `@context`, keys embedded without theirs. */
|
|
28
33
|
content(): JSONObject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyStatement.d.ts","sourceRoot":"","sources":["../../src/proofs/keyStatement.ts"],"names":[],"mappings":"AAmBA,OAAO,
|
|
1
|
+
{"version":3,"file":"keyStatement.d.ts","sourceRoot":"","sources":["../../src/proofs/keyStatement.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAmC,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEpG,OAAO,EAAE,YAAY,EAAE,MAAe,YAAY,CAAC;AAKnD,eAAO,MAAM,qBAAqB,QAAoD,CAAC;AAGvF,6DAA6D;AAC7D,MAAM,WAAW,qBAAqB;IAClC,QAAQ,CAAC,SAAS,EAAG,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAO,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAO,MAAM,CAAC;CAC/B;AAGD;;;;GAIG;AACH,qBAAa,YAAY;aAGD,gBAAgB,EAAW,MAAM;aACjC,wBAAwB,EAAG,MAAM;aACjC,YAAY,EAAe,SAAS,YAAY,EAAE;aAClD,YAAY,EAAe,MAAM;aACjC,QAAQ,EAAmB,MAAM;aACjC,UAAU,EAAiB,MAAM;aACjC,UAAU,EAAiB,SAAS,qBAAqB,EAAE;aAC3D,IAAI,EAAuB,UAAU;IARzD,OAAO;IAYP;;;;;OAKG;WACW,KAAK,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,YAAY;IAmE/D,8GAA8G;IACvG,OAAO,IAAI,UAAU;IAY5B,0GAA0G;IACnG,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU;IAIjE,0DAA0D;IACnD,eAAe,CAAC,SAAS,EAAE,qBAAqB,EAAE,WAAW,EAAE,YAAY,GAAG,IAAI;IASzF,wFAAwF;IACjF,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAKvC,mHAAmH;IACnH,IAAW,OAAO,IAAI,MAAM,EAAE,EAAE,CAS/B;IAGD;;;OAGG;IACI,MAAM,CAAC,qBAAqB,EAAE,QAAQ,CAAC,MAAM,CAAC,EACvC,iBAAiB,GAAM,SAAS,YAAY,EAAO,EACnD,OAAO,GAAgB;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,GAAG,CAAC,MAAM,CAAC;IAM9F;;;;;;;;;;;OAWG;IACI,aAAa,CAAC,cAAc,EAAM,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,EAClD,iBAAiB,GAAG,SAAS,YAAY,EAAO,EAChD,OAAO,GAAa;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG;QAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;QAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE;CAkFlJ"}
|
|
@@ -15,6 +15,11 @@ export declare class SigningKeyCertificate {
|
|
|
15
15
|
readonly value: string;
|
|
16
16
|
readonly json: JSONObject;
|
|
17
17
|
private constructor();
|
|
18
|
+
/**
|
|
19
|
+
* Reads a certificate as `RoamingNetworkSigningKeyCertificate.TryParse` of WWCP_POI3 reads it, in its words and order:
|
|
20
|
+
* its context, the roaming network operator, the signing key it certifies, `signedAt` as POI writes it, the algorithm,
|
|
21
|
+
* key identification and value of its signature; then a property it does not know, which is not signed.
|
|
22
|
+
*/
|
|
18
23
|
static parse(value: JSONValue | undefined): SigningKeyCertificate;
|
|
19
24
|
/** The signature input: the certificate without `value`, with its `@context`, its signing key embedded without its. */
|
|
20
25
|
signingBytes(): Uint8Array;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signingKeyCertificate.d.ts","sourceRoot":"","sources":["../../src/proofs/signingKeyCertificate.ts"],"names":[],"mappings":"AAmBA,OAAO,
|
|
1
|
+
{"version":3,"file":"signingKeyCertificate.d.ts","sourceRoot":"","sources":["../../src/proofs/signingKeyCertificate.ts"],"names":[],"mappings":"AAmBA,OAAO,EAA0B,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE3F,OAAO,EAAE,YAAY,EAAE,MAAe,YAAY,CAAC;AAKnD,eAAO,MAAM,+BAA+B,QAA6D,CAAC;AAO1G;;;;GAIG;AACH,qBAAa,qBAAqB;aAGV,wBAAwB,EAAG,MAAM;aACjC,UAAU,EAAiB,YAAY;aACvC,QAAQ,EAAmB,MAAM;aACjC,SAAS,EAAkB,MAAM;aACjC,KAAK,EAAsB,MAAM;aACjC,KAAK,EAAsB,MAAM;aACjC,IAAI,EAAuB,UAAU;IAPzD,OAAO;IAWP;;;;OAIG;WACW,KAAK,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,qBAAqB;IAsCxE,uHAAuH;IAChH,YAAY,IAAI,UAAU;IAYjC;;;OAGG;IACI,MAAM,CAAC,YAAY,EAAE,SAAS,YAAY,EAAE,EAAE,qBAAqB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,YAAY;CA2BlH"}
|
|
@@ -5,6 +5,7 @@ import { type ETag } from '../etags.ts';
|
|
|
5
5
|
import type { RoamingNetwork } from '../network/roamingNetwork.ts';
|
|
6
6
|
import { KeyStatement } from './keyStatement.ts';
|
|
7
7
|
import { Attestation } from './attestation.ts';
|
|
8
|
+
import { TrustContext } from './trustContext.ts';
|
|
8
9
|
import type { TrustAnchor } from './trustAnchor.ts';
|
|
9
10
|
import type { Checkpoint, CheckpointProof } from '../history/checkpoint.ts';
|
|
10
11
|
export declare const PROOF_CONTEXT: string;
|
|
@@ -63,7 +64,7 @@ export declare class ChargingStationProof {
|
|
|
63
64
|
*
|
|
64
65
|
* Attestations of a subject (8.5) attest one entity, not the root: they do not count here.
|
|
65
66
|
*/
|
|
66
|
-
verify(
|
|
67
|
+
verify(basis: TrustAnchor | TrustContext, at?: number | Date | string): VerifiedProof;
|
|
67
68
|
/**
|
|
68
69
|
* Verifies a checkpoint against a trust anchor with this proof of the version of its commit (10.5), as
|
|
69
70
|
* `Verify(Checkpoint, TrustAnchor)` of the C# implementation, e.g. with the proof of the root of the snapshot of the
|
|
@@ -73,7 +74,7 @@ export declare class ChargingStationProof {
|
|
|
73
74
|
* signed and at `at`, and allowed to sign for the party, as attestations are verified. Signatures that do not count are
|
|
74
75
|
* ignored, not refused; the other signatures, e.g. of witnesses, are not checked here. Returns the holders that signed.
|
|
75
76
|
*/
|
|
76
|
-
verifyCheckpoint(checkpoint: Checkpoint,
|
|
77
|
+
verifyCheckpoint(checkpoint: Checkpoint, basis: TrustAnchor | TrustContext, at?: number | Date | string): string[];
|
|
77
78
|
/**
|
|
78
79
|
* The signing keys of the roaming network operator the proof gives, as a verifier trusting the trust anchor finds them
|
|
79
80
|
* (4.1, 8.5, 8.6), as `TryGetCertifiedSigningKeys` of the C# implementation: the key statement of the operator is signed
|
|
@@ -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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C"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { POIPublicKey } from '../keys.ts';
|
|
2
|
+
import type { KeyStatement } from './keyStatement.ts';
|
|
3
|
+
import { TrustAnchor } from './trustAnchor.ts';
|
|
4
|
+
export interface TrustEvaluationOptions {
|
|
5
|
+
readonly trustedIdentityKeyIds: Iterable<string>;
|
|
6
|
+
readonly otherIdentityKeys?: readonly POIPublicKey[];
|
|
7
|
+
readonly at?: number | Date | string;
|
|
8
|
+
}
|
|
9
|
+
/** Diagnostics keep mathematical validity, local authorization and distinct-holder consensus separate. */
|
|
10
|
+
export interface TrustEvaluation {
|
|
11
|
+
readonly signatures: 'valid' | 'invalid';
|
|
12
|
+
readonly signers: 'valid' | 'invalid';
|
|
13
|
+
readonly quorum: 'valid' | 'invalid';
|
|
14
|
+
readonly validity: 'valid' | 'invalid';
|
|
15
|
+
readonly trustedHolderCount: number;
|
|
16
|
+
readonly requiredConsensus: number;
|
|
17
|
+
readonly signatureCount: number;
|
|
18
|
+
/** Import and optional manual authorization are allowed even without a trusted quorum. */
|
|
19
|
+
readonly canTrustKeys: boolean;
|
|
20
|
+
readonly verificationError?: string;
|
|
21
|
+
readonly context?: TrustContext;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A locally authorized bootstrap policy and a verified statement, evaluated at one time. The application supplies
|
|
25
|
+
* trusted key IDs, from its bundled roots and explicit user decisions after applying local exclusions. The library
|
|
26
|
+
* intersects them with the original holder groups and verifies every signature, holder consistency, time and quorum.
|
|
27
|
+
* Importing an anchor is not authorization. This object is not a revocation service: recreate it from current local
|
|
28
|
+
* decisions for each operation. It is not persisted, and cannot be constructed from a serialized green flag.
|
|
29
|
+
*/
|
|
30
|
+
export declare class TrustContext {
|
|
31
|
+
readonly evaluatedAt: number;
|
|
32
|
+
readonly anchor: TrustAnchor;
|
|
33
|
+
readonly authorizedAnchor: TrustAnchor;
|
|
34
|
+
readonly trustedHolders: readonly (readonly string[])[];
|
|
35
|
+
readonly roamingNetworkId: string;
|
|
36
|
+
readonly roamingNetworkOperatorId: string;
|
|
37
|
+
readonly keyStatementDigest: string;
|
|
38
|
+
readonly requiredConsensus: number;
|
|
39
|
+
readonly validUntil: number;
|
|
40
|
+
private constructor();
|
|
41
|
+
static create(anchor: TrustAnchor, statement: KeyStatement, options: TrustEvaluationOptions): TrustContext;
|
|
42
|
+
static evaluate(anchor: TrustAnchor, statement: KeyStatement, options: TrustEvaluationOptions): TrustEvaluation;
|
|
43
|
+
/** The context represents exactly one evaluation time; a different time requires fresh local decisions. */
|
|
44
|
+
evaluationTime(at?: number | Date | string): number;
|
|
45
|
+
/** Rechecks supplied signatures and binds their signed content to the verified statement. */
|
|
46
|
+
verifyStatement(statement: KeyStatement, otherIdentityKeys?: readonly POIPublicKey[], at?: number | Date | string): ReturnType<KeyStatement['verifyHolders']>;
|
|
47
|
+
}
|
|
48
|
+
/** The trust anchor a verifier checks against: of a context the one naming only the identity keys authorized locally. */
|
|
49
|
+
export declare function anchorOf(basis: TrustAnchor | TrustContext): TrustAnchor;
|
|
50
|
+
//# sourceMappingURL=trustContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trustContext.d.ts","sourceRoot":"","sources":["../../src/proofs/trustContext.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAU,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAU,mBAAmB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAgB,kBAAkB,CAAC;AAGzD,MAAM,WAAW,sBAAsB;IACnC,QAAQ,CAAC,qBAAqB,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACjD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;IACrD,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC;CACxC;AAED,0GAA0G;AAC1G,MA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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"}
|
|
@@ -3,6 +3,7 @@ import type { ETag } from '../etags.ts';
|
|
|
3
3
|
import { POIPublicKey } from '../keys.ts';
|
|
4
4
|
import { ChargingStationProof } from '../proofs/stationProof.ts';
|
|
5
5
|
import { PriceStatement } from '../proofs/priceStatement.ts';
|
|
6
|
+
import { TrustContext } from '../proofs/trustContext.ts';
|
|
6
7
|
import type { TrustAnchor } from '../proofs/trustAnchor.ts';
|
|
7
8
|
/** A charging station as a verified proof gives it: everything here is attested by the roaming network operator. */
|
|
8
9
|
export interface VerifiedChargingStation {
|
|
@@ -108,7 +109,7 @@ export interface NamedTransparencySoftware {
|
|
|
108
109
|
* tariffs they take, and the signing keys of the operator. With `chargingStationId` or `evseId`, the proof must give that
|
|
109
110
|
* station, or the station of that EVSE.
|
|
110
111
|
*/
|
|
111
|
-
export declare function verifyChargingStation(anchor: TrustAnchor, proof: JSONValue | ChargingStationProof, options?: {
|
|
112
|
+
export declare function verifyChargingStation(anchor: TrustAnchor | TrustContext, proof: JSONValue | ChargingStationProof, options?: {
|
|
112
113
|
at?: number | Date | string;
|
|
113
114
|
chargingStationId?: string;
|
|
114
115
|
evseId?: string;
|
|
@@ -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,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C,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAAA;CAAO,GAAG,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CA6EnH"}
|
package/dist/verifier/trust.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { type KeyUsage, type POIPublicKey } from '../keys.ts';
|
|
|
3
3
|
import { type RoleSignature } from '../history/commit.ts';
|
|
4
4
|
import { RoamingNetworkOperator, type RoamingNetwork } from '../network/roamingNetwork.ts';
|
|
5
5
|
import type { KeyStatement } from '../proofs/keyStatement.ts';
|
|
6
|
+
import { TrustContext } from '../proofs/trustContext.ts';
|
|
6
7
|
import type { TrustAnchor } from '../proofs/trustAnchor.ts';
|
|
7
8
|
/**
|
|
8
9
|
* The trust a verifier has in the roaming network operator of a version, from a trust anchor it pinned (SPECIFICATION.md
|
|
@@ -29,12 +30,12 @@ export declare class OperatorTrust {
|
|
|
29
30
|
* Verifies the key statement of the operator of the given version against the trust anchor (A1 step e) and returns the
|
|
30
31
|
* trust in its keys. `at` is when the statement must be valid, now by default.
|
|
31
32
|
*/
|
|
32
|
-
static of(
|
|
33
|
+
static of(basis: TrustAnchor | TrustContext, network: RoamingNetwork, at?: number | Date | string): OperatorTrust;
|
|
33
34
|
/**
|
|
34
35
|
* The same from the roaming network operator alone, e.g. as a proof of a charging station gives it (8.4): its key
|
|
35
36
|
* statement verified against the trust anchor at `at`.
|
|
36
37
|
*/
|
|
37
|
-
static fromOperatorJSON(
|
|
38
|
+
static fromOperatorJSON(basis: TrustAnchor | TrustContext, operatorJSON: JSONValue | undefined, at?: number | Date | string): OperatorTrust;
|
|
38
39
|
/**
|
|
39
40
|
* The trust in the operator of a later version of a history this trust follows (8.6, *Succession*): its key statement
|
|
40
41
|
* signed by identity keys trusted here, of as many holders as required, e.g. after the operator stated new keys signed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trust.d.ts","sourceRoot":"","sources":["../../src/verifier/trust.ts"],"names":[],"mappings":"AAkBA,OAAO,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AE,EACpC,MAAM,EAAM,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,EAAE,YAAY,KAAK,IAAI,EACjE,IAAI,EAAQ,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IAyBhE;;;OAGG;IACI,YAAY,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,EAAE;IAatD,4DAA4D;IAC5D,IAAW,YAAY,IAAI,MAAM,GAAG,SAAS,CAE5C;CAEJ"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { JSONValue } from '../json/value.ts';
|
|
2
2
|
import { Commit } from '../history/commit.ts';
|
|
3
3
|
import { RoamingNetwork } from '../network/roamingNetwork.ts';
|
|
4
|
+
import { type TrustContext } from '../proofs/trustContext.ts';
|
|
4
5
|
import type { TrustAnchor } from '../proofs/trustAnchor.ts';
|
|
5
6
|
import { OperatorTrust } from './trust.ts';
|
|
6
7
|
/** A version of a roaming network checked from a trust anchor, as example A1 checks `QA`. */
|
|
@@ -26,7 +27,7 @@ export interface VerifiedVersion {
|
|
|
26
27
|
* trusted identity key of its holder, valid when it signed, and one that may sign for the party;
|
|
27
28
|
* g) the texts to show are those of the checked version; a trust anchor naming the network otherwise is warned of.
|
|
28
29
|
*/
|
|
29
|
-
export declare function verifyVersion(
|
|
30
|
+
export declare function verifyVersion(basis: TrustAnchor | TrustContext, networkJSON: JSONValue, commitJSON: JSONValue, at?: number | Date | string): VerifiedVersion;
|
|
30
31
|
/** A line telling what was checked, as example A1 prints it. */
|
|
31
32
|
export declare function describeVersion(version: VerifiedVersion): string;
|
|
32
33
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/verifier/version.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAoB,kBAAkB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAA4B,sBAAsB,CAAC;AACpE,OAAO,EAAE,c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C;CACzC;AAGD;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAQ,WAAW,GAAG,YAAY,EACvC,WAAW,EAAE,SAAS,EACtB,UAAU,EAAG,SAAS,EACtB,EAAE,CAAC,EAAU,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,eAAe,CA+BlF;AAGD,gEAAgE;AAChE,wBAAgB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAGhE"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-charging-cloud/wwcp-poi",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Verifies WWCP
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Verifies WWCP/POI data in TypeScript: trust anchors, key statements, roaming networks and their ETags, commits, checkpoints, charging station proofs and price statements - so that an EV driver's app knows the charging station and its tariffs it shows are the ones the roaming network signed and published.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wwcp",
|
|
7
7
|
"poi",
|