import type { FasedAgentConfig } from "../config/config.js";
import type { WalletProviderId } from "../config/types.wallet.js";
import { type WalletApprovalDiff, type WalletPolicySimulation } from "./wallet-policy-simulation.js";
import { type ResolvedWalletRuntimeConfig } from "./wallet-runtime-config.js";
export type WalletSendApprovalStatus = "pending" | "approved" | "rejected" | "executed" | "failed" | "expired";
export type WalletSendApprovalPayload = {
    chain: "solana";
    actionKind?: "send" | "solana_swap";
    assetId?: string;
    assetSymbol?: string;
    assetName?: string;
    assetDecimals?: number;
    amountDisplay?: string;
    walletHandle?: string;
    to?: string;
    amount?: string;
    contract?: string;
    program?: string;
    memo?: string;
    inputMint?: string;
    outputMint?: string;
    inputSymbol?: string;
    outputSymbol?: string;
    inputName?: string;
    outputName?: string;
    inputDecimals?: number;
    outputDecimals?: number;
    inputLogoUri?: string;
    outputLogoUri?: string;
    outAmount?: string;
    outAmountDisplay?: string;
    otherAmountThreshold?: string;
    slippageBps?: number;
    priceImpactPct?: string;
    routeLabel?: string;
    jupiterRequestId?: string;
    serializedTxBase64?: string;
    providerId?: WalletProviderId;
    walletId?: string;
    walletName?: string;
};
export type WalletSettlementContext = {
    taskId: string;
    invoiceId?: string;
    senderHandle?: string;
};
export type WalletSendApprovalRequest = {
    id: string;
    taskLedgerId?: string;
    createdAt: string;
    expiresAt: string;
    status: WalletSendApprovalStatus;
    requestedBy: string;
    approvedBy?: string;
    rejectedBy?: string;
    decisionAt?: string;
    reason?: string;
    payload: WalletSendApprovalPayload;
    simulation?: WalletPolicySimulation;
    approvalDiff?: WalletApprovalDiff;
    result?: {
        txHash?: string;
        error?: string;
    };
};
export declare function sanitizeWalletSendApprovalPayload(payload: WalletSendApprovalPayload): WalletSendApprovalPayload & {
    hasSerializedTx?: boolean;
};
export declare function sanitizeWalletSendApprovalRequest(request: WalletSendApprovalRequest): WalletSendApprovalRequest;
export type WalletCreateSendResult = {
    ok: true;
    mode: "manual";
    request: WalletSendApprovalRequest;
} | {
    ok: true;
    mode: "autonomous";
    tx: {
        ok: boolean;
        chain: "solana";
        txHash: string;
        signer?: string;
    };
    payload: WalletSendApprovalPayload;
    requestId?: string;
} | {
    ok: false;
    code: string;
    message: string;
    requestId?: string;
    simulation?: WalletPolicySimulation;
};
export type WalletSendPath = "policy" | "reviewed" | "automation";
export declare function createWalletSendApprovalRequest(params: {
    payload: WalletSendApprovalPayload;
    requestedBy?: string;
    settlementContext?: WalletSettlementContext;
    simulation?: WalletPolicySimulation;
    approvalDiff?: WalletApprovalDiff;
    env?: NodeJS.ProcessEnv;
}): WalletSendApprovalRequest;
export declare function createOrExecuteWalletSend(params: {
    payload: WalletSendApprovalPayload;
    requestedBy?: string;
    config: ResolvedWalletRuntimeConfig;
    runtimeConfig?: FasedAgentConfig;
    sendPath?: WalletSendPath;
    providerIdOverride?: WalletProviderId;
    settlementContext?: WalletSettlementContext;
    approvalToken?: string;
    approvalHost?: string;
    custodyDeviceShare?: string;
    env?: NodeJS.ProcessEnv;
}): Promise<WalletCreateSendResult>;
export declare function listWalletSendApprovalRequests(params?: {
    env?: NodeJS.ProcessEnv;
    limit?: number;
    status?: WalletSendApprovalStatus | "all";
}): WalletSendApprovalRequest[];
export declare function approveWalletSendRequest(params: {
    requestId: string;
    actor?: string;
    config: ResolvedWalletRuntimeConfig;
    providerIdOverride?: WalletProviderId;
    approvalHost?: string;
    env?: NodeJS.ProcessEnv;
}): Promise<{
    ok: false;
    code: string;
    message: string;
    request?: undefined;
    tx?: undefined;
} | {
    ok: false;
    code: string;
    message: string;
    request: WalletSendApprovalRequest;
    tx?: undefined;
} | {
    ok: true;
    request: WalletSendApprovalRequest;
    tx: import("./wallet-provider-adapter.js").WalletProviderSendTxResult;
    code?: undefined;
    message?: undefined;
}>;
export declare function rejectWalletSendRequest(params: {
    requestId: string;
    actor?: string;
    reason?: string;
    env?: NodeJS.ProcessEnv;
}): {
    ok: false;
    code: string;
    message: string;
    request?: undefined;
} | {
    ok: false;
    code: string;
    message: string;
    request: WalletSendApprovalRequest;
} | {
    ok: true;
    request: WalletSendApprovalRequest;
    code?: undefined;
    message?: undefined;
};
