import type { Comment } from '@solidity-parser/parser/src/ast-types.js';
export interface ParsedContract {
    name: string;
    type: 'contract' | 'interface' | 'library' | 'abstract';
    lineStart: number;
    lineEnd: number;
    baseContracts: string[];
    functions: ParsedFunction[];
    modifiers: ParsedModifier[];
    events: string[];
    errors: string[];
    stateVariables: ParsedStateVariable[];
    structs: string[];
    enums: string[];
}
export interface ParsedFunction {
    name: string;
    visibility: 'external' | 'public' | 'internal' | 'private' | 'default';
    stateMutability: string | null;
    modifiers: string[];
    lineStart: number;
    lineEnd: number;
    isConstructor: boolean;
    isFallback: boolean;
    isReceive: boolean;
}
export interface ParsedModifier {
    name: string;
    lineStart: number;
    lineEnd: number;
}
export interface ParsedStateVariable {
    name: string;
    typeName: string;
    visibility: 'public' | 'internal' | 'private';
    mutability: 'mutable' | 'constant' | 'immutable';
    lineStart: number;
    lineEnd: number;
    initialValue: string | null;
}
export interface ParsedImport {
    path: string;
    symbols: string[];
    lineStart: number;
}
export interface ParseResult {
    contracts: ParsedContract[];
    imports: ParsedImport[];
    pragmas: string[];
    comments: Comment[];
}
/**
 * Parse a Solidity source file into a structured result.
 */
export declare function parseSolidity(source: string, filePath?: string): ParseResult;
export declare function parseSolidityCached(source: string, filePath: string): ParseResult;
export interface ASTExternalCall {
    contract: string;
    function: string;
    target: string;
    method: string;
    file: string;
    lineStart: number;
    lineEnd: number;
    snippet: string;
    callType: 'member_access' | 'low_level';
}
/**
 * Extract external calls from parsed Solidity AST by walking all function bodies.
 * Identifies MemberAccess + FunctionCall on external contracts and low-level calls.
 */
export declare function extractExternalCalls(source: string, filePath: string): ASTExternalCall[];
/**
 * Extract the Solidity version from pragma statements.
 */
export declare function extractSolidityVersion(pragmas: string[]): string | null;
//# sourceMappingURL=solidity-parser.d.ts.map