import { type JsonWebKey } from 'node:crypto';
import type { CliConfig } from '../lib/config.js';
/**
 * `keychain`: the private key lives in the macOS login Keychain, and only a
 * random account name is on disk, so a copied credentials directory, backup or
 * dotfiles repo carries no key. `software`: an Ed25519 key file next to the
 * tokens (Linux, Windows, or a Mac whose Keychain is unavailable at sign-in).
 */
export type KeyBinding = 'keychain' | 'software';
export interface DpopKey {
    readonly binding: KeyBinding;
    readonly publicJwk: JsonWebKey;
    sign(signingInput: string): Promise<string>;
    delete(): Promise<void>;
}
export declare function dpopKeyPath(config: Pick<CliConfig, 'configDir'>, binding?: KeyBinding): string;
export declare function loadDpopKey(config: Pick<CliConfig, 'configDir'>): Promise<DpopKey>;
/** Idempotent, under the shared credentials lock: concurrent logins must use the same key. */
export declare function createDpopKey(config: Pick<CliConfig, 'configDir'>): Promise<DpopKey>;
/** Call after revocation, while holding the credentials lock. */
export declare function deleteDpopKey(config: Pick<CliConfig, 'configDir'>): Promise<void>;
