import { type KeyObject } from "node:crypto";
import type { Duplex } from "node:stream";
export interface PresenterEnrollment {
    readonly type: "enroll";
    readonly version: 2;
    readonly purpose: "mcp_form";
    readonly publicKey: string;
    readonly installationKeyId: string;
    readonly backendGeneration: string;
    readonly launchRequestNonce: string;
    readonly launchKind: "initial" | "replacement";
    readonly predecessorHostInstance: string | null;
    readonly executionRealm: readonly ["native"] | readonly ["wsl", string, string];
    readonly environmentId: string;
}
export interface PresenterPrincipal {
    readonly id: string;
    readonly key: KeyObject;
    readonly enrollment: PresenterEnrollment;
}
/** A parsed `account_enroll` (D11): the same key binding as `enroll`, plus the issuer attestation. */
export interface AccountEnrollment {
    readonly key: KeyObject;
    readonly installationKeyId: string;
    readonly attestation: string;
}
/** Exact v1 account boundary. No additional fields can become unsigned authorization inputs. */
export declare function parseAccountEnrollment(value: unknown): AccountEnrollment | undefined;
/** The fixed tuple an account presenter signs; JSON.stringify of it is the canonical UTF-8 encoding. */
export declare function accountEnrollmentTranscript(hostInstance: string, hostAccount: string, claims: {
    readonly acc: string;
    readonly dev: string;
    readonly jti: string;
}, installationKeyId: string, nonce: string): string;
/** Exact v2 boundary. No additional fields can become unsigned authorization inputs. */
export declare function parsePresenterEnrollment(value: unknown): PresenterEnrollment | undefined;
/** JSON.stringify on this fixed primitive tuple is the canonical UTF-8 signed encoding. */
export declare function presenterEnrollmentTranscript(request: PresenterEnrollment, hostInstance: string, nonce: string): string;
/** One bootstrap opportunity per host incarnation, including failed or cancelled attempts. */
export declare class McpPresenterEnrollment {
    private started;
    private stream?;
    readonly nonces: Set<string>;
    private readonly hostInstance;
    private readonly endpoint;
    constructor(hostInstance: string, endpoint: string);
    bootstrap(stream: Duplex, enrolled: (principal: PresenterPrincipal) => void): void;
    dispose(): void;
}
//# sourceMappingURL=mcp-presenter-enrollment.d.ts.map