A module that can be used to run commands against aos instances in a local environment. The main purpose of this module is to be used when writing integration tests for aos.
import fs from 'fs'
import { aoslocal, SQLITE } from '@permaweb/loco'
const src = './src/main.lua'
const aos = await aoslocal(SQLITE)
const result = await aos.eval("1 + 1")
console.log(result.Output.data)
loads source into process
loads latest checkpoint into a process for evals
evaluates an expression and returns an AOS Result Object
send a message to be handled by the aos process and receive a Result Object
Record<string, string>
{
Output: {
data: string
},
Messages: Record<string, any>[],
Spawns: Record<string, any>[],
Assignments: Record<string, any>[]
}