Skip to main content
Glama
runLua.ts628 B
import { result, message } from "@permaweb/aoconnect"; import { sleep } from "./utils"; export async function runLuaCode( code: string, processId: string, signer: any, tags?: { name: string; value: string }[] ) { const messageId = await message({ process: processId, signer, data: code, tags: [{ name: "Action", value: "Eval" }, ...(tags || [])], }); await sleep(100); const outputResult = await result({ message: messageId, process: processId, }); if (outputResult.Error) { return JSON.stringify(outputResult.Error); } return JSON.stringify(outputResult.Output.data); }

Implementation Reference

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/asrvd/flux'

If you have feedback or need assistance with the MCP directory API, please join our Discord server