Skip to main content
GET
/
api
/
v2
/
detectHash
Detect hash
curl --request GET \
  --url https://toncenter.com/api/v2/detectHash \
  --header 'X-API-Key: <api-key>'
{
  "ok": true,
  "result": {
    "@type": "ext.utils.detectedHash",
    "b64": "<string>",
    "b64url": "<string>",
    "hex": "<string>"
  },
  "@extra": "<string>"
}

Authorizations

X-API-Key
string
header
required

API key header of the form X-API-Key: <token>, where <token> is the API key. Requests without a key are limited to 1 RPS. Refer to the authentication guide for details.

Query Parameters

hash
string
required

A 256-bit hash value. Accepts either hex format (64 characters) or base64 format (44 characters). Used for block hashes, transaction hashes, and cryptographic proofs.

Response

Returns the hash in all supported formats (hex, base64, URL-safe base64).

ok
boolean
default:true
required

Returns true if the request succeeded; otherwise false. See the error field for details.

result
object
required

Response data. Present only when ok is true.

@extra
string

Optional request ID that can be passed in the request and received back in the response. Useful for matching async responses.