aqua/api/api-example/index.js
2023-08-09 17:32:27 +03:00

21 lines
374 B
JavaScript

//@ts-check
import { compileAquaCallFromPath } from '@fluencelabs/aqua-api'
// compile call
const compilationResult = await compileAquaCallFromPath({
filePath: 'test.aqua',
data: { num: 3 },
funcCall: 'getNumber(num)',
})
const {
errors,
functionCall: { funcDef, script },
functions,
generatedSources,
services,
} = compilationResult
console.log(script)