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.
Authorizations
Query parameters
sourcemapbooleanOptional
When set to true
, returns the source map of the program as a JSON. Defaults to false
.
Body
string · binaryOptional
Responses
200
Teal compile Result
application/json
400
Bad Request - Teal Compile Error
application/json
401
Invalid API Token
application/json
404
Developer API not enabled
500
Internal Error
application/json
default
Unknown Error
post
POST /v2/teal/compile HTTP/1.1
Host: algo.nownodes.io
X-Algo-API-Token: YOUR_API_KEY
Content-Type: text/plain
Accept: */*
Content-Length: 8
"binary"
{
"hash": "text",
"result": "text",
"sourcemap": {}
}