import { AbiInput, AbiOutput } from '../../../abi-properties'; import { Provider } from '../enums/provider'; export default class TypeScriptHelpers { static getSolidityInputTsTypeByTypeName(type: string, provider: Provider): string; /** * Get the solidity input type mapped to typescript type * @param type The solidity type */ static getSolidityInputTsType(abiInput: AbiInput, provider: Provider, prefix?: 'Request' | 'EventEmittedResponse'): string; /** * Get the solidity type mapped to typescript type * @param abiOutput The abi output type * @param provider The provider */ static getSolidityOutputTsType(abiOutput: AbiOutput, provider: Provider): string; /** * Build response interface name * @param inputOrOutput The input or output */ static buildInterfaceName(inputOrOutput: AbiOutput | AbiInput, requestInterfaceType?: 'Request' | 'Response' | 'EventEmittedResponse'): string; /** * Build etherjs number type * @param type The ABI type * @param solidityType The solidity type */ private static buildEtherjsNumberType; /** * Build web3 number type * @param type The ABI type * @param solidityType The solidity type */ private static buildWeb3NumberType; /** * Build up multidimensional array types * Typescript does not support syntax `[string, string][string, string]` * so we can only strongly type the fixed length of the first array * for example `bytes32[4][][2][][9][]` > `[string,string,string,string,string][][][][][]` * is you have any other fixed size arrays passed dimension it will have to generate a unbounded * array size aka `bytes32[][4] > `string[][]` * @param abiType The ABI type in the json * @param tsType The typescript type */ static buildUpMultidimensionalArrayTypes(abiType: string, tsType: string): string; /** * Generates an interface * @param interfaceName The interface name * @param interfaceContext The interface context */ static buildInterface(interfaceName: string, interfaceContext: string): string; /** * Build type * @param typeName The type name * @param types The types */ static buildType(typeName: string, types: string[]): string; /** * Check is a path is a directory * @param pathValue The path value */ static isDirectory(pathValue: string): boolean; /** * Build the executing path */ static buildExecutingPath(joinPath: string): string; }