UNPKG

@aeternity/aepp-sdk

Version:

SDK for the æternity blockchain

28 lines (27 loc) 1.33 kB
import CompilerBase, { Aci, CompileResult } from './Base.js'; import { Encoded } from '../../utils/encoder.js'; export declare const getPackagePath: () => string; /** * A wrapper around aesophia_cli, available only in Node.js. * Requires Erlang installed, assumes that `escript` is available in PATH. * @category contract */ export default class CompilerCli extends CompilerBase { #private; /** * @param compilerPath - A path to aesophia_cli binary, by default uses the integrated one * @param options - Options * @param options.ignoreVersion - Print warning instead of throwing exception if compiler version * is not supported, use with caution */ constructor(compilerPath?: string, { ignoreVersion }?: { ignoreVersion?: boolean; }); compile(path: string): CompileResult; compileBySourceCode(sourceCode: string, fileSystem?: Record<string, string>): CompileResult; generateAci(path: string): Promise<Aci>; generateAciBySourceCode(sourceCode: string, fileSystem?: Record<string, string>): Promise<Aci>; validate(bytecode: Encoded.ContractBytearray, path: string): Promise<boolean>; validateBySourceCode(bytecode: Encoded.ContractBytearray, sourceCode: string, fileSystem?: Record<string, string>): Promise<boolean>; version(): Promise<string>; }