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.

2 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!