GETGet libraries

TON Mainnethttps://ton-mainnet.nodit.io/api/v2/getLibraries
CU30

Returns smart contract library code by hash. Some contracts reference shared libraries instead of including all code directly. When a library reference appears in contract code, this endpoint fetches the actual library implementation.

Query Parameters
librariesstring[]

Hashes of libraries

Responses
okbooleanrequired

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

@typestring (enum)required

TonLib type identifier for library lookup results. Refer to the TonLib type reference for a full list.

resultobject[]required

Array of library entries. Each entry contains a hash (base64 or hex) identifying the library and a data field with the library code in BoC format (base64).

@typestring (enum)required

TonLib type identifier for shared library cell entries. Refer to the TonLib type reference for a full list.

hashstringrequired

Library cell hash.

datastringrequired

Library cell code in BoC format, base64 encoded.

@extrastring

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

X-API-KEY
Request
cURL
curl -X GET "https://ton-mainnet.nodit.io/api/v2/getLibraries?libraries=iUaPAseOVwgC45l5yFFvw43wfqdqSDV%2BBTbyuns%2B43s%3D" \
  -H "X-API-KEY: {YOUR_API_KEY}"
Response
Example · 200
{
  "ok": true,
  "result": {
    "@type": "smc.libraryResult",
    "result": []
  },
  "@extra": "1795684553:15:12.644"
}