import type { BootstrapConfig, IFileStorage, SystemConfig } from '@citrineos/base'; import { OCPP2_0_1 } from '@citrineos/base'; import type { ILogObj } from 'tslog'; import { Logger } from 'tslog'; /** * Util to process and validate signed meter values. */ export declare class SignedMeterValuesUtil { private readonly _fileStorage; private readonly _logger; private readonly _chargingStationSecurityInfoRepository; private readonly _signedMeterValuesConfiguration; /** * @param {IFileStorage} [fileStorage] - The `fileStorage` allows access to the configured file storage. * * @param {BootstrapConfig & SystemConfig} config - The `config` contains the current system configuration settings. * * @param {Logger} [logger] - The `logger` represents an instance of {@link Logger}. * */ constructor(fileStorage: IFileStorage, config: BootstrapConfig & SystemConfig, logger: Logger); /** * Checks the validity of a meter value. * * If a meter value is unsigned, it is valid. * * If a meter value is signed, it is valid if: * - SignedMeterValuesConfig is configured * AND * - The incoming signed meter value's signing method matches the configured signing method * AND * - The incoming signed meter value's public key is empty but there is a public key stored for that charging station * OR * - The incoming signed meter value's public key isn't empty and it matches the configured public key * * @param stationId - The charging station the meter values belong to * @param meterValues - The list of meter values */ validateMeterValues(tenantId: number, stationId: string, meterValues: [OCPP2_0_1.MeterValueType, ...OCPP2_0_1.MeterValueType[]]): Promise; private validateSignedSampledValue; private validateSignedMeterValueSignature; private validateRsaSignature; private formatKey; }