import type { FasedAgentConfig } from "../config/config.js";
import { type ResolvedWalletRuntimeConfig } from "./wallet-runtime-config.js";
export type WalletRolePolicyProfile = {
    role: "mining" | "agent" | "vault";
    label: "Mining" | "Agent" | "Vault";
    summary: string;
    defaults: {
        capsEnabled: boolean;
        directSigning: boolean;
        skillsEnabled: boolean;
        solana: {
            maxPerTx: string;
            maxDaily: string;
            allowPrograms: string[];
        };
    };
};
export type WalletPolicyPresetId = "recommended" | "read-only" | "manual-only" | "small-agent-spend" | "mining-only" | "skill-limited" | "trading-experimental";
export type WalletScopedPolicyPatch = {
    template?: WalletPolicyPresetId;
    capsEnabled?: boolean;
    directSigning?: boolean;
    skillsEnabled?: boolean;
    solanaAllowPrograms?: string[];
    solanaMaxPerTx?: string;
    solanaMaxDaily?: string;
    solanaTokenCaps?: Record<string, {
        maxPerTx?: string;
        maxDaily?: string;
    }>;
    recurringTransfer?: WalletRecurringTransferPolicyPatch | null;
};
export type WalletRecurringTransferPolicy = {
    enabled: boolean;
    chain: "solana";
    to: string;
    program?: string;
    amountMode: "fixed" | "percentage";
    amount?: string;
    percentage?: number;
    minAmount?: string;
    keepAmount?: string;
    schedule?: Record<string, unknown>;
    name?: string;
    updatedAt: string;
};
export type WalletRecurringTransferPolicyPatch = {
    enabled?: boolean;
    chain?: "solana";
    to?: string;
    program?: string;
    amountMode?: "fixed" | "percentage";
    amount?: string;
    percentage?: number;
    minAmount?: string;
    keepAmount?: string;
    schedule?: Record<string, unknown>;
    name?: string;
};
export declare function resolveWalletRoleForId(params: {
    walletId?: string;
    cfg?: FasedAgentConfig;
    env?: NodeJS.ProcessEnv;
}): "mining" | "agent" | "vault";
export declare function applyWalletPolicyConfig(params: {
    config: ResolvedWalletRuntimeConfig;
    cfg?: FasedAgentConfig;
    env?: NodeJS.ProcessEnv;
    walletId?: string;
}): ResolvedWalletRuntimeConfig;
export declare function upsertWalletPolicyConfig(params: {
    cfg: FasedAgentConfig;
    env?: NodeJS.ProcessEnv;
    walletId: string;
    patch: WalletScopedPolicyPatch;
}): {
    walletId: string;
    role: "mining" | "agent" | "vault";
    config: ResolvedWalletRuntimeConfig;
};
export declare function resolveWalletRolePolicyProfile(role: "mining" | "agent" | "vault", env?: NodeJS.ProcessEnv): WalletRolePolicyProfile;
export declare function isWalletToolAllowed(params: {
    config: ResolvedWalletRuntimeConfig;
    requesterAgentId: string | null;
    ownerAgentId: string;
    requesterSkillId?: string | null;
    requestSource?: string | null;
}): {
    ok: boolean;
    code?: string;
};
export declare function validateWalletTxPolicy(params: {
    config: ResolvedWalletRuntimeConfig;
    action: "prepare" | "send";
    requireDirectSigning?: boolean;
    chain: "solana";
    amount?: string;
    contract?: string;
    program?: string;
    skipNativeSolanaCaps?: boolean;
    requireSolanaTokenCap?: boolean;
}): {
    ok: boolean;
    code?: string;
    message?: string;
};
export declare function enforceWalletDailyCap(params: {
    config: ResolvedWalletRuntimeConfig;
    chain: "solana";
    amount?: string;
    program?: string;
    tokenMint?: string;
    walletId?: string;
    env?: NodeJS.ProcessEnv;
    skipNativeSolanaCaps?: boolean;
}): {
    ok: boolean;
    code?: string;
    message?: string;
    spentToday?: string;
    limit?: string;
};
export declare function checkWalletDailyCap(params: {
    config: ResolvedWalletRuntimeConfig;
    chain: "solana";
    amount?: string;
    program?: string;
    tokenMint?: string;
    walletId?: string;
    env?: NodeJS.ProcessEnv;
    skipNativeSolanaCaps?: boolean;
}): {
    ok: boolean;
    code?: string;
    message?: string;
    spentToday?: string;
    limit?: string;
};
export declare function resolveWalletPolicyConfig(cfg: FasedAgentConfig, env?: NodeJS.ProcessEnv, walletId?: string): ResolvedWalletRuntimeConfig;
export declare function resolveWalletRecurringTransferPolicy(params: {
    cfg: FasedAgentConfig;
    env?: NodeJS.ProcessEnv;
    walletId?: string;
}): WalletRecurringTransferPolicy | null;
