Skip to main content
POST
/
api
/
v3
/
decode
Decode Opcodes and Bodies
curl --request POST \
  --url https://toncenter.com/api/v3/decode \
  --header 'Content-Type: application/json' \
  --data '
{
  "bodies": [
    "<string>"
  ],
  "opcodes": [
    "<string>"
  ]
}
'
{
  "bodies": [
    {}
  ],
  "opcodes": [
    "<string>"
  ]
}

SDK Usage

import asyncio

from toncenter.rest import ToncenterRestClient
from toncenter.types import Network
from toncenter.rest.v3.models import DecodeRequest

OPCODES = ["0x0f8a7ea5"]


async def main() -> None:
    async with ToncenterRestClient(network=Network.MAINNET) as client:
        result = await client.v3.utils.post_decode(
            body=DecodeRequest(opcodes=OPCODES),
        )
        print(result.model_dump_json(indent=4))


if __name__ == "__main__":
    asyncio.run(main())

Body

application/json
bodies
string[]
opcodes
string[]

Response

OK

bodies
object[]
opcodes
string[]