import type { FasedAgentConfig } from "../config/types.fased.js";
export type WalletApprovalAuthMode = "none" | "webauthn";
export type WalletPasskeyMetadata = {
    id: string;
    label: string;
    createdAt: string;
    lastUsedAt?: string;
};
export declare function resolveWalletApprovalAuthMode(env?: NodeJS.ProcessEnv, cfg?: FasedAgentConfig): WalletApprovalAuthMode;
export declare function resolveWalletApprovalChallengeTtlSeconds(env?: NodeJS.ProcessEnv, cfg?: FasedAgentConfig): number;
export declare function resolveWalletApprovalGrantTtlSeconds(env?: NodeJS.ProcessEnv, cfg?: FasedAgentConfig): number;
export type WalletApprovalAuthSnapshot = {
    mode: WalletApprovalAuthMode;
    passkeyCount: number;
    ready: boolean;
    notes: string[];
    passkeys: WalletPasskeyMetadata[];
    statePath: string;
};
export declare function readWalletApprovalAuthSnapshot(env?: NodeJS.ProcessEnv, cfg?: FasedAgentConfig): WalletApprovalAuthSnapshot;
export declare function beginWalletPasskeyRegistration(params: {
    host: string;
    label?: string;
    env?: NodeJS.ProcessEnv;
    cfg?: FasedAgentConfig;
}): {
    ok: false;
    code: string;
    message: string;
    challengeId?: undefined;
    challengeTtlSeconds?: undefined;
    options?: undefined;
} | {
    ok: true;
    challengeId: string;
    challengeTtlSeconds: number;
    options: {
        challenge: string;
        rp: {
            id: string;
            name: string;
        };
        user: {
            id: string;
            name: string;
            displayName: string;
        };
        pubKeyCredParams: {
            type: "public-key";
            alg: number;
        }[];
        timeoutMs: number;
        attestation: "none";
        authenticatorSelection: {
            residentKey: "preferred";
            userVerification: "required";
        };
        excludeCredentialIds: string[];
    };
    code?: undefined;
    message?: undefined;
};
export declare function finishWalletPasskeyRegistration(params: {
    host: string;
    challengeId: string;
    credentialId: string;
    clientDataJSON: string;
    authenticatorData: string;
    publicKeySpki: string;
    publicKeyAlgorithm: number;
    transports?: string[];
    env?: NodeJS.ProcessEnv;
    cfg?: FasedAgentConfig;
}): {
    ok: false;
    code: string;
    message: string;
    passkey?: undefined;
    snapshot?: undefined;
} | {
    ok: true;
    passkey: {
        id: string;
        label: string;
        createdAt: string;
        lastUsedAt: string | undefined;
    };
    snapshot: WalletApprovalAuthSnapshot;
    code?: undefined;
    message?: undefined;
};
export declare function beginWalletApprovalAssertion(params: {
    host: string;
    operation: string;
    requestId?: string;
    env?: NodeJS.ProcessEnv;
    cfg?: FasedAgentConfig;
}): {
    ok: false;
    code: string;
    message: string;
    challengeId?: undefined;
    challengeTtlSeconds?: undefined;
    options?: undefined;
} | {
    ok: true;
    challengeId: string;
    challengeTtlSeconds: number;
    options: {
        challenge: string;
        rpId: string;
        timeoutMs: number;
        userVerification: "required";
        allowCredentialIds: string[];
    };
    code?: undefined;
    message?: undefined;
};
export declare function finishWalletApprovalAssertion(params: {
    host: string;
    challengeId: string;
    credentialId: string;
    clientDataJSON: string;
    authenticatorData: string;
    signature: string;
    env?: NodeJS.ProcessEnv;
    cfg?: FasedAgentConfig;
}): {
    ok: false;
    code: string;
    message: string;
    approvalToken?: undefined;
    expiresAt?: undefined;
    ttlSeconds?: undefined;
    operation?: undefined;
    requestId?: undefined;
} | {
    ok: true;
    approvalToken: string;
    expiresAt: string;
    ttlSeconds: number;
    operation: string;
    requestId: string | undefined;
    code?: undefined;
    message?: undefined;
};
export declare function consumeWalletApprovalGrant(params: {
    host: string;
    operation: string;
    requestId?: string;
    token: string;
    env?: NodeJS.ProcessEnv;
    cfg?: FasedAgentConfig;
}): {
    ok: true;
    code?: undefined;
    message?: undefined;
} | {
    ok: false;
    code: string;
    message: string;
};
export declare function listWalletPasskeys(env?: NodeJS.ProcessEnv, cfg?: FasedAgentConfig): WalletPasskeyMetadata[];
export declare function removeWalletPasskey(params: {
    credentialId: string;
    env?: NodeJS.ProcessEnv;
    cfg?: FasedAgentConfig;
}): {
    ok: false;
    code: string;
    message: string;
    passkey?: undefined;
    snapshot?: undefined;
} | {
    ok: true;
    passkey: {
        id: string;
        label: string;
        createdAt: string;
        lastUsedAt: string | undefined;
    };
    snapshot: WalletApprovalAuthSnapshot;
    code?: undefined;
    message?: undefined;
};
export declare function createWalletApprovalChallenge(params?: {
    requestId?: string;
    operation?: string;
    ttlSeconds?: number;
    host?: string;
    env?: NodeJS.ProcessEnv;
    cfg?: FasedAgentConfig;
}): {
    ok: false;
    code: string;
    message: string;
    challengeId?: undefined;
    challengeTtlSeconds?: undefined;
    options?: undefined;
} | {
    ok: true;
    challenge: {
        id: string;
        challenge: string;
        requestId: string | undefined;
        operation: string;
        createdAt: string;
        expiresAt: string;
        status: "pending";
    };
    challengeTtlSeconds: number;
};
