/// <reference types="node" />
/// <reference types="node" />
import { StorageAccess } from "@super-protocol/sdk-js";
import { Transform } from "stream";
import { SNPReport } from "../proto/AmdSevSnp";
interface VMCommon {
    kernelHash: Buffer;
    initrdHash: Buffer | undefined;
}
interface VMConfig extends VMCommon {
    ovmfHash: Buffer;
    ovmfBucket: string;
    ovmfPrefix: string;
    ovmfFilename: string;
}
interface VMMeasure extends VMCommon {
    ovmfFilePath: string;
}
export interface SNPMrEnclaveCalculatorArgs {
    cacheFolder?: string;
    rmPrevCache?: boolean;
    vmRepoOwner?: string;
    vmRepo?: string;
    releaseAsset?: string;
    downloadAssetRetryInterval?: number;
    downloadAssetRetryMax?: number;
    storageAccess?: StorageAccess;
    cacheRecordsTTL?: number;
}
export declare class SNPMrEnclaveCalculator {
    private readonly cacheFolder;
    private readonly vmRepoOwner;
    private readonly vmRepo;
    private readonly releaseAsset;
    private readonly axiosInstance;
    private readonly retryInterval;
    private readonly retryMax;
    private readonly storageAccess;
    private readonly vmInfoCache;
    private readonly defaultCredentials;
    constructor(config: SNPMrEnclaveCalculatorArgs);
    /**
     * The method allows to obtain expected mrenclave if the virtual machine for which the report is
     * submitted was running on one core and a Milan processor
     * @param report - @see CalcSnpMrEnclaveParams
     */
    getSingleCoreMrEnclave(report: SNPReport): Promise<Buffer>;
    protected downloadAsset(assetUrl: string): Promise<Buffer>;
    protected extractVMData(data: Buffer): VMConfig;
    protected static calcHashStream(alg?: string): {
        process: Transform;
        get: () => Buffer;
    };
    protected static fileExist(filePath: string): Promise<boolean>;
    protected getAssetUrl(build: string): Promise<string>;
    protected downloadVM(build: string): Promise<VMMeasure>;
    protected downloadOvmf(vmFiles: VMConfig, ovmfPath: string): Promise<void>;
}
export {};
