jsonRPC - Ton

jsonRPC. Processes incoming JSON-RPC requests, facilitating communication between clients and the TON blockchain by executing the requested operations and returning the appropriate responses.

jsonRPC - ton [Value: 100CU]
Executes a specified GET method against the TON blockchain and returns the result, allowing users to retrieve information or data based on their request.
Use cases

Use cases

  • Handle JSON-RPC requests
  • Execute various commands via JSON-RPC
  • Enable interaction with TON network
Constraints

Constraints

  • Requires formatted JSON-RPC requests
  • Dependent on node connectivity
  • Only standard JSON-RPC methods
Get started
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl --request POST \
     --url ' https://ton.drpc.org/rest/jsonRPC' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-api-key: t-66a730ccccfd17001c479705-2f597d14ad7543f289a03418' \
     --data '{
         "jsonrpc": "2.0",
         "method": "subtract",
         "params": [42, 23],
         "id": 1
     }'
Copy
Response
200
{
    "jsonrpc": "2.0",
    "result": 19,
    "id": 1
}
Copy

Request params

Parametersobject
object
jsonrpcstring
Specifies the version of the JSON-RPC protocol.
methodstring
The name or identifier of the method to be executed on the contract.
paramsarray
An array of parameters being passed to the method.
idinteger
A unique identifier for the request, useful for matching responses.

Response

200

Response params

object
jsonrpcstring
Specifies the JSON-RPC protocol version.
resultinteger
The result of the method execution.
idinteger
The unique identifier matching the original request ID.