Ritu Singh
Problem
I am trying to create a USDT transaction and I am having hardness to sign the transaction after creating it because the >GetTransactionSign method is deprecated.
They advice to do it offline but I don't know and I couldn't find an explanation on docs. Can you show me a code example of how to do it?
This is how I created the transaction:
Transaction signature generation process (from documents)
Calculate the hash of the transaction.
Sign the transaction hash with the sender's private key.
Add the generated signature to the transaction instance.
Answer
Signing the transaction requires the use of the private key. They don't want you calling an external API to do this because private keys are meant to be private. This is what is meant by "doing it offline", as in do it in your own code so that you remain the only person with access to the private key.
You may want to take a look at the >iexbase/tron-api package. It is a PHP based implementation of the Tron API. Even if you don't use that package, you can dig through the code and see how they handle the signing.
You can >start here which is the function that creates a transaction, signs it, and then sends it.
Answered by: >patricus
Credit: >StackOverflow
Blogs Link:
>How to solve the issue of producing the wrong output value in PHP?
>How to merge cells with HTML, CSS, and PHP?
>PHP Error Solved: htaccess problem with an empty string in URL
>How you can create array with associative array in other array php?
>How to send multiple HTML form fields to PHP arrays via Ajax?