I am very interested to learn how you use tronlink in react frontend, I am trying to write an API in python to send tron usdt in very safe method offline and just broadcast it online
I will not advice to use that API as it’s never a good ideea to send PK to tge network you can use the tronweb instance from tronlink check out the docs.
You are looking to sign a transaction and then brodcast the transaction. There is tronpy check that out. I did this with TronGrid api on my project OnChain Vision.
Basically what I did was.
1.Query the contract
2.Get the function selector
3. Call the TriggerSmartContract this will get un unsign transaction
4.Sign the transaction(I use WalletConnect but you can do that manually)
5. Brodcast sign transction
And all of this with my primary key staying local on my computer.
This is just an API format do not use it for an app but it s usefull if you want to sign automatically your own transaction.
I done the sign ing with my project from HackaTRON 3 Tron Direct Debit. I think the source code is open but if anything contact me it s a little mess but will give you some perspective on how to do it or check out other projects.