rpc

Get Libraries

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.

post/api/v2/getLibraries

Request

  • Base URL: https://toncenter.com (the document declares no server; this is the origin it was published from)
  • URL: https://toncenter.com/api/v2/getLibraries
  • Auth: one of:
    • API key in header X-API-Key
    • API key in query parameter api_key

Request body

librariesTonHash[]

Array of library cell hashes to retrieve. Each hash is a 256-bit value in hex (64 chars) or base64 (44 chars) format.

Response

Returns the code of the requested shared library cells.

okboolean required

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

@extrastring required
jsonrpcstring

JSON-RPC protocol version identifier.

idstring

Changes

No recorded changes to this operation across all 1 revision of this API.