@open-charging-cloud/chargy-core 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.
@@ -0,0 +1,2354 @@
1
+ import * as moment from 'moment';
2
+ import { Moment } from 'moment';
3
+ import Decimal from 'decimal.js';
4
+ import { ec } from 'elliptic';
5
+
6
+ type JSONLDObject = {
7
+ "@context": number;
8
+ };
9
+ declare function isJSONLDObject(value: unknown): value is JSONLDObject;
10
+ declare function toArrayBuffer(data: ArrayBuffer | Uint8Array): ArrayBuffer;
11
+ declare function toUint8Array(data: ArrayBuffer | Uint8Array): Uint8Array;
12
+ declare function normalizeXMLText(xmlText: string | undefined): string;
13
+ declare function getDirectChildrenByLocalName(parent: Document | Element, localName: string): Element[];
14
+ declare function getDirectChildByLocalName(parent: Document | Element, localName: string): Element | undefined;
15
+ declare function getTrimmedTextContent(element?: Element): string | undefined;
16
+ declare function parseDescription(parent: Element): IMultilanguageText | undefined;
17
+ declare function getElementsByLocalName(parent: Document | Element, localName: string): Element[];
18
+ declare function ParseJSON_LD(Text: string, _Context?: string): Record<string, unknown>;
19
+ declare function firstKey<T extends Record<string, unknown>>(obj: T): keyof T | undefined;
20
+ declare function firstValue<T>(obj: Record<string, T> | undefined): T | undefined;
21
+ declare function setUILocale(locale: string): void;
22
+ declare function parseUTC(UTCTime: string | number): Moment;
23
+ declare function time2human(Time: string | number): string;
24
+ declare function UTC2human(UTCTime: string | number): string;
25
+ declare function parseOBIS(OBIS: string): string;
26
+ declare const OBIS_RegExpr: RegExp;
27
+ declare function OBIS2Hex(OBIS: string): string;
28
+ declare function OBIS2MeasurementName(OBISString: string): string;
29
+ declare function measurementName2human(In: string): string;
30
+ declare function IsNullOrEmpty(value: string | undefined): boolean;
31
+ declare function WhenNullOrEmpty(value: string | undefined, replacement: string): string;
32
+ declare function hex2bin(hex: string, Reverse?: boolean): string;
33
+ declare function hex32(val: number): string;
34
+ declare function parseHexString(str: string): number[];
35
+ declare function createHexString(arr: Iterable<number>): string;
36
+ declare function buf2hex(buffer: ArrayBuffer | Uint8Array): string;
37
+ declare function hexToArrayBuffer(hex: string): ArrayBuffer;
38
+ declare function hashFile(url: string): Promise<ArrayBuffer>;
39
+ declare function ConcatenateBuffers(buffers: ArrayBuffer[]): ArrayBuffer;
40
+ declare function intFromBytes(x: number[]): number;
41
+ declare function getInt8Bytes(x: number): number[];
42
+ declare function getInt16Bytes(x: number): number[];
43
+ declare function getInt32Bytes(x: number): number[];
44
+ declare function getInt64Bytes(x: number): number[];
45
+ declare function SetHex(dv: DataView, hex: string, offset: number, reverse?: boolean): string;
46
+ declare function SetTimestamp(dv: DataView, timestamp: string | Moment | undefined, offset: number, addLocalOffset?: boolean): string;
47
+ declare function SetTimestamp32(dv: DataView, timestamp: string | Moment | undefined, offset: number, addLocalOffset?: boolean): string;
48
+ declare function SetInt8(dv: DataView, value: number, offset: number): string;
49
+ declare function SetUInt32(dv: DataView, value: number, offset: number, reverse?: boolean): string;
50
+ declare function SetUInt64(dv: DataView, value: number, offset: number, reverse?: boolean): string;
51
+ declare function SetUInt64D(dv: DataView, value: Decimal, offset: number, reverse?: boolean): string;
52
+ declare function SetText(dv: DataView, text: string, offset: number): string;
53
+ declare function SetUInt32_withCode(dv: DataView, value: number, scale: number, obis: number, offset: number, reverse?: boolean): string;
54
+ declare function SetText_withLength(dv: DataView, text: string, offset: number): string;
55
+ declare function Clone<T>(obj: T): T;
56
+ declare function openFullscreen(): void;
57
+ declare function closeFullscreen(): void;
58
+ declare function CreateDiv(ParentDiv: HTMLDivElement, ClassName?: string, InnerHTML?: string): HTMLDivElement;
59
+ declare function CreateDiv2(ParentDiv: HTMLDivElement, ChildClassName: string, ChildAInnerHTML: string, ChildBInnerHTML: string): HTMLDivElement;
60
+ interface String {
61
+ isNullOrEmpty(): boolean;
62
+ isNotNullOrEmpty(): boolean;
63
+ }
64
+ declare function pad(text: string | undefined, paddingValue: number): string;
65
+ /**
66
+ * Calculate the SHA256 hash
67
+ * @param message a text of data view
68
+ * @returns true, when the given text exists and is a valid string
69
+ */
70
+ declare function sha256(message: string | DataView): Promise<string>;
71
+ /**
72
+ * Calculate the SHA384 hash
73
+ * @param message a text of data view
74
+ * @returns true, when the given text exists and is a valid string
75
+ */
76
+ declare function sha384(message: string | DataView): Promise<string>;
77
+ /**
78
+ * Calculate the SHA512 hash
79
+ * @param message a text of data view
80
+ * @returns true, when the given text exists and is a valid string
81
+ */
82
+ declare function sha512(message: string | DataView): Promise<string>;
83
+ /**
84
+ * A JSON object after runtime validation. Property values stay `unknown`
85
+ * and have to be narrowed individually (e.g. via isMandatoryString).
86
+ */
87
+ type JSONObject = Record<string, unknown>;
88
+ /**
89
+ * Returns the given value as a json object, or undefined when it is not a json object.
90
+ */
91
+ declare function asJSONObject(value: unknown): JSONObject | undefined;
92
+ /**
93
+ * Returns the given value as a json array, or undefined when it is not a json array.
94
+ */
95
+ declare function asJSONArray(value: unknown): unknown[] | undefined;
96
+ /**
97
+ * Returns the given value as a string, or undefined when it is not a string.
98
+ */
99
+ declare function asString(value: unknown): string | undefined;
100
+ /**
101
+ * Returns the given value as a number, or undefined when it is not a number.
102
+ */
103
+ declare function asNumber(value: unknown): number | undefined;
104
+ /**
105
+ * Ensures, that the given json object exists and is a valid json object
106
+ * @param value a json object
107
+ * @returns true, when the given json object exists and is a valid json object
108
+ */
109
+ declare function isMandatoryJSONObject(value: unknown): value is JSONObject;
110
+ /**
111
+ * Checks, whether the given json object exists and if yes wether it is a valid json object
112
+ * @param jsonObject a json object
113
+ * @returns true, when the given json object does not exist or when it exists, that it is a valid json object
114
+ */
115
+ declare function isOptionalJSONObject(value: unknown): value is JSONObject | undefined | null;
116
+ /**
117
+ * Ensures, that the given json array exists and is a valid json array
118
+ * @param value a json array
119
+ * @returns true, when the given json array exists and is a valid json array
120
+ */
121
+ declare function isMandatoryJSONArray(value: unknown): value is unknown[];
122
+ /**
123
+ * Ensures, that the given json array of strings exists and is a valid json array of strings
124
+ * @param value a json array of strings
125
+ * @returns true, when the given json array exists of strings and is a valid json array of strings
126
+ */
127
+ declare function isMandatoryArrayOfStrings(value: unknown): value is string[];
128
+ /**
129
+ * Checks, whether the given json array exists and if yes wether it is a valid json array
130
+ * @param value a json array
131
+ * @returns true, when the given json array does not exist or when it exists and is a valid json array
132
+ */
133
+ declare function isOptionalJSONArray(value: unknown): value is unknown[] | undefined | null;
134
+ /**
135
+ * Checks, whether the given json array of strings exists and if yes wether it is a valid json array of strings
136
+ * @param value a json array of strings
137
+ * @returns true, when the given json array of strings does not exist or when it exists and is a valid json array of strings
138
+ */
139
+ declare function isOptionalArrayOfStrings(value: unknown): value is string[] | undefined | null;
140
+ /**
141
+ * Checks, whether the given json array exists and if yes wether it is a valid json object
142
+ * @param jsonArray a json object
143
+ * @returns true, when the given json array does not exist or when it exists, that it is a valid json array
144
+ */
145
+ declare function isOptionalJSONArrayError(jsonArray: unknown): boolean;
146
+ /**
147
+ * Checks, whether the given json array exists and if yes wether it is a valid json object
148
+ * @param jsonArray a json object
149
+ * @returns true, when the given json array does not exist or when it exists, that it is a valid json array
150
+ */
151
+ declare function isOptionalJSONArrayOk(jsonArray: unknown): boolean;
152
+ /**
153
+ * Ensures, that the given boolean exists and is a valid boolean
154
+ * @param value a boolean
155
+ * @returns true, when the given boolean exists and is a valid boolean
156
+ */
157
+ declare function isMandatoryBoolean(value: unknown): value is boolean;
158
+ /**
159
+ * Ensures, that the given text exists and is a valid string
160
+ * @param value a string
161
+ * @returns true, when the given text exists and is a valid string
162
+ */
163
+ declare function isMandatoryString(value: unknown): value is string;
164
+ /**
165
+ * Ensures, that the given text is a valid string, if it exists
166
+ * @param value a string
167
+ * @returns true, when the given text is a valid string, if it exists
168
+ */
169
+ declare function isOptionalString(value: unknown): value is string | undefined | null;
170
+ /**
171
+ * Ensures, that the given text exists and is a valid URL
172
+ * @param value an URL
173
+ * @returns true, when the given text exists and is a valid URL
174
+ */
175
+ declare function isMandatoryURL(value: unknown): value is string;
176
+ /**
177
+ * Ensures, that the given text is a valid URL, if it exists
178
+ * @param value an URL
179
+ * @returns true, when the given text is a valid URL, if it exists
180
+ */
181
+ declare function isOptionalURL(value: unknown): value is string | undefined | null;
182
+ /**
183
+ * Ensures, that the given number exists and is a valid number
184
+ * @param value a number
185
+ * @returns true, when the given number exists and is a valid number
186
+ */
187
+ declare function isMandatoryNumber(value: unknown): value is number;
188
+ /**
189
+ * Ensures, that the given number is a valid number, if it exists
190
+ * @param value a number
191
+ * @returns true, when the given number is a valid number, if it exists
192
+ */
193
+ declare function isOptionalNumber(value: unknown): value is number | undefined | null;
194
+ /**
195
+ * Ensures, that the given decimal number exists and is a valid decimal number
196
+ * @param value a decimal number
197
+ * @returns true, when the given decimal number exists and is a valid decimal number
198
+ */
199
+ declare function isMandatoryDecimal(value: unknown): value is Decimal;
200
+ /**
201
+ * Ensures, that the given decimal number is a valid decimal number, if it exists
202
+ * @param value a decimal number
203
+ * @returns true, when the given decimal number is a valid decimal number, if it exists
204
+ */
205
+ declare function isOptionalDecimal(value: unknown): value is Decimal | undefined | null;
206
+ declare function parseNumber(value: string): number | null;
207
+ declare function InformationRelevanceToString(InfoRelevance: InformationRelevance): string;
208
+ declare function jsonPrettyPrinter(value: unknown, KeyLookup?: (path: string, key: string) => string): string;
209
+
210
+ declare function isObject(data: unknown): data is Record<string, unknown>;
211
+ declare function isMultilanguageText(data: unknown): data is IMultilanguageText;
212
+ declare function isGeoLocation(data: unknown): data is IGeoLocation;
213
+ interface GetChargingPoolFunc {
214
+ (Id: string): IChargingPool | null;
215
+ }
216
+ interface GetChargingStationFunc {
217
+ (Id: string): IChargingStation | null;
218
+ }
219
+ interface GetEVSEFunc {
220
+ (Id: string): IEVSE | null;
221
+ }
222
+ interface GetMeterFunc {
223
+ (Id: string): IMeter | null;
224
+ }
225
+ interface CheckMeterPublicKeySignatureFunc {
226
+ (chargingStation: IChargingStation | null | undefined, evse: IEVSE | null | undefined, meter: IMeter | null | undefined, publicKey: IPublicKey | null | undefined, signature: unknown): Promise<string>;
227
+ }
228
+ interface IContract {
229
+ "@id": string;
230
+ "@context"?: string;
231
+ description?: IMultilanguageText;
232
+ type?: string;
233
+ username?: string;
234
+ email?: string;
235
+ }
236
+ declare function isString(value: unknown): value is string;
237
+ declare function isStringArray(value: unknown): value is string[];
238
+ declare function isStringOrStringArray(value: unknown): value is string | string[];
239
+ interface IOIDInfo {
240
+ oid: string;
241
+ name: string;
242
+ }
243
+ declare function isOIDInfo(data: unknown): data is IOIDInfo;
244
+ declare function isStringOrOIDInfo(value: unknown): value is string | IOIDInfo;
245
+ interface IKeyInfo {
246
+ keyId: string;
247
+ keyType: string;
248
+ curve: string;
249
+ value: string;
250
+ }
251
+ interface IChargingStationOperator {
252
+ "@id": string;
253
+ "@context"?: string;
254
+ subCSOIds?: Array<string>;
255
+ description?: IMultilanguageText;
256
+ contact: IContact;
257
+ support: ISupport;
258
+ privacy: IPrivacy;
259
+ geoLocation?: IGeoLocation;
260
+ chargingPools?: Array<IChargingPool>;
261
+ chargingStations?: Array<IChargingStation>;
262
+ EVSEs?: Array<IEVSE>;
263
+ publicKeys?: Array<IPublicKey>;
264
+ chargingTariffs?: Array<IChargingTariff>;
265
+ parkingTariffs?: Array<IParkingTariff>;
266
+ }
267
+ interface IContact {
268
+ email: string;
269
+ web: string;
270
+ logoUrl?: string;
271
+ address?: IAddress;
272
+ publicKeys?: Array<IPublicKey>;
273
+ }
274
+ interface ISupport {
275
+ hotline: string;
276
+ email: string;
277
+ web?: string;
278
+ mediationServices?: Array<string>;
279
+ publicKeys?: Array<IPublicKey>;
280
+ }
281
+ interface IPrivacy {
282
+ contact: string;
283
+ email: string;
284
+ web: string;
285
+ publicKeys?: Array<IPublicKey>;
286
+ }
287
+ interface IPublicKey {
288
+ algorithm: string;
289
+ format: string;
290
+ encoding: IEncoding | string;
291
+ value?: string;
292
+ previousValue?: string;
293
+ signatures?: Array<unknown>;
294
+ }
295
+ declare function isIPublicKeyXY(obj: unknown): obj is IPublicKeyXY;
296
+ interface IPublicKeyXY extends IPublicKey {
297
+ x: string;
298
+ y: string;
299
+ }
300
+ interface ISignature {
301
+ algorithm?: CryptoAlgorithms | string;
302
+ format?: SignatureFormats | string;
303
+ previousValue?: string;
304
+ value?: string;
305
+ }
306
+ interface ISignatureRS extends ISignature {
307
+ r?: string;
308
+ s?: string;
309
+ }
310
+ interface IChargingPool {
311
+ "@id": string;
312
+ "@context"?: string;
313
+ description?: IMultilanguageText;
314
+ address?: IAddress;
315
+ geoLocation?: IGeoLocation;
316
+ chargingStationOperator?: IChargingStationOperator;
317
+ chargingStations?: Array<IChargingStation>;
318
+ chargingTariffs?: Array<IChargingTariff>;
319
+ publicKeys?: Array<IPublicKey>;
320
+ }
321
+ interface IChargingStation {
322
+ "@id": string;
323
+ "@context"?: string;
324
+ description?: IMultilanguageText;
325
+ manufacturer?: string;
326
+ manufacturerURL?: string;
327
+ model?: string;
328
+ modelURL?: string;
329
+ firmwareVersion?: string;
330
+ firmwareChecksum?: string;
331
+ hardwareVersion?: string;
332
+ serialNumber?: string;
333
+ legalCompliance?: ILegalCompliance;
334
+ address?: IAddress;
335
+ geoLocation?: IGeoLocation;
336
+ chargingStationOperator?: IChargingStationOperator;
337
+ chargingPoolId?: string;
338
+ chargingPool?: IChargingPool;
339
+ EVSEs: Array<IEVSE>;
340
+ EVSEIds?: Array<string>;
341
+ meters?: Array<IMeter>;
342
+ chargingTariffs?: Array<IChargingTariff>;
343
+ publicKeys?: Array<IPublicKey>;
344
+ }
345
+ interface IEVSE {
346
+ "@id": string;
347
+ "@context"?: string;
348
+ description?: IMultilanguageText;
349
+ chargingStation?: IChargingStation;
350
+ chargingStationId?: string;
351
+ meters: Array<IMeter>;
352
+ chargingTariffs?: Array<IChargingTariff>;
353
+ publicKeys?: Array<IPublicKey>;
354
+ connectors?: Array<IConnector$1>;
355
+ }
356
+ interface IMeter {
357
+ "@id": string;
358
+ "@context"?: string;
359
+ description?: IMultilanguageText;
360
+ manufacturer?: string;
361
+ manufacturerURL?: string;
362
+ model?: string;
363
+ modelURL?: string;
364
+ firmwareVersion?: string;
365
+ firmwareChecksum?: string;
366
+ hardwareVersion?: string;
367
+ legalCompliance?: ILegalCompliance;
368
+ chargingStation?: IChargingStation;
369
+ chargingStationId?: string;
370
+ EVSE?: IEVSE;
371
+ EVSEId?: string;
372
+ signatureInfos?: ISignatureInfos;
373
+ signatureFormat?: string;
374
+ publicKeys?: Array<IPublicKey>;
375
+ }
376
+ interface IConnector$1 {
377
+ type: string;
378
+ looses: number;
379
+ }
380
+ interface IConformity {
381
+ certificateId: string;
382
+ url?: string;
383
+ notBefore: string;
384
+ notAfter: string;
385
+ officialSoftware?: Array<ITransparencySoftware>;
386
+ compatibleSoftware?: Array<ITransparencySoftware>;
387
+ freeText: string;
388
+ }
389
+ interface ICalibration {
390
+ certificateId: string;
391
+ url?: string;
392
+ notBefore: string;
393
+ notAfter: string;
394
+ freeText: string;
395
+ }
396
+ interface ILegalCompliance {
397
+ conformity?: Array<IConformity>;
398
+ calibration?: Array<ICalibration>;
399
+ url?: string;
400
+ freeText: string;
401
+ }
402
+ interface IEMobilityProvider {
403
+ "@id": string;
404
+ "@context"?: string;
405
+ description: IMultilanguageText;
406
+ chargingTariffs: Array<IChargingTariff>;
407
+ publicKeys?: Array<IPublicKey>;
408
+ }
409
+ interface ITaxes {
410
+ "@id": string;
411
+ "@context"?: string;
412
+ description?: IMultilanguageText;
413
+ percentage: number;
414
+ }
415
+ interface IMediationService {
416
+ "@id": string;
417
+ "@context"?: string;
418
+ description: IMultilanguageText;
419
+ publicKeys?: Array<IPublicKey>;
420
+ }
421
+ interface IChargingProduct {
422
+ "@id": string;
423
+ "@context"?: string;
424
+ }
425
+ interface IChargingCosts {
426
+ total: number;
427
+ currency: string;
428
+ reservation?: ICost;
429
+ energy?: ICost;
430
+ time?: ICost;
431
+ idle?: ICost;
432
+ flat?: IFlatCost;
433
+ }
434
+ interface ICost {
435
+ amount: number;
436
+ unit: string;
437
+ cost: number;
438
+ }
439
+ interface IFlatCost {
440
+ cost: number;
441
+ }
442
+ interface IParking {
443
+ "@id": string;
444
+ "@context"?: string;
445
+ begin: string;
446
+ end?: string;
447
+ overstay?: boolean;
448
+ }
449
+ interface ITransparencySoftware {
450
+ name: string;
451
+ version?: string;
452
+ manufacturer?: string;
453
+ downloadURLs?: Array<string>;
454
+ }
455
+ interface ITransparencyInfos {
456
+ chargingSessionURL?: string;
457
+ officialSoftware?: Array<ITransparencySoftware>;
458
+ compatibleSoftware?: Array<ITransparencySoftware>;
459
+ freeText?: string;
460
+ }
461
+ interface IAuthorization {
462
+ "@id": string;
463
+ "@context"?: string;
464
+ type?: string;
465
+ timestamp?: string;
466
+ chargingStationOperator?: string;
467
+ roamingNetwork?: string;
468
+ eMobilityProvider?: string;
469
+ }
470
+ interface ISignatureInfos {
471
+ hash: CryptoHashAlgorithms | string;
472
+ hashTruncation?: number;
473
+ algorithm: CryptoAlgorithms | string;
474
+ curve: IECCurves | string;
475
+ format: SignatureFormats | string;
476
+ encoding?: IEncoding | string;
477
+ }
478
+ declare enum IECCurves {
479
+ secp192r1 = "secp192r1",
480
+ secp224k1 = "secp224k1",
481
+ secp256k1 = "secp256k1",
482
+ secp256r1 = "secp256r1",
483
+ secp384r1 = "secp384r1",
484
+ secp512r1 = "secp512r1"
485
+ }
486
+ declare enum IEncoding {
487
+ hex = "hex",
488
+ base64 = "base64"
489
+ }
490
+ declare enum PublicKeyFormats {
491
+ DER = "DER",
492
+ XY = "XY"
493
+ }
494
+ declare enum SignatureFormats {
495
+ DER = "DER",
496
+ RS = "RS"
497
+ }
498
+ declare enum CryptoAlgorithms {
499
+ RSA = "RSA",
500
+ ECC = "ECC"
501
+ }
502
+ declare enum CryptoHashAlgorithms {
503
+ SHA256 = "SHA256",
504
+ SHA384 = "SHA384",
505
+ SHA512 = "SHA512"
506
+ }
507
+ declare enum DisplayPrefixes {
508
+ NULL = 0,
509
+ KILO = 1,
510
+ MEGA = 2,
511
+ GIGA = 3
512
+ }
513
+ interface ISessionCryptoResult extends JSONObject {
514
+ status: SessionVerificationResult;
515
+ message?: string;
516
+ exception?: unknown;
517
+ certainty: number;
518
+ warnings?: Array<string>;
519
+ errors?: Array<string>;
520
+ }
521
+ declare function isISessionCryptoResult1(obj: unknown): obj is ISessionCryptoResult;
522
+ declare function isISessionCryptoResult2(obj: unknown): obj is ISessionCryptoResult;
523
+ interface ICryptoResult {
524
+ status: VerificationResult;
525
+ errors?: Array<string>;
526
+ warnings?: Array<string>;
527
+ }
528
+ declare function isICryptoResult(obj: unknown): obj is ICryptoResult;
529
+ interface IAddress {
530
+ "@context"?: string;
531
+ city: string;
532
+ street?: string;
533
+ houseNumber?: string;
534
+ floorLevel?: string;
535
+ postalCode: string;
536
+ country: string;
537
+ comment?: string | IMultilanguageText;
538
+ }
539
+ interface IGeoLocation {
540
+ lat: number;
541
+ lng: number;
542
+ }
543
+ interface IChargingProductRelevance {
544
+ time?: InformationRelevance | string;
545
+ energy?: InformationRelevance | string;
546
+ parking?: InformationRelevance | string;
547
+ sessionFee?: InformationRelevance | string;
548
+ }
549
+ declare enum InformationRelevance {
550
+ Unknown = "Unknown",
551
+ Ignored = "Ignored",
552
+ Informative = "Informative",
553
+ Important = "Important"
554
+ }
555
+ declare enum SessionVerificationResult {
556
+ Unvalidated = "Unvalidated",
557
+ UnknownCTRFormat = "UnknownCTRFormat",
558
+ NoChargeTransparencyRecordsFound = "NoChargeTransparencyRecordsFound",
559
+ UnknownSessionFormat = "UnknownSessionFormat",
560
+ InvalidSessionFormat = "InvalidSessionFormat",
561
+ AtLeastTwoMeasurementsRequired = "AtLeastTwoMeasurementsRequired",
562
+ InconsistentTimestamps = "InconsistentTimestamps",
563
+ MissingStartValue = "MissingStartValue",
564
+ InvalidStartValue = "InvalidStartValue",
565
+ InvalidIntermediateValue = "InvalidIntermediateValue",
566
+ MissingStopValue = "MissingStopValue",
567
+ InvalidStopValue = "InvalidStopValue",
568
+ EnergyMeterNotFound = "EnergyMeterNotFound",
569
+ InvalidMeasurement = "InvalidMeasurement",
570
+ PublicKeyNotFound = "PublicKeyNotFound",
571
+ UnknownPublicKeyFormat = "UnknownPublicKeyFormat",
572
+ InvalidPublicKey = "InvalidPublicKey",
573
+ UnknownSignatureFormat = "UnknownSignatureFormat",
574
+ InvalidSignature = "InvalidSignature",
575
+ ValidSignature = "ValidSignature"
576
+ }
577
+ declare enum VerificationResult {
578
+ Unvalidated = "Unvalidated",
579
+ NoOperation = "NoOperation",
580
+ UnknownCTRFormat = "UnknownCTRFormat",
581
+ EnergyMeterNotFound = "EnergyMeterNotFound",
582
+ InvalidMeasurement = "InvalidMeasurement",
583
+ InvalidStartValue = "InvalidStartValue",
584
+ StartValue = "StartValue",
585
+ ValidStartValue = "ValidStartValue",
586
+ InvalidIntermediateValue = "InvalidIntermediateValue",
587
+ IntermediateValue = "IntermediateValue",
588
+ ValidIntermediateValue = "ValidIntermediateValue",
589
+ InvalidStopValue = "InvalidStopValue",
590
+ StopValue = "StopValue",
591
+ ValidStopValue = "ValidStopValue",
592
+ PublicKeyNotFound = "PublicKeyNotFound",
593
+ UnknownPublicKeyFormat = "UnknownPublicKeyFormat",
594
+ InvalidPublicKey = "InvalidPublicKey",
595
+ UnknownSignatureFormat = "UnknownSignatureFormat",
596
+ InvalidSignature = "InvalidSignature",
597
+ ValidSignature = "ValidSignature",
598
+ ValidationError = "ValidationError"
599
+ }
600
+ interface IVersions {
601
+ name: string;
602
+ description: IMultilanguageText;
603
+ versions: Array<IVersion>;
604
+ }
605
+ interface IVersion {
606
+ version: string;
607
+ releaseDate: string;
608
+ description: IMultilanguageText;
609
+ tags: Array<string>;
610
+ packages: Array<IVersionPackage>;
611
+ }
612
+ interface IVersionPackage {
613
+ name: string;
614
+ description: IMultilanguageText;
615
+ additionalInfo: unknown;
616
+ cryptoHashes: ICryptoHashes;
617
+ signatures: Array<IVersionSignature>;
618
+ downloadURLs: Record<string, string>;
619
+ }
620
+ interface ICryptoHashes {
621
+ sha256?: string;
622
+ sha512?: string;
623
+ }
624
+ interface IVersionSignature {
625
+ signer: string;
626
+ timestamp: string;
627
+ publicKey: string;
628
+ algorithm: string;
629
+ format: string;
630
+ signature: string;
631
+ }
632
+ interface IMultilanguageText {
633
+ [key: string]: string;
634
+ }
635
+ interface I18NDictionary {
636
+ [key: string]: IMultilanguageText;
637
+ }
638
+ interface IResult {
639
+ status: SessionVerificationResult;
640
+ message: string;
641
+ }
642
+ interface TarInfo {
643
+ data: ArrayBuffer | Uint8Array;
644
+ mode: number;
645
+ mtime: string;
646
+ path: string;
647
+ type: string;
648
+ }
649
+ declare function isIFileInfo(obj: unknown): obj is IFileInfo;
650
+ interface IFileInfo {
651
+ name: string;
652
+ path?: string;
653
+ type?: string;
654
+ data?: ArrayBuffer | Uint8Array;
655
+ info?: string;
656
+ error?: string;
657
+ exception?: unknown;
658
+ }
659
+ interface IChargingPeriod {
660
+ startTimestamp: string;
661
+ stopTimestamp?: string;
662
+ endTimestamp?: string;
663
+ chargingTariffId: string;
664
+ activeChargingTariffElement?: IChargingTariffElement;
665
+ costs: IChargingCosts;
666
+ }
667
+ declare enum DayOfWeek {
668
+ Sunday = 0,
669
+ Monday = 1,
670
+ Tuesday = 2,
671
+ Wednesday = 3,
672
+ Thursday = 4,
673
+ Friday = 5,
674
+ Saturday = 6
675
+ }
676
+ interface ITariffRestriction {
677
+ start_time: string;
678
+ end_time: string;
679
+ start_date: string;
680
+ end_date: string;
681
+ min_kwh: Decimal;
682
+ max_kwh: Decimal;
683
+ min_power: Decimal;
684
+ max_power: Decimal;
685
+ min_duration: number;
686
+ max_duration: number;
687
+ day_of_week: Array<DayOfWeek>;
688
+ }
689
+ interface IPriceComponent {
690
+ type: string;
691
+ price: Decimal;
692
+ step_size: number;
693
+ }
694
+ interface IChargingTariffElement {
695
+ price_components: Array<IPriceComponent>;
696
+ restrictions: ITariffRestriction;
697
+ }
698
+ interface IDisplayText {
699
+ language: string;
700
+ text: string;
701
+ }
702
+ interface IChargingTariff {
703
+ "@id": string;
704
+ "@context"?: string | Array<string>;
705
+ country_code?: string;
706
+ party_id?: string;
707
+ shortName?: IMultilanguageText;
708
+ summary?: IMultilanguageText;
709
+ tariff_alt_url?: string;
710
+ currency?: string;
711
+ taxes?: Array<ITaxes>;
712
+ elements?: Array<IChargingTariffElement>;
713
+ not_before?: string;
714
+ not_after?: string;
715
+ created?: string;
716
+ last_updated?: string;
717
+ signatures?: Array<ISignatureRS>;
718
+ }
719
+ interface IParkingTariff {
720
+ "@id": string;
721
+ "@context"?: string | Array<string>;
722
+ country_code?: string;
723
+ party_id?: string;
724
+ description?: IMultilanguageText;
725
+ tariff_alt_text?: Array<IDisplayText>;
726
+ tariff_alt_url?: string;
727
+ currency?: string;
728
+ taxes?: Array<ITaxes>;
729
+ elements?: Array<IChargingTariffElement>;
730
+ not_before?: string;
731
+ not_after?: string;
732
+ created?: string;
733
+ last_updated?: string;
734
+ signatures?: Array<ISignatureRS>;
735
+ }
736
+ type ShowPKIDetailsFunction = (pkiData: unknown) => void;
737
+ type IssueReportPayload = {
738
+ timestamp: string;
739
+ chargyVersion: string;
740
+ platform: string;
741
+ invalidCTR: boolean;
742
+ InvalidStationData: boolean;
743
+ invalidSignatures: boolean;
744
+ invalidCertificates: boolean;
745
+ transparencenySoftwareBug: boolean;
746
+ DSGVO: boolean;
747
+ BITV: boolean;
748
+ description: string;
749
+ chargeTransparencyRecord?: string;
750
+ name: string;
751
+ phone: string;
752
+ eMail: string;
753
+ };
754
+
755
+ type chargyInterfaces_CheckMeterPublicKeySignatureFunc = CheckMeterPublicKeySignatureFunc;
756
+ type chargyInterfaces_CryptoAlgorithms = CryptoAlgorithms;
757
+ declare const chargyInterfaces_CryptoAlgorithms: typeof CryptoAlgorithms;
758
+ type chargyInterfaces_CryptoHashAlgorithms = CryptoHashAlgorithms;
759
+ declare const chargyInterfaces_CryptoHashAlgorithms: typeof CryptoHashAlgorithms;
760
+ type chargyInterfaces_DayOfWeek = DayOfWeek;
761
+ declare const chargyInterfaces_DayOfWeek: typeof DayOfWeek;
762
+ type chargyInterfaces_DisplayPrefixes = DisplayPrefixes;
763
+ declare const chargyInterfaces_DisplayPrefixes: typeof DisplayPrefixes;
764
+ type chargyInterfaces_GetChargingPoolFunc = GetChargingPoolFunc;
765
+ type chargyInterfaces_GetChargingStationFunc = GetChargingStationFunc;
766
+ type chargyInterfaces_GetEVSEFunc = GetEVSEFunc;
767
+ type chargyInterfaces_GetMeterFunc = GetMeterFunc;
768
+ type chargyInterfaces_I18NDictionary = I18NDictionary;
769
+ type chargyInterfaces_IAddress = IAddress;
770
+ type chargyInterfaces_IAuthorization = IAuthorization;
771
+ type chargyInterfaces_ICalibration = ICalibration;
772
+ type chargyInterfaces_IChargingCosts = IChargingCosts;
773
+ type chargyInterfaces_IChargingPeriod = IChargingPeriod;
774
+ type chargyInterfaces_IChargingPool = IChargingPool;
775
+ type chargyInterfaces_IChargingProduct = IChargingProduct;
776
+ type chargyInterfaces_IChargingProductRelevance = IChargingProductRelevance;
777
+ type chargyInterfaces_IChargingStation = IChargingStation;
778
+ type chargyInterfaces_IChargingStationOperator = IChargingStationOperator;
779
+ type chargyInterfaces_IChargingTariff = IChargingTariff;
780
+ type chargyInterfaces_IChargingTariffElement = IChargingTariffElement;
781
+ type chargyInterfaces_IConformity = IConformity;
782
+ type chargyInterfaces_IContact = IContact;
783
+ type chargyInterfaces_IContract = IContract;
784
+ type chargyInterfaces_ICost = ICost;
785
+ type chargyInterfaces_ICryptoHashes = ICryptoHashes;
786
+ type chargyInterfaces_ICryptoResult = ICryptoResult;
787
+ type chargyInterfaces_IDisplayText = IDisplayText;
788
+ type chargyInterfaces_IECCurves = IECCurves;
789
+ declare const chargyInterfaces_IECCurves: typeof IECCurves;
790
+ type chargyInterfaces_IEMobilityProvider = IEMobilityProvider;
791
+ type chargyInterfaces_IEVSE = IEVSE;
792
+ type chargyInterfaces_IEncoding = IEncoding;
793
+ declare const chargyInterfaces_IEncoding: typeof IEncoding;
794
+ type chargyInterfaces_IFileInfo = IFileInfo;
795
+ type chargyInterfaces_IFlatCost = IFlatCost;
796
+ type chargyInterfaces_IGeoLocation = IGeoLocation;
797
+ type chargyInterfaces_IKeyInfo = IKeyInfo;
798
+ type chargyInterfaces_ILegalCompliance = ILegalCompliance;
799
+ type chargyInterfaces_IMediationService = IMediationService;
800
+ type chargyInterfaces_IMeter = IMeter;
801
+ type chargyInterfaces_IMultilanguageText = IMultilanguageText;
802
+ type chargyInterfaces_IOIDInfo = IOIDInfo;
803
+ type chargyInterfaces_IParking = IParking;
804
+ type chargyInterfaces_IParkingTariff = IParkingTariff;
805
+ type chargyInterfaces_IPriceComponent = IPriceComponent;
806
+ type chargyInterfaces_IPrivacy = IPrivacy;
807
+ type chargyInterfaces_IPublicKey = IPublicKey;
808
+ type chargyInterfaces_IPublicKeyXY = IPublicKeyXY;
809
+ type chargyInterfaces_IResult = IResult;
810
+ type chargyInterfaces_ISessionCryptoResult = ISessionCryptoResult;
811
+ type chargyInterfaces_ISignature = ISignature;
812
+ type chargyInterfaces_ISignatureInfos = ISignatureInfos;
813
+ type chargyInterfaces_ISignatureRS = ISignatureRS;
814
+ type chargyInterfaces_ISupport = ISupport;
815
+ type chargyInterfaces_ITariffRestriction = ITariffRestriction;
816
+ type chargyInterfaces_ITaxes = ITaxes;
817
+ type chargyInterfaces_ITransparencyInfos = ITransparencyInfos;
818
+ type chargyInterfaces_ITransparencySoftware = ITransparencySoftware;
819
+ type chargyInterfaces_IVersion = IVersion;
820
+ type chargyInterfaces_IVersionPackage = IVersionPackage;
821
+ type chargyInterfaces_IVersionSignature = IVersionSignature;
822
+ type chargyInterfaces_IVersions = IVersions;
823
+ type chargyInterfaces_InformationRelevance = InformationRelevance;
824
+ declare const chargyInterfaces_InformationRelevance: typeof InformationRelevance;
825
+ type chargyInterfaces_IssueReportPayload = IssueReportPayload;
826
+ type chargyInterfaces_PublicKeyFormats = PublicKeyFormats;
827
+ declare const chargyInterfaces_PublicKeyFormats: typeof PublicKeyFormats;
828
+ type chargyInterfaces_SessionVerificationResult = SessionVerificationResult;
829
+ declare const chargyInterfaces_SessionVerificationResult: typeof SessionVerificationResult;
830
+ type chargyInterfaces_ShowPKIDetailsFunction = ShowPKIDetailsFunction;
831
+ type chargyInterfaces_SignatureFormats = SignatureFormats;
832
+ declare const chargyInterfaces_SignatureFormats: typeof SignatureFormats;
833
+ type chargyInterfaces_TarInfo = TarInfo;
834
+ type chargyInterfaces_VerificationResult = VerificationResult;
835
+ declare const chargyInterfaces_VerificationResult: typeof VerificationResult;
836
+ declare const chargyInterfaces_isGeoLocation: typeof isGeoLocation;
837
+ declare const chargyInterfaces_isICryptoResult: typeof isICryptoResult;
838
+ declare const chargyInterfaces_isIFileInfo: typeof isIFileInfo;
839
+ declare const chargyInterfaces_isIPublicKeyXY: typeof isIPublicKeyXY;
840
+ declare const chargyInterfaces_isISessionCryptoResult1: typeof isISessionCryptoResult1;
841
+ declare const chargyInterfaces_isISessionCryptoResult2: typeof isISessionCryptoResult2;
842
+ declare const chargyInterfaces_isMultilanguageText: typeof isMultilanguageText;
843
+ declare const chargyInterfaces_isOIDInfo: typeof isOIDInfo;
844
+ declare const chargyInterfaces_isObject: typeof isObject;
845
+ declare const chargyInterfaces_isString: typeof isString;
846
+ declare const chargyInterfaces_isStringArray: typeof isStringArray;
847
+ declare const chargyInterfaces_isStringOrOIDInfo: typeof isStringOrOIDInfo;
848
+ declare const chargyInterfaces_isStringOrStringArray: typeof isStringOrStringArray;
849
+ declare namespace chargyInterfaces {
850
+ export { type chargyInterfaces_CheckMeterPublicKeySignatureFunc as CheckMeterPublicKeySignatureFunc, chargyInterfaces_CryptoAlgorithms as CryptoAlgorithms, chargyInterfaces_CryptoHashAlgorithms as CryptoHashAlgorithms, chargyInterfaces_DayOfWeek as DayOfWeek, chargyInterfaces_DisplayPrefixes as DisplayPrefixes, type chargyInterfaces_GetChargingPoolFunc as GetChargingPoolFunc, type chargyInterfaces_GetChargingStationFunc as GetChargingStationFunc, type chargyInterfaces_GetEVSEFunc as GetEVSEFunc, type chargyInterfaces_GetMeterFunc as GetMeterFunc, type chargyInterfaces_I18NDictionary as I18NDictionary, type chargyInterfaces_IAddress as IAddress, type chargyInterfaces_IAuthorization as IAuthorization, type chargyInterfaces_ICalibration as ICalibration, type chargyInterfaces_IChargingCosts as IChargingCosts, type chargyInterfaces_IChargingPeriod as IChargingPeriod, type chargyInterfaces_IChargingPool as IChargingPool, type chargyInterfaces_IChargingProduct as IChargingProduct, type chargyInterfaces_IChargingProductRelevance as IChargingProductRelevance, type chargyInterfaces_IChargingStation as IChargingStation, type chargyInterfaces_IChargingStationOperator as IChargingStationOperator, type chargyInterfaces_IChargingTariff as IChargingTariff, type chargyInterfaces_IChargingTariffElement as IChargingTariffElement, type chargyInterfaces_IConformity as IConformity, type IConnector$1 as IConnector, type chargyInterfaces_IContact as IContact, type chargyInterfaces_IContract as IContract, type chargyInterfaces_ICost as ICost, type chargyInterfaces_ICryptoHashes as ICryptoHashes, type chargyInterfaces_ICryptoResult as ICryptoResult, type chargyInterfaces_IDisplayText as IDisplayText, chargyInterfaces_IECCurves as IECCurves, type chargyInterfaces_IEMobilityProvider as IEMobilityProvider, type chargyInterfaces_IEVSE as IEVSE, chargyInterfaces_IEncoding as IEncoding, type chargyInterfaces_IFileInfo as IFileInfo, type chargyInterfaces_IFlatCost as IFlatCost, type chargyInterfaces_IGeoLocation as IGeoLocation, type chargyInterfaces_IKeyInfo as IKeyInfo, type chargyInterfaces_ILegalCompliance as ILegalCompliance, type chargyInterfaces_IMediationService as IMediationService, type chargyInterfaces_IMeter as IMeter, type chargyInterfaces_IMultilanguageText as IMultilanguageText, type chargyInterfaces_IOIDInfo as IOIDInfo, type chargyInterfaces_IParking as IParking, type chargyInterfaces_IParkingTariff as IParkingTariff, type chargyInterfaces_IPriceComponent as IPriceComponent, type chargyInterfaces_IPrivacy as IPrivacy, type chargyInterfaces_IPublicKey as IPublicKey, type chargyInterfaces_IPublicKeyXY as IPublicKeyXY, type chargyInterfaces_IResult as IResult, type chargyInterfaces_ISessionCryptoResult as ISessionCryptoResult, type chargyInterfaces_ISignature as ISignature, type chargyInterfaces_ISignatureInfos as ISignatureInfos, type chargyInterfaces_ISignatureRS as ISignatureRS, type chargyInterfaces_ISupport as ISupport, type chargyInterfaces_ITariffRestriction as ITariffRestriction, type chargyInterfaces_ITaxes as ITaxes, type chargyInterfaces_ITransparencyInfos as ITransparencyInfos, type chargyInterfaces_ITransparencySoftware as ITransparencySoftware, type chargyInterfaces_IVersion as IVersion, type chargyInterfaces_IVersionPackage as IVersionPackage, type chargyInterfaces_IVersionSignature as IVersionSignature, type chargyInterfaces_IVersions as IVersions, chargyInterfaces_InformationRelevance as InformationRelevance, type chargyInterfaces_IssueReportPayload as IssueReportPayload, chargyInterfaces_PublicKeyFormats as PublicKeyFormats, chargyInterfaces_SessionVerificationResult as SessionVerificationResult, type chargyInterfaces_ShowPKIDetailsFunction as ShowPKIDetailsFunction, chargyInterfaces_SignatureFormats as SignatureFormats, type chargyInterfaces_TarInfo as TarInfo, chargyInterfaces_VerificationResult as VerificationResult, chargyInterfaces_isGeoLocation as isGeoLocation, chargyInterfaces_isICryptoResult as isICryptoResult, chargyInterfaces_isIFileInfo as isIFileInfo, chargyInterfaces_isIPublicKeyXY as isIPublicKeyXY, chargyInterfaces_isISessionCryptoResult1 as isISessionCryptoResult1, chargyInterfaces_isISessionCryptoResult2 as isISessionCryptoResult2, chargyInterfaces_isMultilanguageText as isMultilanguageText, chargyInterfaces_isOIDInfo as isOIDInfo, chargyInterfaces_isObject as isObject, chargyInterfaces_isString as isString, chargyInterfaces_isStringArray as isStringArray, chargyInterfaces_isStringOrOIDInfo as isStringOrOIDInfo, chargyInterfaces_isStringOrStringArray as isStringOrStringArray };
851
+ }
852
+
853
+ declare const ChargeTransparencyLiveLinkContext = "https://open.charging.cloud/contexts/chargeTransparency/live/link/1.0";
854
+ declare function IsAChargeTransparencyLiveLink(data: unknown): data is IChargeTransparencyLiveLink;
855
+ interface IChargeTransparencyLiveLink extends JSONObject {
856
+ "@context": typeof ChargeTransparencyLiveLinkContext;
857
+ /** ISO 8601 timestamp */
858
+ timestamp?: string | null;
859
+ /** Multi-language description */
860
+ description?: IMultilanguageText;
861
+ /** URLs to images / logos */
862
+ imageURLs?: string[];
863
+ /** Geographic position of the charging station */
864
+ geoLocation?: IGeoLocation;
865
+ /** Technical connector data */
866
+ connector?: IConnector;
867
+ /** Available transport methods for live data */
868
+ transports?: Transport[];
869
+ /** Digital signatures (currently empty or extendable) */
870
+ signatures?: ISignature[];
871
+ }
872
+ /** Connector information */
873
+ interface IConnector {
874
+ standard?: string;
875
+ format?: string;
876
+ powerType?: string;
877
+ maxPower?: string;
878
+ }
879
+ /** Union type for the different transport variants */
880
+ type Transport = TransportHTTPS | TransportHTTPSSE | TransportWebsocket;
881
+ interface ITransport {
882
+ url?: string;
883
+ urls?: Array<ITransportURL | string>;
884
+ totp?: TOTPConfig;
885
+ }
886
+ interface TransportHTTPS extends ITransport {
887
+ type: "https";
888
+ }
889
+ interface TransportHTTPSSE extends ITransport {
890
+ type: "httpSSE";
891
+ }
892
+ interface TransportWebsocket extends ITransport {
893
+ type: "websocket";
894
+ }
895
+ interface ITransportURL {
896
+ url: string;
897
+ priority?: number;
898
+ weight?: number;
899
+ }
900
+ /** Time-based One-Time Password configuration */
901
+ interface TOTPConfig {
902
+ initialSharedSecret: string;
903
+ timeStep: number;
904
+ }
905
+
906
+ declare const IChargeTransparencyLiveLink$1_ChargeTransparencyLiveLinkContext: typeof ChargeTransparencyLiveLinkContext;
907
+ type IChargeTransparencyLiveLink$1_IChargeTransparencyLiveLink = IChargeTransparencyLiveLink;
908
+ type IChargeTransparencyLiveLink$1_IConnector = IConnector;
909
+ type IChargeTransparencyLiveLink$1_ITransport = ITransport;
910
+ type IChargeTransparencyLiveLink$1_ITransportURL = ITransportURL;
911
+ declare const IChargeTransparencyLiveLink$1_IsAChargeTransparencyLiveLink: typeof IsAChargeTransparencyLiveLink;
912
+ type IChargeTransparencyLiveLink$1_TOTPConfig = TOTPConfig;
913
+ type IChargeTransparencyLiveLink$1_Transport = Transport;
914
+ type IChargeTransparencyLiveLink$1_TransportHTTPS = TransportHTTPS;
915
+ type IChargeTransparencyLiveLink$1_TransportHTTPSSE = TransportHTTPSSE;
916
+ type IChargeTransparencyLiveLink$1_TransportWebsocket = TransportWebsocket;
917
+ declare namespace IChargeTransparencyLiveLink$1 {
918
+ export { IChargeTransparencyLiveLink$1_ChargeTransparencyLiveLinkContext as ChargeTransparencyLiveLinkContext, type IChargeTransparencyLiveLink$1_IChargeTransparencyLiveLink as IChargeTransparencyLiveLink, type IChargeTransparencyLiveLink$1_IConnector as IConnector, type IChargeTransparencyLiveLink$1_ITransport as ITransport, type IChargeTransparencyLiveLink$1_ITransportURL as ITransportURL, IChargeTransparencyLiveLink$1_IsAChargeTransparencyLiveLink as IsAChargeTransparencyLiveLink, type IChargeTransparencyLiveLink$1_TOTPConfig as TOTPConfig, type IChargeTransparencyLiveLink$1_Transport as Transport, type IChargeTransparencyLiveLink$1_TransportHTTPS as TransportHTTPS, type IChargeTransparencyLiveLink$1_TransportHTTPSSE as TransportHTTPSSE, type IChargeTransparencyLiveLink$1_TransportWebsocket as TransportWebsocket };
919
+ }
920
+
921
+ declare function IsAPublicKeyLookup(data: unknown): data is IPublicKeyLookup;
922
+ interface IPublicKeyLookup extends JSONObject {
923
+ publicKeys: Array<IPublicKeyInfo>;
924
+ status?: SessionVerificationResult;
925
+ }
926
+ declare function IsAPublicKeyInfo(data: unknown): data is IPublicKeyInfo;
927
+ interface IPublicKeyInfo extends JSONObject {
928
+ "@id"?: string;
929
+ "@context": string;
930
+ subject?: string;
931
+ type?: string | IOIDInfo;
932
+ algorithm: string | IOIDInfo;
933
+ value: string;
934
+ encoding?: string;
935
+ signatures?: Array<IPublicKeysignature>;
936
+ certainty?: number;
937
+ }
938
+ interface IPublicKeysignature {
939
+ "@id": string;
940
+ "@context"?: string;
941
+ timestamp: string;
942
+ keyUsage: Array<string>;
943
+ }
944
+
945
+ type IPublicKeyInfo$1_IPublicKeyInfo = IPublicKeyInfo;
946
+ type IPublicKeyInfo$1_IPublicKeyLookup = IPublicKeyLookup;
947
+ type IPublicKeyInfo$1_IPublicKeysignature = IPublicKeysignature;
948
+ declare const IPublicKeyInfo$1_IsAPublicKeyInfo: typeof IsAPublicKeyInfo;
949
+ declare const IPublicKeyInfo$1_IsAPublicKeyLookup: typeof IsAPublicKeyLookup;
950
+ declare namespace IPublicKeyInfo$1 {
951
+ export { type IPublicKeyInfo$1_IPublicKeyInfo as IPublicKeyInfo, type IPublicKeyInfo$1_IPublicKeyLookup as IPublicKeyLookup, type IPublicKeyInfo$1_IPublicKeysignature as IPublicKeysignature, IPublicKeyInfo$1_IsAPublicKeyInfo as IsAPublicKeyInfo, IPublicKeyInfo$1_IsAPublicKeyLookup as IsAPublicKeyLookup };
952
+ }
953
+
954
+ declare function IsAChargeTransparencyRecord(data: unknown): data is IChargeTransparencyRecord;
955
+ interface IChargeTransparencyRecord extends JSONObject {
956
+ "@id": string;
957
+ "@context": string | Array<string>;
958
+ begin?: string;
959
+ end?: string;
960
+ description?: IMultilanguageText;
961
+ contract?: IContract;
962
+ chargingStationOperators?: Array<IChargingStationOperator>;
963
+ chargingPools?: Array<IChargingPool>;
964
+ chargingStations?: Array<IChargingStation>;
965
+ chargingTariffs?: Array<IChargingTariff>;
966
+ publicKeys?: Array<IPublicKeyInfo>;
967
+ chargingSessions?: Array<IChargingSession>;
968
+ eMobilityProviders?: Array<IEMobilityProvider>;
969
+ mediationServices?: Array<IMediationService>;
970
+ verificationResult?: ISessionCryptoResult;
971
+ invalidDataSets?: Array<IExtendedFileInfo>;
972
+ certainty: number;
973
+ warnings?: Array<string>;
974
+ errors?: Array<string>;
975
+ status?: SessionVerificationResult;
976
+ }
977
+ declare function IsASessionCryptoResult(data: unknown): data is ISessionCryptoResult;
978
+ interface IChargingSession {
979
+ "@id": string;
980
+ "@context"?: string;
981
+ ctr?: IChargeTransparencyRecord;
982
+ GUI?: HTMLDivElement;
983
+ begin: string;
984
+ end?: string;
985
+ internalSessionId?: string;
986
+ chargingProductRelevance?: IChargingProductRelevance;
987
+ description?: IMultilanguageText;
988
+ chargingStationOperatorId?: string;
989
+ chargingStationOperator?: IChargingStationOperator;
990
+ chargingPoolId?: string;
991
+ chargingPool?: IChargingPool;
992
+ chargingStationId?: string;
993
+ chargingStation?: IChargingStation;
994
+ EVSEId: string;
995
+ EVSE?: IEVSE;
996
+ meterId?: string;
997
+ meter?: IMeter;
998
+ publicKey?: IPublicKeyInfo;
999
+ tariffId?: string;
1000
+ chargingTariffs?: Array<IChargingTariff>;
1001
+ chargingPeriods?: Array<IChargingPeriod>;
1002
+ totalCosts?: IChargingCosts;
1003
+ authorizationStart: IAuthorization;
1004
+ authorizationStop?: IAuthorization;
1005
+ product?: IChargingProduct;
1006
+ measurements: Array<IMeasurement>;
1007
+ parking?: Array<IParking>;
1008
+ transparencyInfos?: ITransparencyInfos;
1009
+ method?: ACrypt;
1010
+ original?: string;
1011
+ signature?: string | ISignatureRS;
1012
+ hashValue?: string;
1013
+ verificationResult?: ISessionCryptoResult;
1014
+ }
1015
+ interface IMeasurement {
1016
+ "@context"?: string;
1017
+ chargingSession?: IChargingSession;
1018
+ energyMeterId: string;
1019
+ phenomena?: any[];
1020
+ name: string;
1021
+ obis: string;
1022
+ unit?: string;
1023
+ unitEncoded?: number;
1024
+ valueType?: string;
1025
+ scale: number;
1026
+ verifyChain?: boolean;
1027
+ signatureInfos?: ISignatureInfos;
1028
+ values: Array<IMeasurementValue>;
1029
+ verificationResult?: ICryptoResult;
1030
+ }
1031
+ interface IMeasurements {
1032
+ "@context"?: string;
1033
+ values: Array<IMeasurement>;
1034
+ verificationResult?: ICryptoResult;
1035
+ }
1036
+ interface IMeasurementValue {
1037
+ measurement?: IMeasurement;
1038
+ method?: ACrypt;
1039
+ previousValue?: IMeasurementValue;
1040
+ timestamp: string;
1041
+ value: Decimal;
1042
+ value_displayPrefix?: DisplayPrefixes;
1043
+ value_displayPrecision?: number;
1044
+ statusMeter?: string;
1045
+ secondsIndex?: number;
1046
+ paginationId?: number | string;
1047
+ logBookIndex?: string;
1048
+ statusAdapter?: string;
1049
+ errors?: Array<string>;
1050
+ warnings?: Array<string>;
1051
+ signatures?: Array<ISignature | ISignatureRS>;
1052
+ result?: ICryptoResult;
1053
+ }
1054
+ interface IExtendedFileInfo extends IFileInfo {
1055
+ result: IChargeTransparencyRecord | IChargeTransparencyLiveLink | IPublicKeyInfo | IPublicKeyLookup | ISessionCryptoResult;
1056
+ }
1057
+ declare function CloneCTR(CTR: IChargeTransparencyRecord): IChargeTransparencyRecord;
1058
+
1059
+ declare const IChargeTransparencyRecord$1_CloneCTR: typeof CloneCTR;
1060
+ type IChargeTransparencyRecord$1_IChargeTransparencyRecord = IChargeTransparencyRecord;
1061
+ type IChargeTransparencyRecord$1_IChargingSession = IChargingSession;
1062
+ type IChargeTransparencyRecord$1_IExtendedFileInfo = IExtendedFileInfo;
1063
+ type IChargeTransparencyRecord$1_IMeasurement = IMeasurement;
1064
+ type IChargeTransparencyRecord$1_IMeasurementValue = IMeasurementValue;
1065
+ type IChargeTransparencyRecord$1_IMeasurements = IMeasurements;
1066
+ declare const IChargeTransparencyRecord$1_IsAChargeTransparencyRecord: typeof IsAChargeTransparencyRecord;
1067
+ declare const IChargeTransparencyRecord$1_IsASessionCryptoResult: typeof IsASessionCryptoResult;
1068
+ declare namespace IChargeTransparencyRecord$1 {
1069
+ export { IChargeTransparencyRecord$1_CloneCTR as CloneCTR, type IChargeTransparencyRecord$1_IChargeTransparencyRecord as IChargeTransparencyRecord, type IChargeTransparencyRecord$1_IChargingSession as IChargingSession, type IChargeTransparencyRecord$1_IExtendedFileInfo as IExtendedFileInfo, type IChargeTransparencyRecord$1_IMeasurement as IMeasurement, type IChargeTransparencyRecord$1_IMeasurementValue as IMeasurementValue, type IChargeTransparencyRecord$1_IMeasurements as IMeasurements, IChargeTransparencyRecord$1_IsAChargeTransparencyRecord as IsAChargeTransparencyRecord, IChargeTransparencyRecord$1_IsASessionCryptoResult as IsASessionCryptoResult };
1070
+ }
1071
+
1072
+ type Asn1Builder = {
1073
+ bitstr(): Asn1Builder;
1074
+ int(): Asn1Builder;
1075
+ key(name: string): Asn1Builder;
1076
+ obj(...items: unknown[]): Asn1Builder;
1077
+ objid(): Asn1Builder;
1078
+ seq(): Asn1Builder;
1079
+ seqof(schema: unknown): Asn1Builder;
1080
+ };
1081
+ type Asn1Schema = {
1082
+ decode<T = any>(data: Uint8Array | ArrayBuffer, encoding: string): T;
1083
+ };
1084
+ type Asn1Module = {
1085
+ define: (name: string, body: (this: Asn1Builder) => void) => Asn1Schema;
1086
+ };
1087
+ type Base32Decode = (input: string, variant: "RFC3548" | "RFC4648" | "RFC4648-HEX" | "Crockford") => ArrayBuffer;
1088
+ type EllipticKeyPair = {
1089
+ verify(hash: string, signature: unknown): boolean;
1090
+ };
1091
+ type EllipticCurve = {
1092
+ keyFromPublic(publicKey: string | {
1093
+ x: string;
1094
+ y: string;
1095
+ }, encoding: string): EllipticKeyPair;
1096
+ };
1097
+ type EllipticModule = {
1098
+ ec: new (curve: string) => EllipticCurve;
1099
+ };
1100
+ type MomentModule = typeof moment;
1101
+ declare class Chargy {
1102
+ readonly i18n: I18NDictionary;
1103
+ UILanguage: string;
1104
+ readonly elliptic: EllipticModule;
1105
+ readonly moment: MomentModule;
1106
+ readonly asn1: Asn1Module;
1107
+ readonly base32Decode: Base32Decode;
1108
+ readonly showPKIDetails: ShowPKIDetailsFunction;
1109
+ private chargingStationOperators;
1110
+ private chargingPools;
1111
+ private chargingStations;
1112
+ private EVSEs;
1113
+ private meters;
1114
+ private chargingSessions;
1115
+ private eMobilityProviders;
1116
+ private mediationServices;
1117
+ currentCTR: IChargeTransparencyRecord;
1118
+ internalCTR: IChargeTransparencyRecord;
1119
+ constructor(i18n: I18NDictionary, UILanguage: string, elliptic: EllipticModule, moment: MomentModule, asn1: Asn1Module, base32Decode: Base32Decode, ShowPKIDetails: ShowPKIDetailsFunction);
1120
+ SetUILanguage(UILanguage: string): void;
1121
+ private PublicKeyIdFromFileName;
1122
+ private TryToParseDERPublicKey;
1123
+ private IsHexEncodedPublicKeyFile;
1124
+ private TryToGetDERPublicKeyHEX;
1125
+ private isSupportedQRCodeImageFile;
1126
+ private fileNameWithoutExtension;
1127
+ private textFileNameForQRCodeContent;
1128
+ private tryExtractChargeTransparencyTextFromURL;
1129
+ private tryExtractSignedDataTextFromXML;
1130
+ private expandQRCodeImageFiles;
1131
+ GetLocalizedMessage(Text: string): string;
1132
+ GetLocalizedMessageWithParameter(Text: string, Parameter: string | number): string;
1133
+ GetChargingPool: GetChargingPoolFunc;
1134
+ GetChargingStation: GetChargingStationFunc;
1135
+ GetEVSE: GetEVSEFunc;
1136
+ GetMeter: GetMeterFunc;
1137
+ CheckMeterPublicKeySignature(chargingStation: IChargingStation | null | undefined, evse: IEVSE | null | undefined, meter: IMeter | null | undefined, publicKey: IPublicKey | null | undefined, signature: unknown): Promise<string>;
1138
+ private decompressFiles;
1139
+ private extractArchive;
1140
+ private extractTarArchive;
1141
+ private extractZipArchive;
1142
+ private decompressStream;
1143
+ private findZipEndOfCentralDirectory;
1144
+ private toUint8Array;
1145
+ private readTarString;
1146
+ private readTarOctal;
1147
+ DetectAndConvertContentFormat(FileInfos: Array<IFileInfo>): Promise<IChargeTransparencyRecord | IChargeTransparencyLiveLink | IPublicKeyInfo | ISessionCryptoResult>;
1148
+ private processChargeTransparencyRecord;
1149
+ private processChargingSession;
1150
+ MergeChargeTransparencyRecords(CTRs: Array<IChargeTransparencyRecord>): IChargeTransparencyRecord;
1151
+ }
1152
+
1153
+ declare class secp224k1 {
1154
+ private Zero;
1155
+ private One;
1156
+ private Two;
1157
+ private Three;
1158
+ private Pcurve;
1159
+ private N;
1160
+ private Acurve;
1161
+ private Bcurve;
1162
+ private Gx;
1163
+ private Gy;
1164
+ private GPoint;
1165
+ Sign(hash: bigint, RandomNumber: bigint, privateKey: bigint): Array<bigint> | null;
1166
+ validate(hash: bigint, signatureR: bigint, signatureS: bigint, PublicKey: Array<bigint>): boolean;
1167
+ modulo(n: bigint, m: bigint): bigint;
1168
+ zfill(s: string): string;
1169
+ modInv(a: bigint, n?: bigint): bigint;
1170
+ ECadd(a: Array<bigint>, b: Array<bigint>): Array<bigint>;
1171
+ ECdouble(a: Array<bigint>): Array<bigint>;
1172
+ ECmultiply(GenPoint: Array<bigint>, ScalarHex: bigint): Array<bigint>;
1173
+ PublicKeyGenerate(PrivateKey: string | number | bigint): {
1174
+ x: bigint;
1175
+ y: bigint;
1176
+ xy: Array<string>;
1177
+ uncompressed: string;
1178
+ compressed: string;
1179
+ address: string;
1180
+ } | undefined;
1181
+ }
1182
+
1183
+ declare abstract class ACrypt {
1184
+ readonly description: string;
1185
+ readonly chargy: Chargy;
1186
+ readonly curve192r1: EllipticCurve;
1187
+ readonly curve224k1: secp224k1;
1188
+ readonly curve256r1: EllipticCurve;
1189
+ readonly curve384r1: EllipticCurve;
1190
+ readonly curve521r1: EllipticCurve;
1191
+ constructor(description: string, chargy: Chargy);
1192
+ protected CreateLocalizedLine(id: string, value: string | number, valueHEX: string, infoDiv: HTMLDivElement, bufferDiv: HTMLDivElement): void;
1193
+ protected CreateLine(id: string, value: string | number, valueHEX: string, infoDiv: HTMLDivElement, bufferDiv: HTMLDivElement): void;
1194
+ protected AddToVisualBuffer(valueHEX: string, bufferDiv: HTMLDivElement, lineDiv: HTMLDivElement): void;
1195
+ abstract VerifyChargingSession(chargingSession: IChargingSession): Promise<ISessionCryptoResult>;
1196
+ abstract VerifyMeasurement(measurementValue: IMeasurementValue): Promise<ICryptoResult>;
1197
+ abstract ViewMeasurement(measurementValue: IMeasurementValue, errorDiv: HTMLDivElement, introDiv: HTMLDivElement, infoDiv: HTMLDivElement, bufferValue: HTMLDivElement, hashedBufferValue: HTMLDivElement, publicKeyValue: HTMLDivElement, signatureExpectedValue: HTMLDivElement, signatureCheckValue: HTMLDivElement): Promise<Error | undefined>;
1198
+ }
1199
+
1200
+ declare class Alfen {
1201
+ private readonly chargy;
1202
+ constructor(chargy: Chargy);
1203
+ private bufferToHex;
1204
+ private bufferToNumber;
1205
+ TryToParseALFENFormat(Content: string | string[], ContainerInfos: unknown): IChargeTransparencyRecord | ISessionCryptoResult;
1206
+ }
1207
+ interface IAlfenMeasurement extends IMeasurement {
1208
+ adapterId: string;
1209
+ adapterFWVersion: string;
1210
+ adapterFWChecksum: string;
1211
+ }
1212
+ interface IAlfenMeasurementValue extends IMeasurementValue {
1213
+ statusMeter: string;
1214
+ statusAdapter: string;
1215
+ secondsIndex: number;
1216
+ sessionId: string;
1217
+ paginationId: number;
1218
+ measurement: IAlfenMeasurement;
1219
+ }
1220
+ interface IAlfenCrypt01Result extends ICryptoResult {
1221
+ adapterId?: string;
1222
+ adapterFWVersion?: string;
1223
+ adapterFWChecksum?: string;
1224
+ meterId?: string;
1225
+ meter?: IMeter;
1226
+ statusMeter?: string;
1227
+ statusAdapter?: string;
1228
+ secondsIndex?: string;
1229
+ timestamp?: string;
1230
+ obisId?: string;
1231
+ unitEncoded?: string;
1232
+ scalar?: string;
1233
+ value?: string;
1234
+ uid?: string;
1235
+ sessionId?: string;
1236
+ paging?: string;
1237
+ hashValue?: string | bigint;
1238
+ publicKey?: string;
1239
+ publicKeyFormat?: string;
1240
+ publicKeySignatures?: Array<unknown>;
1241
+ signature?: ISignatureRS;
1242
+ }
1243
+ interface IAlfenChargingSession extends IChargingSession {
1244
+ internalSessionId?: string;
1245
+ meter?: IMeter;
1246
+ measurements: Array<IAlfenMeasurement>;
1247
+ }
1248
+ interface IAlfenChargeTransparencyRecord extends IChargeTransparencyRecord {
1249
+ chargingSessions?: Array<IAlfenChargingSession>;
1250
+ }
1251
+ declare class AlfenCrypt01 extends ACrypt {
1252
+ constructor(chargy: Chargy);
1253
+ VerifyChargingSession(chargingSession: IChargingSession): Promise<ISessionCryptoResult>;
1254
+ VerifyMeasurement(measurementValue: IAlfenMeasurementValue): Promise<IAlfenCrypt01Result>;
1255
+ ViewMeasurement(measurementValue: IAlfenMeasurementValue, errorDiv: HTMLDivElement, introDiv: HTMLDivElement, infoDiv: HTMLDivElement, PlainTextDiv: HTMLDivElement, HashedPlainTextDiv: HTMLDivElement, PublicKeyDiv: HTMLDivElement, SignatureExpectedDiv: HTMLDivElement, SignatureCheckDiv: HTMLDivElement): Promise<Error | undefined>;
1256
+ private DecodeMeterStatus;
1257
+ private DecodeAdapterStatus;
1258
+ }
1259
+
1260
+ interface IBSMMeasurementValue extends IMeasurementValue {
1261
+ Typ: number;
1262
+ RCR: number;
1263
+ RCR_SF: number;
1264
+ RCR_Unit: string;
1265
+ RCR_Prefix: DisplayPrefixes;
1266
+ RCR_Precision: number;
1267
+ TotWhImp: number;
1268
+ TotWhImp_SF: number;
1269
+ TotWhImp_Unit: string;
1270
+ TotWhImp_Prefix: DisplayPrefixes;
1271
+ TotWhImp_Precision: number;
1272
+ W: number;
1273
+ W_SF: number;
1274
+ W_Unit: string;
1275
+ W_Prefix: DisplayPrefixes;
1276
+ W_Precision: number;
1277
+ MA1: string;
1278
+ RCnt: number;
1279
+ OS: number;
1280
+ Epoch: number;
1281
+ TZO: number;
1282
+ EpochSetCnt: number;
1283
+ EpochSetOS: number;
1284
+ DI: number;
1285
+ DO: number;
1286
+ Meta1: string;
1287
+ Meta2: string;
1288
+ Meta3: string;
1289
+ Evt: number;
1290
+ }
1291
+ interface IBSMCrypt01Result extends ICryptoResult {
1292
+ sha256value?: string;
1293
+ meterId?: string;
1294
+ meter?: IMeter;
1295
+ timestamp?: string;
1296
+ ArraySize: number;
1297
+ Typ: string;
1298
+ RCR: string;
1299
+ TotWhImp: string;
1300
+ W: string;
1301
+ MA1: string;
1302
+ RCnt: string;
1303
+ OS: string;
1304
+ Epoch: string;
1305
+ TZO: string;
1306
+ EpochSetCnt: string;
1307
+ EpochSetOS: string;
1308
+ DI: string;
1309
+ DO: string;
1310
+ Meta1: string;
1311
+ Meta2: string;
1312
+ Meta3: string;
1313
+ Evt: string;
1314
+ publicKey?: string;
1315
+ publicKeyFormat?: string;
1316
+ publicKeySignatures?: Array<unknown>;
1317
+ signature?: ISignatureRS;
1318
+ }
1319
+ declare class BSMCrypt01 extends ACrypt {
1320
+ readonly curve: EllipticCurve;
1321
+ constructor(chargy: Chargy);
1322
+ tryToParseBSM_WS36aMeasurements(CTR: IChargeTransparencyRecord, ExpectedEVSEId: string, ExpectedCscSwVersion: string | null, Measurements: Array<unknown>): IChargeTransparencyRecord | ISessionCryptoResult;
1323
+ VerifyChargingSession(chargingSession: IChargingSession): Promise<ISessionCryptoResult>;
1324
+ VerifyMeasurement(measurementValue: IBSMMeasurementValue): Promise<IBSMCrypt01Result>;
1325
+ ViewMeasurement(measurementValue: IBSMMeasurementValue, errorDiv: HTMLDivElement, introDiv: HTMLDivElement, infoDiv: HTMLDivElement, PlainTextDiv: HTMLDivElement, HashedPlainTextDiv: HTMLDivElement, PublicKeyDiv: HTMLDivElement, SignatureExpectedDiv: HTMLDivElement, SignatureCheckDiv: HTMLDivElement): Promise<Error | undefined>;
1326
+ private PrefixConverter;
1327
+ private UnitConverter;
1328
+ ParseTyp(value: number): string;
1329
+ ParseEvents(value: number): string[];
1330
+ private DecodeStatus;
1331
+ }
1332
+
1333
+ declare class CanonicalJSONError extends TypeError {
1334
+ constructor(message: string);
1335
+ }
1336
+ /**
1337
+ * Deterministic RFC 8259 JSON serialization for signature input.
1338
+ *
1339
+ * Objects are emitted with ordinally sorted property names, arrays keep their
1340
+ * original order, and no insignificant whitespace is written. This is meant
1341
+ * as a stable JSON byte representation; it is intentionally strict about
1342
+ * values which are not representable as RFC 8259 JSON.
1343
+ */
1344
+ declare function canonicalJSONStringify(value: unknown): string;
1345
+ declare function canonicalJSONBytes(value: unknown): Uint8Array;
1346
+
1347
+ type JSONMessage = Record<string, unknown>;
1348
+ interface JSONSignature {
1349
+ publicKey: string;
1350
+ publicKeyHEX: string;
1351
+ signature: string;
1352
+ signatureHEX: string;
1353
+ }
1354
+ interface SignedJSONMessage extends JSONMessage {
1355
+ signatures?: JSONSignature[];
1356
+ }
1357
+ declare enum JSONSignatureVerificationStatus {
1358
+ True = "True",
1359
+ False = "False",
1360
+ InvalidJSON = "InvalidJSON",
1361
+ MissingSignatures = "MissingSignatures",
1362
+ InvalidSignaturesArray = "InvalidSignaturesArray",
1363
+ InvalidSignatureStructure = "InvalidSignatureStructure",
1364
+ InvalidSignatureEncoding = "InvalidSignatureEncoding",
1365
+ InvalidPublicKey = "InvalidPublicKey",
1366
+ InvalidSignature = "InvalidSignature",
1367
+ InvalidCanonicalJSON = "InvalidCanonicalJSON"
1368
+ }
1369
+ interface JSONSignatureVerificationResult {
1370
+ status: JSONSignatureVerificationStatus;
1371
+ description?: string;
1372
+ }
1373
+ interface JSONMessageSignaturesVerificationResult {
1374
+ status: JSONSignatureVerificationStatus;
1375
+ description?: string;
1376
+ signatures: Record<string, JSONSignatureVerificationResult>;
1377
+ }
1378
+ interface SignJSONMessageOptions {
1379
+ curve?: string;
1380
+ canonical?: boolean;
1381
+ signatureFormat?: "DER";
1382
+ }
1383
+ declare function signMessage(JSONMessage: SignedJSONMessage, ...KeyPairs: ec.KeyPair[]): Promise<boolean>;
1384
+ declare function SignMessage(JSONMessage: SignedJSONMessage, ...KeyPairs: ec.KeyPair[]): Promise<boolean>;
1385
+ declare function signJSONMessage(JSONMessage: SignedJSONMessage | null | undefined, KeyPairs: Array<ec.KeyPair | null | undefined> | null | undefined, options?: SignJSONMessageOptions): Promise<boolean>;
1386
+ declare function verifyJSONSignature(JSONMessage: SignedJSONMessage, signature: JSONSignature, options?: SignJSONMessageOptions): Promise<boolean>;
1387
+ declare function verifyJSONSignatureResult(JSONMessage: SignedJSONMessage | null | undefined, signature: unknown, options?: SignJSONMessageOptions): Promise<JSONSignatureVerificationResult>;
1388
+ declare function verifyJSONMessageSignatures(JSONMessage: unknown, options?: SignJSONMessageOptions): Promise<boolean>;
1389
+ declare function verifyJSONMessageSignatureResults(JSONMessage: unknown, options?: SignJSONMessageOptions): Promise<JSONMessageSignaturesVerificationResult>;
1390
+ declare function VerifyJSONMessageSignatures(JSONMessage: unknown, options?: SignJSONMessageOptions): Promise<boolean>;
1391
+ declare function parseAndVerifyJSONSignatures(JSONMessage: string, options?: SignJSONMessageOptions): Promise<boolean>;
1392
+
1393
+ interface IEMHMeasurementValue extends IMeasurementValue {
1394
+ infoStatus: string;
1395
+ secondsIndex: number;
1396
+ paginationId: string;
1397
+ logBookIndex: string;
1398
+ }
1399
+ interface IEMHCrypt01Result extends ICryptoResult {
1400
+ sha256value?: string;
1401
+ meterId?: string;
1402
+ meter?: IMeter;
1403
+ timestamp?: string;
1404
+ infoStatus?: string;
1405
+ secondsIndex?: string;
1406
+ paginationId?: string;
1407
+ obis?: string;
1408
+ unitEncoded?: string;
1409
+ scale?: string;
1410
+ value?: string;
1411
+ logBookIndex?: string;
1412
+ authorizationStart?: string;
1413
+ authorizationStop?: string;
1414
+ authorizationStartTimestamp?: string;
1415
+ publicKey?: string;
1416
+ publicKeyFormat?: string;
1417
+ publicKeySignatures?: Array<unknown>;
1418
+ signature?: ISignatureRS;
1419
+ }
1420
+ declare class EMHCrypt01 extends ACrypt {
1421
+ readonly curve: EllipticCurve;
1422
+ constructor(chargy: Chargy);
1423
+ VerifyChargingSession(chargingSession: IChargingSession): Promise<ISessionCryptoResult>;
1424
+ VerifyMeasurement(measurementValue: IEMHMeasurementValue): Promise<IEMHCrypt01Result>;
1425
+ ViewMeasurement(measurementValue: IEMHMeasurementValue, errorDiv: HTMLDivElement, introDiv: HTMLDivElement, infoDiv: HTMLDivElement, PlainTextDiv: HTMLDivElement, HashedPlainTextDiv: HTMLDivElement, PublicKeyDiv: HTMLDivElement, SignatureExpectedDiv: HTMLDivElement, SignatureCheckDiv: HTMLDivElement): Promise<Error | undefined>;
1426
+ private DecodeStatus;
1427
+ }
1428
+
1429
+ interface IGDFMeasurementValue extends IMeasurementValue {
1430
+ prevSignature: string;
1431
+ }
1432
+ interface IGDFCrypt01Result extends ICryptoResult {
1433
+ sha256value?: string;
1434
+ meterId?: string;
1435
+ meter?: IMeter;
1436
+ timestamp?: string;
1437
+ obis?: string;
1438
+ unitEncoded?: string;
1439
+ scale?: string;
1440
+ value?: string;
1441
+ authorizationStart?: string;
1442
+ authorizationStartTimestamp?: string;
1443
+ publicKey?: string;
1444
+ publicKeyFormat?: string;
1445
+ publicKeySignatures?: Array<unknown>;
1446
+ signature?: ISignatureRS;
1447
+ }
1448
+ declare class GDFCrypt01 extends ACrypt {
1449
+ readonly curve: EllipticCurve;
1450
+ constructor(chargy: Chargy);
1451
+ VerifyChargingSession(chargingSession: IChargingSession): Promise<ISessionCryptoResult>;
1452
+ VerifyMeasurement(measurementValue: IGDFMeasurementValue): Promise<IGDFCrypt01Result>;
1453
+ ViewMeasurement(measurementValue: IGDFMeasurementValue, errorDiv: HTMLDivElement, introDiv: HTMLDivElement, infoDiv: HTMLDivElement, PlainTextDiv: HTMLDivElement, HashedPlainTextDiv: HTMLDivElement, PublicKeyDiv: HTMLDivElement, SignatureExpectedDiv: HTMLDivElement, SignatureCheckDiv: HTMLDivElement): Promise<Error | undefined>;
1454
+ }
1455
+
1456
+ declare const MENNEKES_EDL40_XMLNS = "http://www.mennekes.de/Mennekes.EdlVerification.xsd";
1457
+ declare const MENNEKES_EDL40_OBIS = "1-0:1.17.0*255";
1458
+ interface IMennekesMeasurement {
1459
+ timestampCustomerIdent?: string;
1460
+ timestamp: string;
1461
+ signature: string;
1462
+ eventCounter: number;
1463
+ meterStatus: number;
1464
+ value: number;
1465
+ scaler: number;
1466
+ pagination: number;
1467
+ secondIndex: number;
1468
+ }
1469
+ interface IMennekesChargingProcess {
1470
+ serverId: string;
1471
+ publicKey: string;
1472
+ meteringPoint?: string;
1473
+ siteAddress?: IAddress;
1474
+ customerIdent: string;
1475
+ timestampCustomerIdent: string;
1476
+ measurementStart: IMennekesMeasurement;
1477
+ measurementEnd: IMennekesMeasurement;
1478
+ }
1479
+ interface IMennekesBilling {
1480
+ chargingProcesses: IMennekesChargingProcess[];
1481
+ }
1482
+ interface IMennekesMeasurementValue extends IMeasurementValue {
1483
+ eventCounter: number;
1484
+ meterStatusNumber: number;
1485
+ originalSignature: string;
1486
+ timestampCustomerIdent?: string;
1487
+ measurement: IMennekesChargyMeasurement;
1488
+ }
1489
+ interface IMennekesChargyMeasurement extends IMeasurement {
1490
+ serverId: string;
1491
+ publicKey: string;
1492
+ customerIdent: string;
1493
+ timestampCustomerIdent: string;
1494
+ values: IMennekesMeasurementValue[];
1495
+ }
1496
+ interface IMennekesCrypt01Result extends ICryptoResult {
1497
+ hashValue?: string;
1498
+ signedData?: string;
1499
+ publicKey?: string;
1500
+ publicKeyFormat?: string;
1501
+ signature?: ISignatureRS;
1502
+ serverId?: string;
1503
+ timestamp?: string;
1504
+ meterStatus?: string;
1505
+ secondsIndex?: string;
1506
+ pagination?: string;
1507
+ obis?: string;
1508
+ unitEncoded?: string;
1509
+ scaler?: string;
1510
+ value?: string;
1511
+ logBytes?: string;
1512
+ customerIdent?: string;
1513
+ timestampCustomerIdent?: string;
1514
+ }
1515
+ declare class Mennekes {
1516
+ private readonly chargy;
1517
+ constructor(chargy: Chargy);
1518
+ tryToParseMennekesXML(XMLDocument: Document): Promise<IChargeTransparencyRecord | ISessionCryptoResult>;
1519
+ private toChargeTransparencyRecord;
1520
+ private toChargingStation;
1521
+ private toChargingSession;
1522
+ private evseId;
1523
+ private meterId;
1524
+ }
1525
+ declare class MennekesCrypt01 extends ACrypt {
1526
+ constructor(chargy: Chargy);
1527
+ VerifyChargingSession(chargingSession: IChargingSession): Promise<ISessionCryptoResult>;
1528
+ VerifyMeasurement(measurementValue: IMennekesMeasurementValue): Promise<IMennekesCrypt01Result>;
1529
+ ViewMeasurement(measurementValue: IMennekesMeasurementValue, errorDiv: HTMLDivElement, introDiv: HTMLDivElement, infoDiv: HTMLDivElement, PlainTextDiv: HTMLDivElement, HashedPlainTextDiv: HTMLDivElement, PublicKeyDiv: HTMLDivElement, SignatureExpectedDiv: HTMLDivElement, SignatureCheckDiv: HTMLDivElement): Promise<Error | undefined>;
1530
+ }
1531
+ declare function extractMennekesChargingProcesses(XMLDocument: Document): IMennekesChargingProcess[];
1532
+ declare function parseMennekesXMLDocument(XMLDocument: Document): IMennekesBilling | IMennekesChargingProcess;
1533
+ declare function buildMennekesSignatureData(chargingProcess: IMennekesChargingProcess, measurement: IMennekesMeasurement): Uint8Array;
1534
+ declare function dateToMennekesLocalEpochSeconds(isoTimestamp: string): number;
1535
+ declare function cleanHex(hex: string): string;
1536
+ declare function hexToBytes(hex: string): Uint8Array;
1537
+ declare function bytesToHex(bytes: Uint8Array): string;
1538
+
1539
+ interface IOCMFv1_0MeasurementValue extends IOCMFMeasurementValue {
1540
+ statusMeter: string;
1541
+ secondsIndex: number;
1542
+ paginationId: string;
1543
+ logBookIndex: string;
1544
+ }
1545
+ interface IOCMFv1_0Result extends ICryptoResult {
1546
+ sha256value?: string;
1547
+ meterId?: string;
1548
+ meter?: IMeter;
1549
+ timestamp?: string;
1550
+ infoStatus?: string;
1551
+ secondsIndex?: string;
1552
+ paginationId?: string;
1553
+ obis?: string;
1554
+ unitEncoded?: string;
1555
+ scale?: string;
1556
+ value?: string;
1557
+ logBookIndex?: string;
1558
+ authorizationStart?: string;
1559
+ authorizationStop?: string;
1560
+ authorizationStartTimestamp?: string;
1561
+ publicKey?: string;
1562
+ publicKeyFormat?: string;
1563
+ publicKeySignatures?: Array<unknown>;
1564
+ signature?: ISignatureRS;
1565
+ }
1566
+ declare class OCMFv1_x extends ACrypt {
1567
+ readonly curve: EllipticCurve;
1568
+ constructor(chargy: Chargy);
1569
+ VerifyChargingSession(chargingSession: IChargingSession): Promise<ISessionCryptoResult>;
1570
+ VerifyMeasurement(measurementValue: IOCMFv1_0MeasurementValue): Promise<IOCMFv1_0Result>;
1571
+ private PayloadDictionary;
1572
+ private SignatureDictionary;
1573
+ ViewMeasurement(measurementValue: IOCMFv1_0MeasurementValue, errorDiv: HTMLDivElement, introDiv: HTMLDivElement, infoDiv: HTMLDivElement, PlainTextDiv: HTMLDivElement, HashedPlainTextDiv: HTMLDivElement, PublicKeyDiv: HTMLDivElement, SignatureExpectedDiv: HTMLDivElement, SignatureCheckDiv: HTMLDivElement): Promise<Error | undefined>;
1574
+ }
1575
+ declare const enum OCMFTransactionTypes {
1576
+ undefined = "undefined",
1577
+ fiscal = "fiscal",
1578
+ transaction = "transaction"
1579
+ }
1580
+ declare const enum TimeStatusTypes {
1581
+ unknown = "unknown",
1582
+ informative = "informative",
1583
+ syncronized = "syncronized",
1584
+ relative = "relative"
1585
+ }
1586
+ interface IOCMFLossCompensation {
1587
+ LN?: string;
1588
+ LI?: string;
1589
+ LR: string;
1590
+ LU: string;
1591
+ }
1592
+ interface IOCMFReading {
1593
+ TM?: string;
1594
+ TX?: string;
1595
+ RV?: Decimal;
1596
+ RI?: string;
1597
+ RU?: string;
1598
+ RT?: string;
1599
+ CL?: number;
1600
+ EF?: string;
1601
+ ST?: string;
1602
+ }
1603
+ interface IOCMFSignature {
1604
+ SA?: string;
1605
+ SE?: string;
1606
+ SM?: string;
1607
+ SD: string;
1608
+ A?: unknown;
1609
+ B?: unknown;
1610
+ C?: unknown;
1611
+ D?: unknown;
1612
+ E?: unknown;
1613
+ F?: unknown;
1614
+ U?: unknown;
1615
+ V?: unknown;
1616
+ W?: unknown;
1617
+ X?: unknown;
1618
+ Y?: unknown;
1619
+ Z?: unknown;
1620
+ }
1621
+ interface IOCMFPayload {
1622
+ FV?: string;
1623
+ GI?: string;
1624
+ VI?: string;
1625
+ GS?: string;
1626
+ GV?: string;
1627
+ VV?: string;
1628
+ PG: string;
1629
+ MV?: string;
1630
+ MM?: string;
1631
+ MS?: string;
1632
+ MF?: string;
1633
+ IS: boolean | string;
1634
+ IL?: string;
1635
+ IF?: string[];
1636
+ IT?: string;
1637
+ ID?: string;
1638
+ TT?: string;
1639
+ CF?: string;
1640
+ LC?: IOCMFLossCompensation;
1641
+ CT?: string;
1642
+ CI?: string;
1643
+ RD: Array<IOCMFReading>;
1644
+ U?: unknown;
1645
+ V?: unknown;
1646
+ W?: unknown;
1647
+ X?: unknown;
1648
+ Y?: unknown;
1649
+ Z?: unknown;
1650
+ }
1651
+ interface IOCMFJSONDocument {
1652
+ "@context": string | string[];
1653
+ raw?: string;
1654
+ rawPayload?: string;
1655
+ hashAlgorithm: string;
1656
+ hashValue: string;
1657
+ payload: IOCMFPayload;
1658
+ signature: IOCMFSignature;
1659
+ signatureRS?: ISignatureRS;
1660
+ publicKey?: string | IPublicKeyXY;
1661
+ publicKeyEncoding?: string;
1662
+ validationStatus?: VerificationResult;
1663
+ }
1664
+ interface IOCMFMeasurementValue extends IMeasurementValue {
1665
+ measurement?: IOCMFMeasurement;
1666
+ timeSync: string;
1667
+ transaction?: string;
1668
+ transactionType: OCMFTransactionTypes;
1669
+ pagination: number;
1670
+ errorFlags?: string;
1671
+ cumulatedLoss?: Decimal;
1672
+ status: string;
1673
+ ocmfDocument?: IOCMFJSONDocument;
1674
+ }
1675
+ interface IOCMFMeasurement extends IMeasurement {
1676
+ currentType?: string;
1677
+ values: Array<IOCMFMeasurementValue>;
1678
+ }
1679
+ interface IOCMFAuthorization extends IAuthorization {
1680
+ identificationStatus?: boolean | string;
1681
+ identificationLevel?: string;
1682
+ identificationFlags?: Array<string>;
1683
+ }
1684
+ interface IOCMFChargingSession extends IChargingSession {
1685
+ internalSessionId?: string;
1686
+ authorizationStart: IOCMFAuthorization;
1687
+ meter?: IMeter;
1688
+ measurements: Array<IOCMFMeasurement>;
1689
+ }
1690
+ interface IOCMFCTRExtensions {
1691
+ formatVersion?: string;
1692
+ gatewayInformation?: string;
1693
+ gatewaySerial?: string;
1694
+ gatewayVersion?: string;
1695
+ }
1696
+ interface IOCMFChargeTransparencyRecord extends IChargeTransparencyRecord {
1697
+ ocmf?: IOCMFCTRExtensions;
1698
+ chargingSessions?: Array<IOCMFChargingSession>;
1699
+ }
1700
+ declare class OCMF {
1701
+ private readonly chargy;
1702
+ constructor(chargy: Chargy);
1703
+ private tryToParseOCMFv1_0;
1704
+ private mergeOCMFSessions;
1705
+ private mergeChargeTransparencyRecords;
1706
+ private validateOCMFSignature;
1707
+ private parseOCMFJSONDocuments;
1708
+ TryToParseOCMFDocument(OCMFDocument: string, PublicKey?: string | IPublicKeyXY, PublicKeyEncoding?: string, ContainerInfos?: unknown): Promise<IChargeTransparencyRecord | ISessionCryptoResult>;
1709
+ TryToParseOCMFDocuments(OCMFDocuments: string[], PublicKey?: string | IPublicKeyXY, PublicKeyEncoding?: string, ContainerInfos?: unknown): Promise<IChargeTransparencyRecord | ISessionCryptoResult>;
1710
+ private convertToISO8601;
1711
+ }
1712
+
1713
+ declare class OCPI {
1714
+ private readonly chargy;
1715
+ constructor(chargy: Chargy);
1716
+ private bufferToHex;
1717
+ private bufferToNumber;
1718
+ tryToParseOCPIFormat(SomeJSON: unknown): Promise<IChargeTransparencyRecord | ISessionCryptoResult>;
1719
+ }
1720
+
1721
+ declare const PCDF_PREFIX = "128.8.0";
1722
+ declare const PCDF_FIELD_ORDER: readonly ["ST", "CT", "CD", "TV", "BV", "CSC", "SP", "RV", "SI", "CS", "HW", "DT", "PK", "SG"];
1723
+ type PCDFFieldKey = typeof PCDF_FIELD_ORDER[number];
1724
+ interface IPCDFRawFields extends Record<PCDFFieldKey, string> {
1725
+ ST: string;
1726
+ CT: string;
1727
+ CD: string;
1728
+ TV: string;
1729
+ BV: string;
1730
+ CSC: string;
1731
+ SP: string;
1732
+ RV: string;
1733
+ SI: string;
1734
+ CS: string;
1735
+ HW: string;
1736
+ DT: string;
1737
+ PK: string;
1738
+ SG: string;
1739
+ }
1740
+ interface IPCDFSessionInfo {
1741
+ idTag: string;
1742
+ idTagType: string;
1743
+ transactionId: string;
1744
+ }
1745
+ interface IPCDFValidatedData {
1746
+ startTime: string;
1747
+ stopTime: string;
1748
+ durationSeconds: number;
1749
+ timeValid: boolean;
1750
+ billingValid: boolean;
1751
+ chargingSessionCounter: number;
1752
+ stopPresent: boolean;
1753
+ readingValue: Decimal;
1754
+ readingUnit: string;
1755
+ session: IPCDFSessionInfo;
1756
+ softwareChecksum: string;
1757
+ hardwareSerial: string;
1758
+ dcMeterType: number;
1759
+ publicKey: IPublicKeyXY;
1760
+ signature: ISignatureRS;
1761
+ }
1762
+ interface IPCDFDocument {
1763
+ "@context": "PCDF";
1764
+ raw: string;
1765
+ fields: IPCDFRawFields;
1766
+ signedPayload: string;
1767
+ hashAlgorithm: string;
1768
+ hashValue: string;
1769
+ data: IPCDFValidatedData;
1770
+ publicKeyHex: string;
1771
+ signatureHex: string;
1772
+ validationStatus: VerificationResult;
1773
+ }
1774
+ interface IPCDFMeasurementValue extends IMeasurementValue {
1775
+ pcdfDocument?: IPCDFDocument;
1776
+ }
1777
+ interface IPCDFMeasurement extends IMeasurement {
1778
+ values: Array<IPCDFMeasurementValue>;
1779
+ }
1780
+ interface IPCDFChargingSession extends IChargingSession {
1781
+ measurements: Array<IPCDFMeasurement>;
1782
+ }
1783
+ interface IPCDFChargeTransparencyRecord extends IChargeTransparencyRecord {
1784
+ pcdf?: {
1785
+ chargingSessionCounter: number;
1786
+ timeValid: boolean;
1787
+ billingValid: boolean;
1788
+ stopPresent: boolean;
1789
+ chargingDuration: number;
1790
+ dcMeterType: number;
1791
+ softwareChecksum: string;
1792
+ };
1793
+ chargingSessions?: Array<IPCDFChargingSession>;
1794
+ }
1795
+ declare class PCDFParseError extends Error {
1796
+ readonly code: string;
1797
+ readonly field?: PCDFFieldKey | undefined;
1798
+ constructor(code: string, message: string, field?: PCDFFieldKey | undefined);
1799
+ }
1800
+ declare class PCDFValidationError extends Error {
1801
+ readonly errors: Array<string>;
1802
+ constructor(errors: Array<string>);
1803
+ }
1804
+ declare function isPCDFText(input: string | undefined): boolean;
1805
+ declare function unquotePCDFText(input: string): string;
1806
+ declare function stripPCDFControlCharacters(input: string): string;
1807
+ declare function parsePCDFDocument(input: string): {
1808
+ raw: string;
1809
+ fields: IPCDFRawFields;
1810
+ signedPayload: string;
1811
+ };
1812
+ declare function validatePCDFFields(fields: IPCDFRawFields): IPCDFValidatedData;
1813
+ declare function normalizePCDFPublicKeyHex(publicKeyHex: string): string;
1814
+ declare function parsePCDFPublicKey(publicKeyHex: string): IPublicKeyXY;
1815
+ declare function parsePCDFSignature(signatureHex: string): ISignatureRS;
1816
+ declare function verifyPCDFDocument(document: IPCDFDocument, chargy: Chargy): Promise<VerificationResult>;
1817
+ declare class PCDFCrypt01 extends ACrypt {
1818
+ constructor(chargy: Chargy);
1819
+ VerifyChargingSession(chargingSession: IChargingSession): Promise<ISessionCryptoResult>;
1820
+ VerifyMeasurement(measurementValue: IPCDFMeasurementValue): Promise<ICryptoResult>;
1821
+ ViewMeasurement(measurementValue: IPCDFMeasurementValue, errorDiv: HTMLDivElement, introDiv: HTMLDivElement, infoDiv: HTMLDivElement, PlainTextDiv: HTMLDivElement, HashedPlainTextDiv: HTMLDivElement, PublicKeyDiv: HTMLDivElement, SignatureExpectedDiv: HTMLDivElement, SignatureCheckDiv: HTMLDivElement): Promise<Error | undefined>;
1822
+ }
1823
+ interface IPCDFCrypt01Result extends ICryptoResult {
1824
+ hashValue?: string;
1825
+ publicKey?: string;
1826
+ signature?: ISignatureRS;
1827
+ }
1828
+ declare class PCDF {
1829
+ private readonly chargy;
1830
+ constructor(chargy: Chargy);
1831
+ TryToParsePCDFDocument(PCDFDocument: string, externalPublicKey?: string): Promise<IPCDFChargeTransparencyRecord | ISessionCryptoResult>;
1832
+ private createChargeTransparencyRecord;
1833
+ }
1834
+
1835
+ /**
1836
+ * The root element that contains the four rings of the Digital Calibration Certificate (DCC).
1837
+ * @interface IDigitalCalibrationCertificate
1838
+ * @property {AdministrativeDataType} administrativeData - All essential administrative information about the calibration.
1839
+ * @property {Array<MeasurementResultType>} measurementResults - List of measurement results that are part of a DCC.
1840
+ * @property {Array<string>} [comments] - Optional comments about the calibration.
1841
+ * @property {ByteDataType} [document] - Optional binary encoded file of the DCC.
1842
+ * @property {string} schemaVersion - The version of the DCC schema, e.g. "3.2.1"
1843
+ * @property {Array<chargyInterfaces.ISignatureRS>} [signatures] - Optional list of digital signatures.
1844
+ */
1845
+ interface IDigitalCalibrationCertificate {
1846
+ "@id": string;
1847
+ "@context"?: string | Array<string>;
1848
+ administrativeData: AdministrativeDataType;
1849
+ measurementResults: Array<MeasurementResultType>;
1850
+ comments?: Array<string>;
1851
+ document?: ByteDataType;
1852
+ schemaVersion: string;
1853
+ signatures?: Array<ISignatureRS>;
1854
+ }
1855
+ /**
1856
+ * The element administrativeData contains all essential administrative information about the calibration.
1857
+ * The entries in this area are basically the same and regulated in all DCCs.
1858
+ * @interface AdministrativeDataType
1859
+ * @property {Array<SoftwareType>} software - A list of software elements.
1860
+ * @property {Array<RefTypeDefinitionType>} [refTypeDefinitions] - An optional list of information about the used refTypes in a DCC.
1861
+ * @property {CoreDataType} coreData - The core data of the DCC.
1862
+ * @property {Array<ItemType>} items - A list of items that are part of the calibration.
1863
+ * @property {CalibrationLaboratoryType} calibrationLaboratory - Information about the calibration laboratory.
1864
+ * @property {Array<RespPersonType>} respPersons - A list of responsible persons.
1865
+ * @property {ContactType} customer - Information about the customer.
1866
+ * @property {Array<StatementMetaDataType>} [statements] - Optional list of statements.
1867
+ */
1868
+ interface AdministrativeDataType {
1869
+ software: Array<SoftwareType>;
1870
+ refTypeDefinitions?: Array<RefTypeDefinitionType>;
1871
+ coreData: CoreDataType;
1872
+ items: Array<ItemType>;
1873
+ calibrationLaboratory: CalibrationLaboratoryType;
1874
+ respPersons: Array<RespPersonType>;
1875
+ customer: ContactType;
1876
+ statements?: Array<StatementMetaDataType>;
1877
+ }
1878
+ /**
1879
+ * Information about a software including its name, version and a description.
1880
+ * @interface SoftwareType
1881
+ */
1882
+ interface SoftwareType {
1883
+ name: IMultilanguageText;
1884
+ release: string;
1885
+ type?: 'application' | 'bios' | 'driver' | 'editor' | 'firmware' | 'library' | 'os' | 'other';
1886
+ description?: RichContentType;
1887
+ id?: string;
1888
+ refType?: string;
1889
+ }
1890
+ /**
1891
+ * This type contains the information about the wording of the refTypes used in a DCC.
1892
+ * @interface RefTypeDefinitionType
1893
+ */
1894
+ interface RefTypeDefinitionType {
1895
+ name: IMultilanguageText;
1896
+ description?: RichContentType;
1897
+ namespace: string;
1898
+ link: string;
1899
+ release?: string;
1900
+ value?: string;
1901
+ procedure?: string;
1902
+ refType?: string;
1903
+ }
1904
+ interface RichContentType {
1905
+ name?: IMultilanguageText;
1906
+ content?: Array<IDCCStringWithLangType>;
1907
+ file?: Array<ByteDataType>;
1908
+ formula?: Array<FormulaType>;
1909
+ id?: string;
1910
+ refId?: Array<string>;
1911
+ refType?: string;
1912
+ }
1913
+ interface IDCCStringWithLangType {
1914
+ value: string;
1915
+ lang?: string;
1916
+ id?: string;
1917
+ refId?: Array<string>;
1918
+ refType?: string;
1919
+ }
1920
+ interface FormulaType {
1921
+ latex?: string;
1922
+ mathml?: unknown;
1923
+ id?: string;
1924
+ refId?: Array<string>;
1925
+ refType?: string;
1926
+ }
1927
+ interface UsedMethodType {
1928
+ name: IMultilanguageText;
1929
+ description?: RichContentType;
1930
+ norm?: Array<string>;
1931
+ reference?: Array<string>;
1932
+ id?: string;
1933
+ refType?: string;
1934
+ }
1935
+ interface IdentificationType {
1936
+ issuer: 'manufacturer' | 'calibrationLaboratory' | 'customer' | 'owner' | 'other';
1937
+ value: string;
1938
+ name?: IMultilanguageText;
1939
+ id?: string;
1940
+ refType?: string;
1941
+ }
1942
+ interface MeasuringEquipmentType {
1943
+ name: IMultilanguageText;
1944
+ equipmentClass?: Array<EquipmentClassType>;
1945
+ description?: RichContentType;
1946
+ certificate?: HashType;
1947
+ manufacturer?: ContactNotStrictType;
1948
+ model?: string;
1949
+ identifications?: Array<IdentificationType>;
1950
+ measuringEquipmentQuantities?: Array<PrimitiveQuantityType>;
1951
+ id?: string;
1952
+ refType?: string;
1953
+ }
1954
+ interface PrimitiveQuantityType {
1955
+ name?: IMultilanguageText;
1956
+ description?: RichContentType;
1957
+ noQuantity?: RichContentType;
1958
+ charsXMLList?: Array<string>;
1959
+ real?: unknown;
1960
+ hybrid?: unknown;
1961
+ complex?: unknown;
1962
+ constant?: unknown;
1963
+ realListXMLList?: unknown;
1964
+ id?: string;
1965
+ refId?: Array<string>;
1966
+ refType?: string;
1967
+ }
1968
+ interface EquipmentClassType {
1969
+ reference: string;
1970
+ classID: string;
1971
+ id?: string;
1972
+ refType?: string;
1973
+ }
1974
+ interface HashType {
1975
+ referral: IMultilanguageText;
1976
+ referralID: string;
1977
+ procedure: string;
1978
+ value: string;
1979
+ description?: RichContentType;
1980
+ inValidityRange?: boolean;
1981
+ traceable?: boolean;
1982
+ linkedReport?: HashType;
1983
+ id?: string;
1984
+ refType?: string;
1985
+ }
1986
+ interface LocationType {
1987
+ city?: string;
1988
+ countryCode?: string;
1989
+ postCode?: string;
1990
+ postOfficeBox?: string;
1991
+ state?: string;
1992
+ street?: string;
1993
+ streetNo?: string;
1994
+ further?: RichContentType;
1995
+ positionCoordinates?: PositionCoordinatesType;
1996
+ }
1997
+ interface PositionCoordinatesType {
1998
+ positionCoordinateSystem: string;
1999
+ reference?: string;
2000
+ declaration?: RichContentType;
2001
+ positionCoordinate1: RealQuantityType;
2002
+ positionCoordinate2: RealQuantityType;
2003
+ positionCoordinate3?: RealQuantityType;
2004
+ id?: string;
2005
+ refId?: Array<string>;
2006
+ refType?: string;
2007
+ }
2008
+ interface RealQuantityType {
2009
+ value: number;
2010
+ uncertainty?: number;
2011
+ }
2012
+ interface ContactNotStrictType {
2013
+ name: IMultilanguageText;
2014
+ eMail?: string;
2015
+ phone?: string;
2016
+ fax?: string;
2017
+ location?: LocationType;
2018
+ descriptionData?: ByteDataType;
2019
+ id?: string;
2020
+ refId?: Array<string>;
2021
+ refType?: string;
2022
+ }
2023
+ interface ResultType {
2024
+ name: IMultilanguageText;
2025
+ description?: RichContentType;
2026
+ data: DataType;
2027
+ id?: string;
2028
+ refId?: Array<string>;
2029
+ refType?: string;
2030
+ }
2031
+ /**
2032
+ * A measurement results with the methods, software and equipments used for the calibration.
2033
+ * Also contains influence conditions and a list of the actual results.
2034
+ */
2035
+ interface MeasurementResultType {
2036
+ name: IMultilanguageText;
2037
+ description?: RichContentType;
2038
+ usedMethods?: Array<UsedMethodType>;
2039
+ usedSoftware?: Array<SoftwareType>;
2040
+ measuringEquipments?: Array<MeasuringEquipmentType>;
2041
+ influenceConditions?: Array<InfluenceConditionType>;
2042
+ results: Array<ResultType>;
2043
+ measurementMetaData?: Array<StatementMetaDataType>;
2044
+ id?: string;
2045
+ refId?: Array<string>;
2046
+ refType?: string;
2047
+ }
2048
+ /**
2049
+ * The byteDataType defines a type which allows to add binary encoded files to the measurement result section.
2050
+ * @interface ByteDataType
2051
+ */
2052
+ interface ByteDataType {
2053
+ name?: IMultilanguageText;
2054
+ description?: RichContentType;
2055
+ fileName: string;
2056
+ mimeType: string;
2057
+ dataBase64: string;
2058
+ id?: string;
2059
+ refId?: Array<string>;
2060
+ refType?: string;
2061
+ }
2062
+ interface XMLType {
2063
+ content: unknown;
2064
+ id?: string;
2065
+ refId?: Array<string>;
2066
+ refType?: string;
2067
+ }
2068
+ interface QuantityType {
2069
+ name?: IMultilanguageText;
2070
+ description?: RichContentType;
2071
+ noQuantity?: RichContentType;
2072
+ charsXMLList?: Array<string>;
2073
+ real?: unknown;
2074
+ hybrid?: unknown;
2075
+ complex?: unknown;
2076
+ constant?: unknown;
2077
+ realListXMLList?: unknown;
2078
+ id?: string;
2079
+ refId?: Array<string>;
2080
+ refType?: string;
2081
+ }
2082
+ interface ListType {
2083
+ name?: IMultilanguageText;
2084
+ description?: RichContentType;
2085
+ dateTime?: Date;
2086
+ dateTimeXMLList?: Array<Date>;
2087
+ quantities?: Array<QuantityType>;
2088
+ id?: string;
2089
+ refId?: Array<string>;
2090
+ refType?: string;
2091
+ }
2092
+ interface DataType {
2093
+ text?: Array<RichContentType>;
2094
+ formula?: Array<FormulaType>;
2095
+ byteData?: Array<ByteDataType>;
2096
+ xml?: Array<XMLType>;
2097
+ quantity?: Array<QuantityType>;
2098
+ list?: Array<ListType>;
2099
+ id?: string;
2100
+ refId?: string[];
2101
+ refType?: string;
2102
+ }
2103
+ interface InfluenceConditionType {
2104
+ name: IMultilanguageText;
2105
+ description?: RichContentType;
2106
+ status?: 'beforeAdjustment' | 'afterAdjustment' | 'beforeRepair' | 'afterRepair';
2107
+ certificate?: HashType;
2108
+ data: DataType;
2109
+ id?: string;
2110
+ refType?: string;
2111
+ }
2112
+ interface ContactType {
2113
+ name: IMultilanguageText;
2114
+ eMail?: string;
2115
+ phone?: string;
2116
+ fax?: string;
2117
+ location: LocationType;
2118
+ descriptionData?: ByteDataType;
2119
+ id?: string;
2120
+ }
2121
+ interface ItemType {
2122
+ name: IMultilanguageText;
2123
+ equipmentClass?: EquipmentClassType[];
2124
+ description?: RichContentType;
2125
+ installedSoftwares?: Array<SoftwareType>;
2126
+ manufacturer?: ContactNotStrictType;
2127
+ model?: string;
2128
+ identifications: Array<IdentificationType>;
2129
+ itemQuantities?: Array<PrimitiveQuantityType>;
2130
+ id?: string;
2131
+ refType?: string;
2132
+ }
2133
+ interface RespPersonType {
2134
+ person: ContactNotStrictType;
2135
+ description?: RichContentType;
2136
+ role?: string;
2137
+ mainSigner?: boolean;
2138
+ cryptElectronicSeal?: boolean;
2139
+ cryptElectronicSignature?: boolean;
2140
+ cryptElectronicTimeStamp?: boolean;
2141
+ id?: string;
2142
+ refType?: string;
2143
+ }
2144
+ interface PerformanceLocationType {
2145
+ location: 'laboratory' | 'customer' | 'laboratoryBranch' | 'customerBranch' | 'other';
2146
+ id?: string;
2147
+ refId?: Array<string>;
2148
+ refType?: string;
2149
+ }
2150
+ interface ReportAmendedSubstitutedType {
2151
+ typeOfChange: 'amended' | 'substituted';
2152
+ replacedUniqueIdentifier: string;
2153
+ id?: string;
2154
+ refType?: string;
2155
+ }
2156
+ interface CoreDataType {
2157
+ countryCodeISO3166_1: string;
2158
+ usedLangCodeISO639_1: Array<string>;
2159
+ mandatoryLangCodeISO639_1: Array<string>;
2160
+ uniqueIdentifier: string;
2161
+ identifications?: Array<IdentificationType>;
2162
+ receiptDate?: Date;
2163
+ beginPerformanceDate: Date;
2164
+ endPerformanceDate: Date;
2165
+ performanceLocation: PerformanceLocationType;
2166
+ issueDate?: Date;
2167
+ reportAmendedSubstituted?: ReportAmendedSubstitutedType;
2168
+ previousReport?: HashType;
2169
+ }
2170
+ interface StatementMetaDataType {
2171
+ name?: IMultilanguageText;
2172
+ description?: RichContentType;
2173
+ countryCodeISO3166_1?: Array<string>;
2174
+ convention?: string;
2175
+ traceable?: boolean;
2176
+ norm?: Array<string>;
2177
+ reference?: Array<string>;
2178
+ declaration?: RichContentType;
2179
+ valid?: boolean;
2180
+ validXMLList?: Array<boolean>;
2181
+ date?: Date;
2182
+ period?: string;
2183
+ respAuthority?: ContactType;
2184
+ conformity?: string;
2185
+ conformityXMLList?: Array<string>;
2186
+ data?: DataType;
2187
+ nonSIDefinition?: string;
2188
+ nonSIUnit?: string;
2189
+ location?: LocationType;
2190
+ id?: string;
2191
+ refId?: Array<string>;
2192
+ refType?: string;
2193
+ }
2194
+ interface StatementMetaDataType {
2195
+ name?: IMultilanguageText;
2196
+ description?: RichContentType;
2197
+ countryCodeISO3166_1?: Array<string>;
2198
+ convention?: string;
2199
+ traceable?: boolean;
2200
+ norm?: Array<string>;
2201
+ reference?: Array<string>;
2202
+ declaration?: RichContentType;
2203
+ valid?: boolean;
2204
+ validXMLList?: Array<boolean>;
2205
+ date?: Date;
2206
+ period?: string;
2207
+ respAuthority?: ContactType;
2208
+ conformity?: string;
2209
+ conformityXMLList?: Array<string>;
2210
+ data?: DataType;
2211
+ nonSIDefinition?: string;
2212
+ nonSIUnit?: string;
2213
+ location?: LocationType;
2214
+ id?: string;
2215
+ refId?: Array<string>;
2216
+ refType?: string;
2217
+ }
2218
+ /**
2219
+ * Information about the calibration laboratory.
2220
+ * @interface CalibrationLaboratoryType
2221
+ * @property {string} [calibrationLaboratoryCode] - Optional code of the calibration laboratory.
2222
+ * @property {ContactType} contact - Contact information about the calibration laboratory.
2223
+ */
2224
+ interface CalibrationLaboratoryType {
2225
+ calibrationLaboratoryCode?: string;
2226
+ contact: ContactType;
2227
+ cryptElectronicSeal?: boolean;
2228
+ cryptElectronicSignature?: boolean;
2229
+ cryptElectronicTimeStamp?: boolean;
2230
+ }
2231
+
2232
+ interface ICertificateOfAccreditation {
2233
+ "@id": string;
2234
+ "@context"?: string | Array<string>;
2235
+ signatures?: Array<ISignatureRS>;
2236
+ }
2237
+
2238
+ interface IDigitalCertificateOfCompliance {
2239
+ "@id": string;
2240
+ "@context"?: string | Array<string>;
2241
+ signatures?: Array<ISignatureRS>;
2242
+ }
2243
+
2244
+ interface ISAFEXMLEVSEContext {
2245
+ "@id": string;
2246
+ description?: IMultilanguageText;
2247
+ meters: Array<IMeter>;
2248
+ connector?: IConnector$1 & {
2249
+ "@id"?: string;
2250
+ };
2251
+ }
2252
+ interface ISAFEXMLChargingStationInfo {
2253
+ "@id": string;
2254
+ description?: IMultilanguageText;
2255
+ firmwareVersion?: string;
2256
+ softwareVersion?: string;
2257
+ geoLocation?: IGeoLocation;
2258
+ EVSE?: ISAFEXMLEVSEContext;
2259
+ }
2260
+ interface ISAFEXMLChargingStationContext {
2261
+ ChargingStationId?: string;
2262
+ EVSEId?: string;
2263
+ chargingStation?: ISAFEXMLChargingStationInfo;
2264
+ EVSE?: ISAFEXMLEVSEContext;
2265
+ connector?: IConnector$1 & {
2266
+ "@id"?: string;
2267
+ };
2268
+ }
2269
+ declare class SAFEXML {
2270
+ private readonly chargy;
2271
+ constructor(chargy: Chargy);
2272
+ static ParseChargingStationContext(XMLDocument: Document): ISAFEXMLChargingStationContext;
2273
+ tryToParseSAFEXML(XMLDocument: Document): Promise<IChargeTransparencyRecord | ISessionCryptoResult>;
2274
+ }
2275
+
2276
+ declare class XMLContainer {
2277
+ private readonly chargy;
2278
+ constructor(chargy: Chargy);
2279
+ tryToParseXMLContainer(XMLDocument: Document): IChargeTransparencyRecord | ISessionCryptoResult;
2280
+ }
2281
+
2282
+ declare class ChargeIT {
2283
+ private readonly chargy;
2284
+ constructor(chargy: Chargy);
2285
+ private bufferToHex;
2286
+ private bufferToNumber;
2287
+ TryToParseOldChargeITMeterValuesFormat(CTR: IChargeTransparencyRecord, evseId: string, address: JSONObject, geoLocation: JSONObject, signedMeterValues: Array<unknown>): IChargeTransparencyRecord | ISessionCryptoResult;
2288
+ TryToParseChargeITContainerFormat(SomeJSON: unknown): IChargeTransparencyRecord | ISessionCryptoResult;
2289
+ }
2290
+
2291
+ type IChargepointChargeTransparencyRecord = IChargeTransparencyRecord;
2292
+ declare class ChargePoint {
2293
+ private readonly chargy;
2294
+ constructor(chargy: Chargy);
2295
+ TryToParseChargepointFormat(SomeJSON: unknown): IChargeTransparencyRecord | ISessionCryptoResult;
2296
+ }
2297
+ interface IChargepointMeasurementValue extends IMeasurementValue {
2298
+ statusMeter: string;
2299
+ secondsIndex: number;
2300
+ paginationId: string;
2301
+ logBookIndex: string;
2302
+ }
2303
+ interface IChargePointCrypt01Result extends ICryptoResult {
2304
+ sha256value?: string;
2305
+ meterId?: string;
2306
+ meter?: IMeter;
2307
+ timestamp?: string;
2308
+ infoStatus?: string;
2309
+ secondsIndex?: string;
2310
+ paginationId?: string;
2311
+ obis?: string;
2312
+ unitEncoded?: string;
2313
+ scale?: string;
2314
+ value?: string;
2315
+ logBookIndex?: string;
2316
+ authorizationStart?: string;
2317
+ authorizationStop?: string;
2318
+ authorizationStartTimestamp?: string;
2319
+ publicKey?: string;
2320
+ publicKeyFormat?: string;
2321
+ publicKeySignatures?: Array<unknown>;
2322
+ signature?: ISignatureRS;
2323
+ }
2324
+ declare class ChargePointCrypt01 extends ACrypt {
2325
+ constructor(chargy: Chargy);
2326
+ VerifyChargingSession(chargingSession: IChargingSession): Promise<ISessionCryptoResult>;
2327
+ VerifyMeasurement(measurementValue: IChargepointMeasurementValue): Promise<IChargePointCrypt01Result>;
2328
+ ViewMeasurement(measurementValue: IChargepointMeasurementValue, errorDiv: HTMLDivElement, introDiv: HTMLDivElement, infoDiv: HTMLDivElement, PlainTextDiv: HTMLDivElement, HashedPlainTextDiv: HTMLDivElement, PublicKeyDiv: HTMLDivElement, SignatureExpectedDiv: HTMLDivElement, SignatureCheckDiv: HTMLDivElement): Promise<Error | undefined>;
2329
+ }
2330
+
2331
+ type QRImageData = {
2332
+ data: Uint8ClampedArray;
2333
+ width: number;
2334
+ height: number;
2335
+ };
2336
+ declare function readQRCodeTextFromImage(data: ArrayBuffer | Uint8Array, mimeType?: string): Promise<string | undefined>;
2337
+ declare function readQRCodeTextFromImageData(imageData: QRImageData): string | undefined;
2338
+
2339
+ /**
2340
+ * Extracts the per-session verification results from a verified Charge Transparency
2341
+ * Record. When the record carries no usable session results, a single "no charge
2342
+ * transparency records found" result is returned instead.
2343
+ *
2344
+ * This is exactly the payload the renderer hands to the main process (and, in
2345
+ * --nogui / HTTP mode, to the CLI verification service) after a verification. It
2346
+ * is kept here as a pure, DOM-free function so the renderer (ChargyApp), the main
2347
+ * process and the tests can all share the very same logic instead of mirroring it.
2348
+ *
2349
+ * The "no records found" message is passed in so the renderer can localize it,
2350
+ * while non-UI callers (CLI service, tests) get a sensible English default.
2351
+ */
2352
+ declare function toSessionVerificationResults(CTR: IChargeTransparencyRecord, noRecordsMessage?: string): ISessionCryptoResult[] | ISessionCryptoResult;
2353
+
2354
+ export { ACrypt, type AdministrativeDataType, Alfen, AlfenCrypt01, BSMCrypt01, type ByteDataType, type CalibrationLaboratoryType, CanonicalJSONError, ChargeIT, ChargePoint, ChargePointCrypt01, IChargeTransparencyLiveLink$1 as ChargeTransparencyLiveLink, ChargeTransparencyLiveLinkContext, IChargeTransparencyRecord$1 as ChargeTransparencyRecord, Chargy, chargyInterfaces as ChargyInterfaces, type CheckMeterPublicKeySignatureFunc, Clone, CloneCTR, ConcatenateBuffers, type ContactNotStrictType, type ContactType, type CoreDataType, CreateDiv, CreateDiv2, CryptoAlgorithms, CryptoHashAlgorithms, type DataType, DayOfWeek, DisplayPrefixes, EMHCrypt01, type EllipticCurve, type EllipticKeyPair, type EquipmentClassType, type FormulaType, GDFCrypt01, type GetChargingPoolFunc, type GetChargingStationFunc, type GetEVSEFunc, type GetMeterFunc, type HashType, type I18NDictionary, type IAddress, type IAlfenChargeTransparencyRecord, type IAlfenChargingSession, type IAlfenCrypt01Result, type IAlfenMeasurement, type IAlfenMeasurementValue, type IAuthorization, type IBSMCrypt01Result, type IBSMMeasurementValue, type ICalibration, type ICertificateOfAccreditation, type IChargePointCrypt01Result, type IChargeTransparencyLiveLink, type IChargeTransparencyRecord, type IChargepointChargeTransparencyRecord, type IChargepointMeasurementValue, type IChargingCosts, type IChargingPeriod, type IChargingPool, type IChargingProduct, type IChargingProductRelevance, type IChargingSession, type IChargingStation, type IChargingStationOperator, type IChargingTariff, type IChargingTariffElement, type IConformity, type IConnector$1 as IConnector, type IContact, type IContract, type ICost, type ICryptoHashes, type ICryptoResult, type IDCCStringWithLangType, type IDigitalCalibrationCertificate, type IDigitalCertificateOfCompliance, type IDisplayText, IECCurves, type IEMHCrypt01Result, type IEMHMeasurementValue, type IEMobilityProvider, type IEVSE, IEncoding, type IExtendedFileInfo, type IFileInfo, type IFlatCost, type IGDFCrypt01Result, type IGDFMeasurementValue, type IGeoLocation, type IKeyInfo, type ILegalCompliance, type IMeasurement, type IMeasurementValue, type IMeasurements, type IMediationService, type IMennekesBilling, type IMennekesChargingProcess, type IMennekesChargyMeasurement, type IMennekesCrypt01Result, type IMennekesMeasurement, type IMennekesMeasurementValue, type IMeter, type IMultilanguageText, type IOCMFAuthorization, type IOCMFCTRExtensions, type IOCMFChargeTransparencyRecord, type IOCMFChargingSession, type IOCMFJSONDocument, type IOCMFLossCompensation, type IOCMFMeasurement, type IOCMFMeasurementValue, type IOCMFPayload, type IOCMFReading, type IOCMFSignature, type IOCMFv1_0MeasurementValue, type IOCMFv1_0Result, type IOIDInfo, type IPCDFChargeTransparencyRecord, type IPCDFChargingSession, type IPCDFCrypt01Result, type IPCDFDocument, type IPCDFMeasurement, type IPCDFMeasurementValue, type IPCDFRawFields, type IPCDFSessionInfo, type IPCDFValidatedData, type IParking, type IParkingTariff, type IPriceComponent, type IPrivacy, type IPublicKey, type IPublicKeyInfo, type IPublicKeyLookup, type IPublicKeyXY, type IPublicKeysignature, type IResult, type ISAFEXMLChargingStationContext, type ISAFEXMLChargingStationInfo, type ISAFEXMLEVSEContext, type ISessionCryptoResult, type ISignature, type ISignatureInfos, type ISignatureRS, type ISupport, type ITariffRestriction, type ITaxes, type ITransparencyInfos, type ITransparencySoftware, type ITransport, type ITransportURL, type IVersion, type IVersionPackage, type IVersionSignature, type IVersions, type IdentificationType, type InfluenceConditionType, InformationRelevance, InformationRelevanceToString, IsAChargeTransparencyLiveLink, IsAChargeTransparencyRecord, IsAPublicKeyInfo, IsAPublicKeyLookup, IsASessionCryptoResult, IsNullOrEmpty, type IssueReportPayload, type ItemType, type JSONLDObject, type JSONMessage, type JSONMessageSignaturesVerificationResult, type JSONObject, type JSONSignature, type JSONSignatureVerificationResult, JSONSignatureVerificationStatus, type ListType, type LocationType, MENNEKES_EDL40_OBIS, MENNEKES_EDL40_XMLNS, type MeasurementResultType, type MeasuringEquipmentType, Mennekes, MennekesCrypt01, OBIS2Hex, OBIS2MeasurementName, OBIS_RegExpr, OCMF, OCMFTransactionTypes, OCMFv1_x, OCPI, PCDF, PCDFCrypt01, type PCDFFieldKey, PCDFParseError, PCDFValidationError, PCDF_FIELD_ORDER, PCDF_PREFIX, ParseJSON_LD, type PerformanceLocationType, type PositionCoordinatesType, type PrimitiveQuantityType, PublicKeyFormats, IPublicKeyInfo$1 as PublicKeyInfo, type QuantityType, type RealQuantityType, type RefTypeDefinitionType, type ReportAmendedSubstitutedType, type RespPersonType, type ResultType, type RichContentType, SAFEXML, SessionVerificationResult, SetHex, SetInt8, SetText, SetText_withLength, SetTimestamp, SetTimestamp32, SetUInt32, SetUInt32_withCode, SetUInt64, SetUInt64D, type ShowPKIDetailsFunction, type SignJSONMessageOptions, SignMessage, SignatureFormats, type SignedJSONMessage, type SoftwareType, type StatementMetaDataType, type String, type TOTPConfig, type TarInfo, TimeStatusTypes, type Transport, type TransportHTTPS, type TransportHTTPSSE, type TransportWebsocket, UTC2human, type UsedMethodType, VerificationResult, VerifyJSONMessageSignatures, WhenNullOrEmpty, XMLContainer, type XMLType, asJSONArray, asJSONObject, asNumber, asString, buf2hex, buildMennekesSignatureData, bytesToHex, canonicalJSONBytes, canonicalJSONStringify, cleanHex, closeFullscreen, createHexString, dateToMennekesLocalEpochSeconds, extractMennekesChargingProcesses, firstKey, firstValue, getDirectChildByLocalName, getDirectChildrenByLocalName, getElementsByLocalName, getInt16Bytes, getInt32Bytes, getInt64Bytes, getInt8Bytes, getTrimmedTextContent, hashFile, hex2bin, hex32, hexToArrayBuffer, hexToBytes, intFromBytes, isGeoLocation, isICryptoResult, isIFileInfo, isIPublicKeyXY, isISessionCryptoResult1, isISessionCryptoResult2, isJSONLDObject, isMandatoryArrayOfStrings, isMandatoryBoolean, isMandatoryDecimal, isMandatoryJSONArray, isMandatoryJSONObject, isMandatoryNumber, isMandatoryString, isMandatoryURL, isMultilanguageText, isOIDInfo, isObject, isOptionalArrayOfStrings, isOptionalDecimal, isOptionalJSONArray, isOptionalJSONArrayError, isOptionalJSONArrayOk, isOptionalJSONObject, isOptionalNumber, isOptionalString, isOptionalURL, isPCDFText, isString, isStringArray, isStringOrOIDInfo, isStringOrStringArray, jsonPrettyPrinter, measurementName2human, normalizePCDFPublicKeyHex, normalizeXMLText, openFullscreen, pad, parseAndVerifyJSONSignatures, parseDescription, parseHexString, parseMennekesXMLDocument, parseNumber, parseOBIS, parsePCDFDocument, parsePCDFPublicKey, parsePCDFSignature, parseUTC, readQRCodeTextFromImage, readQRCodeTextFromImageData, secp224k1, setUILocale, sha256, sha384, sha512, signJSONMessage, signMessage, stripPCDFControlCharacters, time2human, toArrayBuffer, toSessionVerificationResults, toUint8Array, unquotePCDFText, validatePCDFFields, verifyJSONMessageSignatureResults, verifyJSONMessageSignatures, verifyJSONSignature, verifyJSONSignatureResult, verifyPCDFDocument };