Tron gRPC API

TRON nodes expose the same operation set as the REST API over gRPC, using Protocol Buffers. gRPC is the transport used internally by java-tron and by performance-sensitive backends; the request and response messages mirror the REST endpoints one-to-one.

The GetBlock TRON reference documents the REST (HTTP) and JSON-RPC interfaces in full. This page describes the gRPC transport and how its services map to the documented REST endpoints, so a gRPC integration can reuse the same request and response shapes.

Services

TRON's protobuf API is organized into two services that correspond to the two node types:

ServiceNodeCorresponds to
WalletFullnodeThe /wallet/{method} REST endpoints (full API)
WalletSoliditySolidityThe /walletsolidity/{method} REST endpoints (confirmed reads)

Method mapping

Each gRPC method maps to a REST endpoint of the same name; the protobuf request and response messages carry the same fields documented on the REST pages.

gRPC method (Wallet service)REST endpointReference
GetAccount/wallet/getaccountgetaccount
GetNowBlock/wallet/getnowblockgetnowblock
GetBlockByNum/wallet/getblockbynumgetblockbynum
GetTransactionById/wallet/gettransactionbyidgettransactionbyid
TriggerConstantContract/wallet/triggerconstantcontracttriggerconstantcontract
TriggerContract/wallet/triggersmartcontracttriggersmartcontract
BroadcastTransaction/wallet/broadcasttransactionbroadcasttransaction
FreezeBalanceV2/wallet/freezebalancev2freezebalancev2

The protobuf service and message definitions are maintained in the java-tron repository (api/api.proto, core/*.proto). Use those definitions to generate a gRPC client, then send requests to the GetBlock TRON endpoint.

Reading the field shapes

Because the gRPC messages and the REST JSON bodies carry the same fields, the parameter and response tables on the REST pages are also the reference for gRPC request and response fields. For request and response detail, see the corresponding endpoint under the REST API.

Support

For technical support and questions:

See Also