Skip to main content
GET
/
api
/
v3
/
decode
Decode Opcodes and Bodies
curl --request GET \
  --url https://toncenter.com/api/v3/decode
{
  "bodies": [
    {}
  ],
  "opcodes": [
    "<string>"
  ]
}

SDK Usage

import asyncio

from toncenter.rest import ToncenterRestClient
from toncenter.types import Network

OPCODES = ["0x0f8a7ea5"]


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


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

Query Parameters

opcodes
string[]

List of opcodes to decode (hex or decimal)

bodies
string[]

List of message bodies to decode (base64 or hex)

Response

OK

bodies
object[]
opcodes
string[]