aqua/api/aqua-api-npm/aqua-api.d.ts
2022-12-28 11:30:42 +03:00

28 lines
893 B
TypeScript

import type {FunctionCallDef, ServiceDef} from "@fluencelabs/fluence/dist/internal/compilerSupport/v3impl/interface"
export class AquaConfig {
constructor(logLevel: string, constants: string[], noXor: boolean, noRelay: boolean);
logLevel?: string
constants?: string[]
noXor?: boolean
noRelay?: boolean
}
export class AquaFunction {
funcDef: FunctionCallDef
script: string
}
export class CompilationResult {
services: ServiceDef[]
functions: Record<string, AquaFunction>
}
export class Compiler {
compileRun(functionStr: string, arguments: any, path: string, imports: string[], config?: AquaConfig): Promise<AquaFunction>;
compile(path: string, imports: string[], config?: AquaConfig): Promise<CompilationResult>;
compileString(input: string, imports: string[], config?: AquaConfig): Promise<CompilationResult>;
}
export var Aqua: Compiler;