import { Buffer } from "node:buffer"; import { StringDict } from "./stringDict.js"; /** * Local response loaded from a file. * Note: Has to be initialized through init() before use. */ export declare abstract class BaseLocalResponse { private fileBytes; private readonly inputHandle; /** * Whether the local response payload has been loaded. */ protected initialized: boolean; /** * Creates an instance of LocalResponse. */ constructor(inputFile: Buffer | string); /** * Loads the local payload from a string, buffer, or file path. */ init(): Promise; /** * Returns the dictionary representation of the file. * @returns A JSON-like object. */ asDict(): Promise; /** * Returns the HMAC signature of the local response from the secret key provided. * @param secretKey - Secret key, either a string or a byte/byte array. * @returns The HMAC signature of the local response. */ getHmacSignature(secretKey: string | Buffer | Uint8Array): string; /** * Checks if the HMAC signature of the local response is valid. * @param secretKey - Secret key, either a string or a byte/byte array. * @param signature - The signature to be compared with. * @returns True if the HMAC signature is valid. */ isValidHmacSignature(secretKey: string | Buffer | Uint8Array, signature: string): boolean; /** * Print the file as a UTF-8 string. */ toString(): string; }