Decode opcodes and bodies
Decode opcodes (hex or decimal) and message bodies (base64 or hex).
GET
/
api
/
v3
/
decode
Decode opcodes and bodies
curl --request GET \
--url https://toncenter.com/api/v3/decodeimport requests
url = "https://toncenter.com/api/v3/decode"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://toncenter.com/api/v3/decode', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://toncenter.com/api/v3/decode",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://toncenter.com/api/v3/decode"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://toncenter.com/api/v3/decode")
.asString();require 'uri'
require 'net/http'
url = URI("https://toncenter.com/api/v3/decode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"opcodes": [
"jetton_transfer"
],
"bodies": [
{
"type": "jetton_transfer",
"data": {
"amount": "1000000000",
"destination": "0:abcd...",
"response_destination": null,
"custom_payload": null
}
}
]
}{
"code": 123,
"error": "<string>"
}Was this page helpful?
Previous
Decode opcodes and bodiesDecode opcodes (hex or decimal) and message bodies (base64 or hex). Use POST for long parameter lists that could be truncated in GET.
Next
⌘I
Decode opcodes and bodies
curl --request GET \
--url https://toncenter.com/api/v3/decodeimport requests
url = "https://toncenter.com/api/v3/decode"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://toncenter.com/api/v3/decode', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://toncenter.com/api/v3/decode",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://toncenter.com/api/v3/decode"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://toncenter.com/api/v3/decode")
.asString();require 'uri'
require 'net/http'
url = URI("https://toncenter.com/api/v3/decode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"opcodes": [
"jetton_transfer"
],
"bodies": [
{
"type": "jetton_transfer",
"data": {
"amount": "1000000000",
"destination": "0:abcd...",
"response_destination": null,
"custom_payload": null
}
}
]
}{
"code": 123,
"error": "<string>"
}