Classes
Get class by hash
Retrieve detailed information about a specific class using its hash.
GET
/
classes
/
{classHash}
Get class by hash
curl --request GET \
--url https://public-api.voyager.online/beta/classes/{classHash} \
--header 'x-api-key: <api-key>'import requests
url = "https://public-api.voyager.online/beta/classes/{classHash}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://public-api.voyager.online/beta/classes/{classHash}', 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://public-api.voyager.online/beta/classes/{classHash}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://public-api.voyager.online/beta/classes/{classHash}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.voyager.online/beta/classes/{classHash}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.voyager.online/beta/classes/{classHash}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"hash": "0x0421dbe408553c0a49267f752565277123f437145463e4670e3da70fe69ed285",
"transactionHash": "0x45fbb396ac262997a3edc79261e93204af7e0f0694a01c98f1f674f9cc11edc",
"version": "2.11.4",
"type": 5,
"isAccount": false,
"isProxy": false,
"isErcToken": true,
"creationTimestamp": 1757525492,
"contractsCount": null,
"declaredBy": "0x06a0e8ac47a0b046c8184b4b0499d2821834c235350e62b648d2669421b124b8",
"code": null,
"abi": null,
"byteCode": null,
"license": null
}{
"error": "<string>"
}{
"message": "Forbidden"
}{
"error": "<string>"
}{
"message": "Limit Exceeded"
}Authorizations
API key for authentication. Get your key at https://voyager.online/plans
Path Parameters
Starknet class hash (0x-prefixed hex).
Pattern:
^(0x[0-9a-fA-F]{1,66})$Response
Class details
⌘I
Get class by hash
curl --request GET \
--url https://public-api.voyager.online/beta/classes/{classHash} \
--header 'x-api-key: <api-key>'import requests
url = "https://public-api.voyager.online/beta/classes/{classHash}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://public-api.voyager.online/beta/classes/{classHash}', 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://public-api.voyager.online/beta/classes/{classHash}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://public-api.voyager.online/beta/classes/{classHash}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.voyager.online/beta/classes/{classHash}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.voyager.online/beta/classes/{classHash}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"hash": "0x0421dbe408553c0a49267f752565277123f437145463e4670e3da70fe69ed285",
"transactionHash": "0x45fbb396ac262997a3edc79261e93204af7e0f0694a01c98f1f674f9cc11edc",
"version": "2.11.4",
"type": 5,
"isAccount": false,
"isProxy": false,
"isErcToken": true,
"creationTimestamp": 1757525492,
"contractsCount": null,
"declaredBy": "0x06a0e8ac47a0b046c8184b4b0499d2821834c235350e62b648d2669421b124b8",
"code": null,
"abi": null,
"byteCode": null,
"license": null
}{
"error": "<string>"
}{
"message": "Forbidden"
}{
"error": "<string>"
}{
"message": "Limit Exceeded"
}