/** * Represents an OpenRPC schema definition */ export interface OpenRPCSchema { $ref?: string; type?: string; format?: string; title?: string; description?: string; pattern?: string; examples?: any[]; minimum?: number; items?: OpenRPCSchema; } /** * Represents an OpenRPC parameter definition */ export interface OpenRPCParam { name: string; required?: boolean; schema?: OpenRPCSchema; } /** * Represents an OpenRPC method definition */ export interface OpenRPCMethod { name: string; summary?: string; params?: OpenRPCParam[]; result?: { schema?: OpenRPCSchema; }; } /** * Represents a complete OpenRPC specification */ export interface OpenRPCSpec { openrpc: string; info?: { title?: string; version?: string; }; servers?: Array<{ url?: string; }>; methods?: OpenRPCMethod[]; components?: { schemas?: Record; }; } /** * Template data for a method in the generated code */ export interface TemplateMethod { name: string; snake_case_name: string; summary: string; params: Array<{ name: string; rust_type?: string; python_type?: string; solidity_type?: string; memory_type?: string; }>; result_type: string; result_memory_type?: string; } /** * Complete template data used for Mustache rendering */ export interface TemplateData { package_name: string; version: string; server_name: string; trait_name: string; server_port: string; openrpc_spec_file: string; abi_file: string; interface_file: string; title: string; methods: TemplateMethod[]; alloy_imports?: string; has_alloy_imports?: boolean; python_imports?: string; has_python_imports?: boolean; has_types: boolean; type_names?: string[]; generation_timestamp?: string; } /** * Interface name transformation results */ export interface NameTransforms { /** Original method name (without compute_ prefix) */ original_name: string; /** Snake case version */ snake_case_name: string; /** Capitalized version for callbacks and events */ capitalized_name: string; /** Method name (same as original_name for Solidity, compute_ prefixed for server targets) */ name: string; } /** * Contract name transformation results */ export interface ContractNames { /** Interface name (e.g., ICryptoOracle) */ interface_name: string; /** Prefixed interface name ensuring I prefix (e.g., ICryptoOracle) */ prefixed_interface_name: string; /** Concrete contract name without I prefix (e.g., CryptoOracle) */ concrete_contract_name: string; /** Package name in kebab-case (e.g., crypto-oracle) */ package_name: string; /** Receiver contract name (e.g., CryptoOracleReceiver) */ contract_name: string; } /** * ABI component definition for structs */ export interface AbiComponent { name: string; type: string; internalType: string; components?: AbiComponent[]; } /** * ABI function input/output */ export interface AbiInputOutput { name: string; type: string; internalType: string; components?: AbiComponent[]; } /** * ABI function definition */ export interface AbiFunctionDef { name: string; type: string; inputs: AbiInputOutput[]; outputs: AbiInputOutput[]; } /** * Solidity ABI structure */ export type AbiData = AbiFunctionDef[]; //# sourceMappingURL=types.d.ts.map