I want to track transactions on the Tron blockchain network. More precisely, I want to follow the transactions made through my own address, but I could not find any way. I tried the following way but it says "subscribe" method is an undefined method. I found some content about Websocket I got Websocket API via QuickNode but it didn't work either. Is there a way I can track transactions on the Tron network? But I don't want to do this by constantly making HTTP requests. I want to be notified when there is a transaction.
I tried the code below and the Websocket method, but no results.
this.web3 = new TronWeb({
fullHost: this.network.host,
solidityNode: this.network.host,
eventServer: this.network.event,
});
this.web3.eventServer.subscribe('transactions', (error, event) => {
if (error) {
console.error('Error subscribing to transaction event:', error);
} else {
console.log('New transaction:', event);
}
});