Tron GRPC
Registration
Register in Transfer Edge Dashboard and get your GRPC URL and API Key. Don't forget to top-up your account.
Transatron GRPC endpoint is https://grpc.transatron.io/. Default port is 443.
Transatron doesn't provide non-SSL encrypted endpoint for GRPC. It will not work in mobile TronLink.
Transatron API Key should be provided in a header named TRON-PRO-API-KEY as an ASCII string.
Using Transatron Tron GRPC with Trident framework
Unfortunately Trident doesn't support SSL enabled GRPC endpoints as of today (release 0.11.0 and earlier). But still, it's possible to use Transatron GRPC with a minimum modification of ApiWrapper class. Please check this Trident SSL-enabled fork for details.
Feel free to contact our support team for assistance at info@transatron.io.
Broadcast response
The gRPC broadcast follows the same flow as JSON (see How it works): broadcast, read the reply, then read the final charge by order id with a Spender key.
- Order id header: when the broadcast belongs to an order, the response carries the order id in the response header
x-transatron-order-id. It is sent for all key types (Spender and Non-Spender). The header may be absent when no order exists. - No fee block, no
is_final: the gRPCReturnmessage carries neither, in the default or in the wait-for-final reply mode. Confirm that the transaction landed by polling the txid (standard TRONgettransactioninfobyid). - Reading the charge: with a Spender key, use the header value with
GET /api/v1/orders?order_id=<uuid>. A Non-Spender key gets401there, so do not use that endpoint with it. - May still land: the text
Outcome unknown or the tx may still landappears inReturn.messageas plain text (not hex). Do not rebuild; poll the txid until the expiration printed in the text. See Result codes. - If your client can't read headers: with a Spender key, use
GET /api/v1/orders?search=<txhash>after the transaction is mined.
Illustrative check of the header with grpcurl (the request body depends on your transaction):
grpcurl -v -H 'TRON-PRO-API-KEY: <YOUR_API_KEY>' -d @ grpc.transatron.io:443 protocol.Wallet/BroadcastTransaction < tx.json
# response headers include:
# x-transatron-order-id: 3f2a6c1e-8b4d-4e57-9a10-5c7d2e9b8f41