import { Lender } from '@1delta/lender-registry';
import type { LenderDebitData, DebitData } from '@1delta/calldata-sdk';
import type { MulticallRpcBatch, PreparedCall, RawRpcCall } from '../../../utils/rpcCall';
import type { Call } from '../../../utils/multicall';
import type { LenderUserQuery } from '../../../types/lenderTypes';
import type { UserData } from '../utils/types';
export interface PermissionParams {
    chainId: string;
    account: string;
    subAccount?: string | null;
    lenders: Lender[];
    tokenAddressesByLender: Record<Lender, (string | undefined)[]>;
    spender: string;
    aaveV4PmCheck?: {
        spoke: string;
        gateway: string;
    };
    /** Silo: withdraw from protected (non-borrowable) collateral share token */
    siloIsProtected?: boolean;
    /**
     * Gearbox V3: BotListV3 contract address (resolved from
     * `AddressProviderV310`). Required when any lender is GEARBOX_V3 — passed
     * through to `prepareLenderDebitMulticall`.
     */
    gearboxBotList?: string;
}
export interface PermissionMeta {
    chainId: string;
    lenders: Lender[];
    metadata: {
        lender: Lender;
        tokens: string[];
    }[];
}
export interface TokenApprovalParams {
    chainId: string;
    tokenAddresses: string[];
    account: string;
    spenders: string[];
    tokenListForChain?: {
        list?: any;
    };
}
export interface TokenApprovalMeta {
    tokenAddresses: string[];
    spenders: string[];
    tokenListForChain?: {
        list?: any;
    };
}
/**
 * Caller-supplied validation call slotted into the merged multicall as a
 * fourth segment between the permission and balance calls. Results land
 * verbatim on `MergedUserData.extras` in input order — consumers decode
 * them with their own ABI knowledge. Used today for Fluid
 * `VaultFactory.ownerOf(nftId)` pre-flight ownership checks.
 */
export interface ExtraValidationCall {
    call: Call;
    abi: any;
}
export interface PreparedMergedRpcCalls {
    batches: MulticallRpcBatch[];
    preparedCalls: PreparedCall[];
    rpcCalls: RawRpcCall[];
    /** Number of token approval calls — first split point */
    tokenApprovalCallCount: number;
    /** Number of lender permission calls — second split point */
    permissionCallCount: number;
    /** Number of caller-supplied extra validation calls — third split point */
    extraCallCount: number;
    tokenApprovalMeta: TokenApprovalMeta;
    permissionMeta: PermissionMeta;
    balanceQueries: LenderUserQuery[];
}
export interface PreparedMergedMulticallParams {
    /** Flat calls array: [...tokenApprovalCalls, ...permissionCalls, ...extraCalls, ...balanceCalls] */
    calls: Call[];
    /** Per-call ABI array, same length as calls */
    abis: any[];
    /** Number of token approval calls — first split point */
    tokenApprovalCallCount: number;
    /** Number of lender permission calls — second split point */
    permissionCallCount: number;
    /** Number of caller-supplied extra validation calls — third split point */
    extraCallCount: number;
    tokenApprovalMeta: TokenApprovalMeta;
    permissionMeta: PermissionMeta;
    balanceQueries: LenderUserQuery[];
}
export interface MergedUserData {
    tokenApprovals: Record<string, DebitData>;
    permissions: Record<string, LenderDebitData>;
    balances: {
        [lender: string]: UserData;
    };
    /** Raw decoded results for each caller-supplied extra call, in input order. */
    extras: any[];
}
//# sourceMappingURL=types.d.ts.map