Get smart contract libraries
Get libraries codes.
GET
/
getLibraries
Get smart contract libraries
curl --request GET \
--url https://toncenter.com/api/v2/getLibrariesimport requests
url = "https://toncenter.com/api/v2/getLibraries"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://toncenter.com/api/v2/getLibraries', 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/v2/getLibraries",
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/v2/getLibraries"
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/v2/getLibraries")
.asString();require 'uri'
require 'net/http'
url = URI("https://toncenter.com/api/v2/getLibraries")
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{
"ok": true,
"result": {
"@type": "smc.libraryResult",
"result": [
{
"@type": "smc.libraryEntry",
"hash": "RZuqu83SGYHpN7D/5z+dUoN/hO08EXrRJg1TXsFigAo=",
"data": "te6ccgECDQEAA4kAART/APSkE/..."
}
],
"@extra": "1758735556.956807:1:0.731451399868406"
}
}Was this page helpful?
Previous
Get outgoing message queue sizesGet info with current sizes of messages queues by shards.
Next
⌘I
Get smart contract libraries
curl --request GET \
--url https://toncenter.com/api/v2/getLibrariesimport requests
url = "https://toncenter.com/api/v2/getLibraries"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://toncenter.com/api/v2/getLibraries', 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/v2/getLibraries",
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/v2/getLibraries"
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/v2/getLibraries")
.asString();require 'uri'
require 'net/http'
url = URI("https://toncenter.com/api/v2/getLibraries")
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{
"ok": true,
"result": {
"@type": "smc.libraryResult",
"result": [
{
"@type": "smc.libraryEntry",
"hash": "RZuqu83SGYHpN7D/5z+dUoN/hO08EXrRJg1TXsFigAo=",
"data": "te6ccgECDQEAA4kAART/APSkE/..."
}
],
"@extra": "1758735556.956807:1:0.731451399868406"
}
}