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

SDK Usage

import asyncio

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

HASH = "8085186e2c707c0de954e5456f065965988a01f7069bef6a6db32325af0e0d53"


async def main() -> None:
    async with ToncenterRestClient(network=Network.MAINNET) as client:
        result = await client.v2.utils.detect_hash(
            HASH,
        )
        print(result.model_dump_json(indent=4))


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

Query Parameters

hash
string
required

The 256-bit hash in any form

Response

OK

ok
boolean
required
Example:

true

result
DetectHash · object
required