Skip to content

Compile TEAL source code to binary, produce its hash

POST
/v2/teal/compile

Given TEAL source code in plain text, return base64 encoded program bytes and base32 SHA512_256 hash of program bytes (Address style). This endpoint is only enabled when a node’s configuration file sets EnableDeveloperAPI to true.

sourcemap
boolean

When set to true, returns the source map of the program as a JSON. Defaults to false.

TEAL source code to be compiled

string format: binary

Teal compile Result

object
hash
required

Base32 SHA512_256 of program bytes (Address style)

string
result
required

Base64 encoded program bytes

string
sourcemap

JSON of the source map

object

Bad Request - Teal Compile Error

An error response with optional data field.

object
data
object
message
required
string

Invalid API Token

An error response with optional data field.

object
data
object
message
required
string

Developer API not enabled

Internal Error

An error response with optional data field.

object
data
object
message
required
string

Unknown Error