TRON Node Connection Guide
CatFee offers stable and high-performance TRON node rental services, supporting gRPC protocol for seamless interaction with the TRON network. This helps developers quickly integrate TRON features to build high-performance DApps or on-chain services.
π Node Information
Node Host:
tron-168.catfee.io
Port:
50051
Protocol: gRPC
Authentication:
Header Name:
X-CATFEE-TOKEN
Header Value:
YOUR_API_KEY
(Please contact support to obtain)
π‘ Both
wallet
andwalletSolidity
gRPC services are available on port 50051.
π Communication Overview
Using the gRPC protocol, you can access common services of the TRON node:
wallet
: For unconfirmed transactions (not yet on-chain)walletSolidity
: For reading confirmed on-chain data
π Multi-language Connection Examples
π Python (Using grpcio
and tronpy
)
grpcio
and tronpy
)pip install grpcio tronpy
from tronpy.providers.grpc_provider import GrpcProvider
from tronpy import Tron
provider = GrpcProvider(
endpoint="tron-168.catfee.io:50051",
api_key="YOUR_API_KEY",
secure=False # Unsecured connection
)
client = Tron(provider=provider)
account = client.get_account("T...")
print(account)
π¦ Node.js (Using grpc
and official proto files)
grpc
and official proto files)npm install grpc @grpc/grpc-js @grpc/proto-loader
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const packageDef = protoLoader.loadSync('wallet.proto', {});
const walletProto = grpc.loadPackageDefinition(packageDef).protocol;
const metadata = new grpc.Metadata();
metadata.set('X-CATFEE-TOKEN', 'YOUR_API_KEY');
const client = new walletProto.Wallet(
'tron-168.catfee.io:50051',
grpc.credentials.createInsecure()
);
client.GetNow({}, metadata, (err, res) => {
console.log(res);
});
π§ Be sure to prepare
.proto
files in advance. See TRONβs official repository: https://github.com/tronprotocol/protocol
β Java (Using grpc-java
)
grpc-java
)ManagedChannel channel = NettyChannelBuilder
.forAddress("tron-168.catfee.io", 50051)
.usePlaintext()
.build();
WalletGrpc.WalletBlockingStub walletStub = WalletGrpc.newBlockingStub(channel)
.withInterceptors(MetadataUtils.newAttachHeadersInterceptor(
new Metadata() {{
put(Metadata.Key.of("X-CATFEE-TOKEN", Metadata.ASCII_STRING_MARSHALLER), "YOUR_API_KEY");
}}
));
Account request = Account.newBuilder().setAddress(ByteString.copyFromUtf8("T...")).build();
Account response = walletStub.getAccount(request);
System.out.println(response);
π¦ Supported API Interfaces
GetAccount
GetTransactionById
CreateTransaction
BroadcastTransaction
TriggerSmartContract
...and more
π Refer to API documentation: https://developers.tron.network/reference/wallet-getaccount
β οΈ Important Notes
The test environment supports up to 20 requests per second
Always include the
X-CATFEE-TOKEN
header for authenticationgRPC clients must support HTTP/2
When using
walletSolidity
, data is retrieved from the confirmed on-chain state
π οΈ Technical Support
If you encounter any integration issues or need customized support, contact the CatFee tech team:
Telegram Support: @CatFee_James
Official Website: https://catfee.io
Choosing a reliable node is critical for building on TRON. CatFee offers highly available, low-latency, authenticated TRON node servicesβyour best choice for blockchain development!
Last updated
Was this helpful?