Typescript support for TronWeb

@suterliakov

Any plans to send a pull request from your project to the official TronWeb?

@admin.hackathon
If @suterliakov were to send a PR to the official TronWeb repository, is there a chance for it to get merged?

4 Likes

Hi! Depends on what you mean by PR here.

If youā€™re talking about merging full TypeScript solution back into original JavaScript repo - then no, a) Iā€™d like to remain the maintainer of my work and b) I donā€™t see any reason to drop existing JavaScript SDK in favour of TypeScript (primary because I donā€™t consider TS a necessity for many projects, using plain JS is often more practical for small-to-medium codebases to avoid fighting compiler for nothing). The only think Iā€™d be glad to receive from Tron maintainers is mentioning my project as a third-party SDK somewhere in official docs with a link to my documentation, when it is ready.

Indeed, if you mean critical bugfixes for issues I discovered during building, then yes, Iā€™m going to submit a PR for this to support Tronweb and make it more usable. When I have some time to review my notes and prepare another branch for that, Iā€™ll certainly PR back. Iā€™m almost sure that this PR will be merged, because it doesnā€™t add backwards-incompatible changes, doesnā€™t affect external interface and targets only existing bugs.

Since the TronWeb constructor takes ā€˜privateKeyā€™ as a parameter I personally would prefer to use the TronWeb library maintained by the Official Tron Protocol over TSTron.

But I understand your position.

It would be nice if you guys can come to some sort of agreement instead of maintaining two repositories for the same library. But thatā€™s just my opinion.

Good luck.

Just to clarify: they are not the same library, because they are implemented on different languages. I did similar thing before, creating Python SDK for another chain with existing JS SDK - would you like me to merge my Python solution into JS codebase as well?

Your position about trusted source is 100% valid and understandable, hereā€™s why I want to be mentioned in official docs - it makes my implementation somewhat more trusted. After all, itā€™s up to any developer whether they can afford to rely on any source/implementation or would prefer to DIY. This is one of the major points of open source software: everybody can verify that the package is not malicious, and all bad actors are revealed at some point.

3 Likes

Nice comparison between python/js to js/ts.

/s

This project on S3 escaped my attention, but it will be quite helpful for the ecosystem.
Well done, @suterliakov!