diff options
Diffstat (limited to 'packages/typescript-typings/types/solc/index.d.ts')
-rw-r--r-- | packages/typescript-typings/types/solc/index.d.ts | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/packages/typescript-typings/types/solc/index.d.ts b/packages/typescript-typings/types/solc/index.d.ts new file mode 100644 index 000000000..fcef24b9f --- /dev/null +++ b/packages/typescript-typings/types/solc/index.d.ts @@ -0,0 +1,38 @@ +declare module 'solc' { + export interface ContractCompilationResult { + srcmap: string; + srcmapRuntime: string; + bytecode: string; + runtimeBytecode: string; + interface: string; + } + export interface CompilationResult { + errors: string[]; + contracts: { + [contractIdentifier: string]: ContractCompilationResult; + }; + sources: { + [sourceName: string]: { + AST: any; + }; + }; + sourceList: string[]; + } + export interface ImportContents { + contents: string; + } + export interface InputSources { + sources: { + [fileName: string]: string; + }; + } + export interface SolcInstance { + compile( + sources: InputSources, + optimizerEnabled: number, + findImports: (importPath: string) => ImportContents, + ): CompilationResult; + } + export function loadRemoteVersion(versionName: string, cb: (err: Error | null, res?: SolcInstance) => void): void; + export function setupMethods(solcBin: any): SolcInstance; +} |