2023-06-12 13:28:27 +00:00
|
|
|
import type { FunctionCallDef, ServiceDef } from "@fluencelabs/fluence/dist/internal/compilerSupport/v3impl/interface"
|
2022-12-28 08:30:42 +00:00
|
|
|
|
|
|
|
export class AquaConfig {
|
2023-06-12 13:28:27 +00:00
|
|
|
constructor(
|
|
|
|
logLevel?: string,
|
|
|
|
constants?: string[],
|
|
|
|
noXor?: boolean,
|
|
|
|
noRelay?: boolean,
|
|
|
|
targetType?: string,
|
|
|
|
tracing?: boolean
|
|
|
|
);
|
2022-12-29 17:03:57 +00:00
|
|
|
|
2022-12-28 08:30:42 +00:00
|
|
|
logLevel?: string
|
|
|
|
constants?: string[]
|
|
|
|
noXor?: boolean
|
|
|
|
noRelay?: boolean
|
2023-06-07 12:07:14 +00:00
|
|
|
targetType?: string
|
2023-06-12 13:28:27 +00:00
|
|
|
tracing?: boolean
|
2022-12-28 08:30:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export class AquaFunction {
|
|
|
|
funcDef: FunctionCallDef
|
|
|
|
script: string
|
|
|
|
}
|
|
|
|
|
2023-06-07 12:07:14 +00:00
|
|
|
export class GeneratedSource {
|
|
|
|
name: string
|
|
|
|
tsSource?: string
|
|
|
|
jsSource?: string
|
|
|
|
tsTypes?: string
|
|
|
|
}
|
|
|
|
|
2022-12-28 08:30:42 +00:00
|
|
|
export class CompilationResult {
|
2022-12-29 17:03:57 +00:00
|
|
|
services: Record<string, ServiceDef>
|
2022-12-28 08:30:42 +00:00
|
|
|
functions: Record<string, AquaFunction>
|
2022-12-29 17:03:57 +00:00
|
|
|
functionCall?: AquaFunction
|
|
|
|
errors: string[]
|
2023-06-07 12:07:14 +00:00
|
|
|
generatedSources: GeneratedSource[]
|
2022-12-29 17:03:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export class Input {
|
|
|
|
constructor(input: string);
|
|
|
|
|
|
|
|
input: string
|
|
|
|
}
|
|
|
|
|
|
|
|
export class Path {
|
|
|
|
constructor(path: string);
|
|
|
|
|
|
|
|
path: string
|
|
|
|
}
|
|
|
|
|
|
|
|
export class Call {
|
|
|
|
constructor(functionCall: string,
|
2023-06-12 13:28:27 +00:00
|
|
|
arguments: any,
|
|
|
|
input: Input | Path);
|
2022-12-29 17:03:57 +00:00
|
|
|
|
|
|
|
functionCall: string
|
|
|
|
arguments: any
|
|
|
|
input: Input | Path
|
2022-12-28 08:30:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export class Compiler {
|
2022-12-29 17:03:57 +00:00
|
|
|
compile(input: Input | Path | Call, imports: string[], config?: AquaConfig): Promise<CompilationResult>;
|
2022-12-28 08:30:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export var Aqua: Compiler;
|