import { type KeyFactsAnswer } from "./key-facts-client.ts";
import { type CustodyRoleArns, type KeyPolicyKind, type KeyPolicyTemplate } from "./key-policy-template.ts";
import type { ServiceKeyEntry } from "./roster-entries.ts";
import type { VerifierKeyPin } from "./signed-statement.ts";
export type CustodyRole = keyof CustodyRoleArns;
export interface PinnedCustodyInfra {
    readonly custodyAccountIds: readonly string[];
    /** Exact ARN prefix up to the account component, e.g. `arn:aws:kms:us-east-1:`. */
    readonly arnNamespace: string;
    readonly roleNames: Readonly<Record<CustodyRole, readonly string[]>>;
    readonly templates: Readonly<Record<number, KeyPolicyTemplate>>;
    /** Transport only, never a trust anchor (15.10); `undefined` until the verifier is deployed. */
    readonly keyFactsEndpoint: string | undefined;
    /** The verifier signing keys this release trusts (three consecutive generations once minted, 15.15 M-2). */
    readonly keyFactsVerifierKeys: readonly VerifierKeyPin[];
}
export declare const PINNED_CUSTODY_INFRA: {
    readonly custodyAccountIds: readonly [];
    readonly arnNamespace: "arn:aws:kms:us-east-1:";
    readonly roleNames: {
        readonly runtime: readonly ["custody-runtime"];
        readonly registrySigner: readonly ["registry-signer"];
        readonly provisioning: readonly ["custody-provisioning"];
        readonly reader: readonly ["key-facts-reader"];
        readonly breakglass: readonly ["custody-breakglass"];
    };
    readonly templates: {
        readonly 1: {
            readonly render: ({ keyKind, roles }: {
                readonly accountId: string;
                readonly keyKind: KeyPolicyKind;
                readonly roles: CustodyRoleArns;
            }) => string;
        };
    };
    readonly keyFactsEndpoint: undefined;
    readonly keyFactsVerifierKeys: readonly [];
};
export type ServiceKeyCheckReason = "ok" | "template-unknown" | "facts-unknown" | "facts-stale" | "shape" | "arn" | "arn-namespace" | "account-not-pinned" | "key-usage" | "key-property" | "spki" | "principal-id" | "role-outside-pins" | "policy";
export interface ServiceKeyCheck {
    readonly result: "ok" | "mismatch" | "unknown";
    readonly reason: ServiceKeyCheckReason;
    /** The device notice for this outcome, when the user can act on it. */
    readonly notice?: string;
}
export declare function roleArn(accountId: string, roleName: string): string;
export interface ServiceKeyCheckOptions {
    /** Wall-clock now (ms since epoch) used for the facts' age. */
    readonly now: number;
    readonly pinned?: PinnedCustodyInfra;
}
/** `facts` maps each of `entry.kmsKeyArns` to the verifier's answer for exactly that ARN. */
export declare function checkServiceKeyDetailed(entry: ServiceKeyEntry, facts: ReadonlyMap<string, KeyFactsAnswer>, options: ServiceKeyCheckOptions): ServiceKeyCheck;
export declare function checkServiceKey(entry: ServiceKeyEntry, facts: ReadonlyMap<string, KeyFactsAnswer>, options: ServiceKeyCheckOptions): "ok" | "mismatch" | "unknown";
//# sourceMappingURL=pinned-infra.d.ts.map