Programmatic API

Programmatic API

You can invoke Tact compiler from your own code in node and browser environments.


This API is not released yet. It will be released in the 1.0.0 version.

Run compiler in browser

import { run } from "@tact-lang/compiler";
// Virtual FS
const fs = {
  ["main.tact"]: Buffer.from("...").toString("base64"),
const config = {
  projects: [
      name: "Sample",
      path: "main.tact",
      output: "./output",
// Run compiler
let successful = await run({ config, fs });
// NOTE: Output from is written to the same fs object.

Contract verification

You can always verify compiled package with the verify function.

import { verify } from "@tact-lang/compiler";
const pkg: string = '...';
const res = await verify(pkg);