TronSocket - WebSocket Transaction Event Listener for Tron Blockchain

Project Name: TronSocket
Project Track: Web3
Team Name: BeycanPress
Team Member(s): 2 - @oynozan @beycan
DevPost Project Link: Tronsocket DevPost
Project Goal: Bringing WebSocket support to Tron Blockchain

What is TronSocket?

TronSocket is a service where you can connect to our services and listen for Tron blockchain events, either directly with the SDK or using a pure WebSocket structure as we illustrate in our documentation.

TronSocket consists of 2 parts: Dashboard and Socket Server. In order to interact with WebSockets on Tron network, you need to create a TronSocket account, and a subscribe to one of the plans. Then, you need to create a token on the dashboard. Now you are ready to listen transactions and events on Tron blockchain.

Also, using TronSocket SDK for your Typescript projects, you can easily listen the blockchain without diving into WebSocket technology.

Therefore, we can call TronSocket a standalone development environment for Tron developers.

Project Value

Tron Blockchain doesn’t have a WebSocket support. TronSocket brings WebSockets to the Tron environment and creates a whole new development experience for Tron developers.

As long as the Tron ecosystem continues to grow, TronSocket will follow this growth as well, because there will always be developers who want to work with WebSockets while interacting with blockchain.

Home Page:

Dashboard:
https://app.tronsocket.com

Documentation:

Technology

First, we decided on the technologies we would use in our project, and then the first thing we did was to build the Nile Testnet node on Ubuntu.

After that, we used NestJS (Express based), Socket.IO, VueJS, Nginx, Docker technologies to develop a structure that can offer this as a service.

We also needed an interactive dashboard where our users can manage their tokens and subscriptions, and also a landing page to attract developers into TronSocket.

The last step was the development of the SDK. TronSocket SDK allows developers to interact with the TronSocket WebSocket server without actually dealing with WebSockets. TronSocket SDK is written with Typescript, and it’s completely open-source.

These are the technologies we used initially:

  • Vue3
  • Nest.js
  • MongoDB
  • Socket.io
  • Docker
  • nginx

Project Test Instructions:
First, please create your TronSocket account from the dashboard. Then, you need to create a subscription. For now, you can subscribe to our free plan.

Now you are ready to create your first token. Tokens are essentially used for authenticating your WebSocket interaction.

To test TronSocket Websockets, follow our developer documentation and determine whether you want to use TronSocket SDK or use WebSockets by your own.

So, what’s next?
In this process, I used a lot of new technologies and learned a lot. I developed using NestJS for the first time. Likewise, my teammate used VueJS for the first time, we pushed ourselves a lot in this process, but I believe we succeeded.

I also think we’ve created an affordable product that really solves a problem and can help Tron developers.

In the future, we’re planning to expend our service with a broader endpoint support, as well as a extra methods for our SDK.

TronSocket currently works fine for events. Currently TronSocket v1 is live and we have started designing the existing RPC service. In addition to Event Listener, we aim to provide data service directly via RPC.

If you’re a Tron developer, we encourage you to test TronSocket!

21 Likes

Welcome to hackathon S7
Wow I will gladly say thanks for the definition of Tronsocket, how will you handle the potential increase in concurrent WebSocket connections and data traffic.

3 Likes

Welcome to the Hackathon of season 7, I have read everything in your project, please tell me as you are all about the handling of real time blockchain data how are you maintaining the user privacy, thank you

2 Likes

Hello, thanks for your comment and question.

  1. We’re reading the blockchain by a standard Tron Node (mainnet & testnet). Our server works as a middleman between Tron Node and user requests. We read the blockchain data with traditional methods and serve it as a WebSocket to our users. So, developers don’t have to set up their own nodes and write code for that.

  2. We encrypt user passwords, and do not sell user emails. Only payment processors can see your email, which is not used except sending an invoice after a subscription. In the future, we’ll also implement TRX deposits, which will make you sure that you don’t have to share any personal information with anyone.

You can read our privacy policy from here: Privacy Policy - TronSocket

1 Like

If I can remember clear, your previous project in the hackathon isn’t TronSocket, right?
So, you shouldn’t be registering for this hackaTron under Builders track. Kindly change your track to more appropriate track

My previous project was registered to HackaTRON season 6, not 7. This is a completely different project with a different track, not related to the previous project.

2 Likes

Welcome to Hackathon Season 7, after reading your project submission I see this aims to introduce WebSocket support to the Tron blockchain.
How do you ensure the security of WebSocket connections, especially given the real-time nature of blockchain data? Are there any authentication protocols in place to protect the data stream?

1 Like

Then builder track is not the right track for Tronsocket. Builder track is for projects who have participated in previous HackaTRON and have made significant updates during the current hackaTRON. I think right track for this project is integration or web3.

1 Like

You’re right, sorry for the confusion :sweat_smile:

Hi, thanks for your question.

Before connecting to your WebSocket server, users are obligated to create tokens. These tokens are used for authentication. They are completely random and unique.

While interacting with TronSocket, you need that token. So, no one else can see the data stream between you and TronSocket server.

Welcome to hackathon season 7
How are you going to promote TronSocket to attract more developers into adopting and integrating TronSocket to their dApp?

1 Like

Our marketing strategy is attracting developers from Q&A websites, developer forums, and a proper SEO. We want developers to think of TronSocket whenever someone mentions Tron blockchain and WebSockets at the same sentence.

Since TronSocket is the only WebSocket support provider on Tron blockchain, we don’t have any competitors at the moment.

1 Like
  • Is there any plan in place in addressing increase in traffic as the ecosystem expand.

  • Do you see your platform expanding service beyond the Tron ecosystem.

  • In terms of security what steps have you put in place in ensuring the safety of users token and data.

  • Our current servers can handle high traffic thanks to super bandwidth. In the future, if we have an unexpected traffic increase, we can always vertically upgrade our servers.
  • TronSocket is a Tron-only service. Anyone can build their own service for any blockchain without WebSocket support, however, TronSocket will be only serving for Tron blockchain.
  • We use Mongo Atlas’ private databases, which makes it impossible for anyone to read any record from outside. Users can only access their data. Also, if your token is stolen by someone else, you can always delete it and create a new one. Furthermore, with paid subscriptions, you can add whitelist the IPs to block requests from unknown sources. Only you will be able to read the blockchain with your token.

And also, you can learn about token security from here: Security | TronSocket

1 Like

Wow :flushed: thanks for your quick response to my question and also for the clarification, I was check it out.
:+1: Buddy @oynozan

1 Like

Thank you for your reply to me it was a very long and explainable one and I understand more now, please tell me since you are depending on a Tron node for the blockchain data what is your strategy for the node management, thank you

1 Like

Hello @oynozan thanks for building on TRON!

Especially for a new kind of service. Kudos for going trough all the efforts (I checked the github issue thread since May!)

I have some questions, hope you can get to clarify :slight_smile:

  • Which kind of customers do you envision you will have and their use cases for a websocket?
  • Is your websocket capable of fetching any kind of data from a full node? Or are you limiting the service for certain token standards transactions?
    *For the upcoming RPC option, are you configuring it as a Full Node API ?

Thanks!

1 Like

We have 2 nodes running on our server: Mainnet and Testnet. We don’t use (and probably cannot use) 3rd party node providers. We use our own, so we maintain it ourselves.

We used this resource: Deploy A Node

3 Likes

Hello, I’d like to clarify your questions.

Target Audience

We aim to reach all the developers building on Tron blockchain. The primary reason of why do developers choose WebSockets over HTTPS is event subscription. It means you can read an event right after it occurs. Lack of WebSockets on Tron made us build TronSocket to help other developers who suffer from same problem.

We can sum up the different protocols:

We are sure there are other developers who suffer from some other problems which can be solved with WebSockets. So, our case is only one of the examples why we need TronSocket.

Limits

We have quota limits depending on your subscription. You can see our limits here:

In our case, these 3 plans are more than enough, however, if customers demand more, we will expand our plans and quotas.

Also, we don’t restrict WebSocket methods for any of the plans. You can use all of the events even though you are using the free plan.

There are a total of 4 events in the TronSocket Event Listener API and you can listen to them. “transaction” and ‘block’ return only one type of data while ‘contract’ and ‘solidity’ return log or event data. There are helper methods in the SDK to detect them. (https://docs.tronsocket.com/sdk-socket.io)

3) RPC Option

Yes. We are and will be using our own nodes, we have all the power to listen to the network. So, it’s basically the same as what we are doing right now. Our WebSocket implementation also interacts with the same Full Node API. In our case, the API is our own server, not a third party.

3 Likes

Thank you for your reply to me I am understanding you more clearer now

2 Likes