import type { CandidDefinition } from "./types.js"; /** * Imports and evaluates a Candid definition from JavaScript code. * * This function evaluates JavaScript code in a controlled manner to extract * the idlFactory and init exports. The evaluation is done using Function constructor * which is safer than dynamic imports with data URLs and more CSP-friendly. * * @param candidJs - The JavaScript code containing the Candid definition. * @returns A promise that resolves to the CandidDefinition. * @throws Error if the import fails. */ export declare function importCandidDefinition(candidJs: string): Promise; /** * Normalizes a raw Candid interface string by extracting the dynamic method signature * and wrapping it inside a proper service block, accommodating preceding type definitions. * * @param rawInput - The raw string (e.g., shorthand candid or string with type definitions followed by shorthand). * @param functionName - The function name to use when wrapping the signature. * @returns A valid `.did` format string with a service block containing the functionName. */ export declare function normalizeCandidInterface(rawInput: string, functionName?: string): string; //# sourceMappingURL=utils.d.ts.map