import type { WalletProviderId } from "../config/types.wallet.js";
export declare const WALLET_PROVIDER_IDS: WalletProviderId[];
export type WalletUserRole = "agent" | "vault" | "mining";
export type WalletNamedWallet = {
    id: string;
    name: string;
    providerId: WalletProviderId;
    addresses?: {
        solana?: string;
    };
    metadata?: Record<string, unknown>;
    createdAt: string;
    updatedAt: string;
};
export declare function normalizeWalletUserRole(value: unknown): WalletUserRole | undefined;
export declare function resolveWalletUserRole(wallet: WalletNamedWallet | undefined): WalletUserRole | undefined;
export type WalletProviderConfigEntry = {
    enabled: boolean;
    label?: string;
    updatedAt: string;
};
export type WalletProviderRegistry = {
    version: 1;
    providers: Record<WalletProviderId, WalletProviderConfigEntry>;
    wallets: WalletNamedWallet[];
    assignments: Record<string, string>;
    defaultWalletId?: string;
    updatedAt: string;
};
export type WalletDeletionMiningSafetyDetails = {
    runtimeStorePath: string;
    enabledWanted: boolean;
    workerEnabled: boolean;
    workerRunning: boolean;
    capitalFundedLamports: string;
    capitalLockedLamports: string;
    capitalFreeLamports: string;
    pendingCycleCount: number;
    claimBacklogCount: number;
    currentRunStartedAt: string | null;
};
export type WalletDeletionMiningSafetyResult = {
    ok: true;
    details: WalletDeletionMiningSafetyDetails | null;
} | {
    ok: false;
    code: "wallet_delete_blocked_mining";
    message: string;
    details: WalletDeletionMiningSafetyDetails;
};
export declare class WalletDeletionBlockedError extends Error {
    readonly code = "wallet_delete_blocked_mining";
    readonly details: WalletDeletionMiningSafetyDetails;
    constructor(message: string, details: WalletDeletionMiningSafetyDetails);
}
export declare function checkNamedWalletDeletionSafety(params: {
    walletId: string;
    env?: NodeJS.ProcessEnv;
}): WalletDeletionMiningSafetyResult;
export declare function assertNamedWalletDeletionSafe(params: {
    walletId: string;
    env?: NodeJS.ProcessEnv;
}): void;
export declare function readWalletProviderRegistry(env?: NodeJS.ProcessEnv): WalletProviderRegistry;
export declare function writeWalletProviderRegistry(registry: WalletProviderRegistry, env?: NodeJS.ProcessEnv): void;
export declare function setWalletProviderEnabled(params: {
    providerId: WalletProviderId;
    enabled: boolean;
    label?: string;
    env?: NodeJS.ProcessEnv;
}): WalletProviderRegistry;
export declare function setWalletProvidersEnabled(params: {
    enabledProviders: WalletProviderId[];
    env?: NodeJS.ProcessEnv;
}): WalletProviderRegistry;
export declare function upsertNamedWallet(params: {
    walletId?: string;
    name: string;
    providerId: WalletProviderId;
    addresses?: {
        solana?: string;
    };
    metadata?: Record<string, unknown>;
    env?: NodeJS.ProcessEnv;
}): WalletNamedWallet;
export declare function deleteNamedWallet(params: {
    walletId: string;
    protectedWalletIds?: string[];
    env?: NodeJS.ProcessEnv;
}): {
    removed: boolean;
    registry: WalletProviderRegistry;
};
export declare function setAgentWalletAssignment(params: {
    agentId: string;
    walletId?: string;
    env?: NodeJS.ProcessEnv;
}): WalletProviderRegistry;
export declare function setDefaultWallet(params: {
    walletId?: string;
    env?: NodeJS.ProcessEnv;
}): WalletProviderRegistry;
export declare function setNamedWalletRole(params: {
    walletId: string;
    role: WalletUserRole;
    env?: NodeJS.ProcessEnv;
}): WalletProviderRegistry;
export declare function resolveWalletSelectionForAgent(params: {
    agentId?: string;
    env?: NodeJS.ProcessEnv;
}): {
    walletId?: string;
    providerId?: WalletProviderId;
    walletName?: string;
};
export type WalletResolvedSelection = {
    walletId?: string;
    walletName?: string;
    providerId?: WalletProviderId;
    source: "explicit" | "fallback" | "none";
};
export declare function resolveWalletSelection(params: {
    walletId?: string;
    walletName?: string;
    providerId?: WalletProviderId;
    agentId?: string;
    env?: NodeJS.ProcessEnv;
}): WalletResolvedSelection;
