import { GeneratorContext } from './contexts/generator-context'; import { GenerateResponse } from './models/generate-response'; export default class AbiGenerator { private _context; private _web3Factory; private _ethersFactory; private _parametersAndReturnTypeInterfaces; private _events; private _methodNames; constructor(_context: GeneratorContext); /** * Generates all the typings * @returns The location the file was generated to */ generate(): GenerateResponse; /** * Clear all quotes from the context file info */ private clearAllQuotesFromContextInfo; /** * Clear the state down */ private clearState; /** * Watch for ABI file changes */ private watchForChanges; /** * Get the output path directory */ private getOutputPathDirectory; /** * Build output location */ private buildOutputLocation; /** * Get prettier options */ private getPrettierOptions; /** * Loop through all the of dir to try to fine the .prettierrc file * @param dirPath The path */ private findPrettierrcContent; /** * Get default prettier options */ private getDefaultPrettierOptions; /** * Build the full typings * @param abi The abi items * @param abiTypedInterface The abi typed interface */ private buildFullTypings; /** * Gets the abi json */ private getAbiJson; /** * Get the abi file full path location with executing path */ private getAbiFileFullPathLocation; /** * Build the executing path */ private buildExecutingPath; /** * Build abi interface * @param abi The abi json */ private buildAbiInterface; /** * Get abi name */ private getAbiName; /** * Formats the abi name * @param name The abi name */ private formatAbiName; /** * Get abi file location raw name */ private getAbiFileLocationRawName; /** * Build method names type */ private buildMethodNamesType; /** * Build the parameters and return type interface if they accept an object of some form */ private buildParametersAndReturnTypeInterfaces; /** * Build events type */ private buildEventsType; /** * Build the event context interface * @param abiItems The abi json */ private buildEventsInterface; /** * Build the abi property summaries * @param abiItem The abi json */ private buildInterfacePropertyDocs; /** * Builds the input and output property type * @param abiItem The abi json */ private buildParametersAndReturnTypes; /** * Build parameters for abi interface * @param abiItem The abi item */ private buildParameters; /** * Build the object request parameter interface * @param name The abi item name * @param abiInput The abi input */ private buildTupleParametersInterface; /** * Build the object response parameter interface * @param name The abi item name * @param abiOutput The abi output */ private buildTupleResponseInterface; /** * Build property return type interface and return the return type context * @param abiItem The abit json */ private buildPropertyReturnTypeInterface; /** * add return type interfaces * @param interfaceName The interface name * @param interfaceContext The interface context */ private addReturnTypeInterface; /** * Build the method return context * @param type The type it returns * @param abiItem The abi item */ private buildMethodReturnContext; }