Message Signature
Overview
DApp requires users to sign a hex message. The signed message will be forwarded to the back-end to verify whether a user's login is legitimate.
Prerequisite
The DApp sends a request asking the user to connect the wallet to the website, and the user approves to the connection.
Specification
Example
Parameters
“tronLink.tronWeb.trx.sign” accepts a hexadecimal string as the parameter. The string represents the content to be signed.
Returns
If the user chooses to sign in the pop-up window, the DApp will get the signed hexadecimal string. For example:
If an error occurs, the following information will be returned:
Interaction
If the user chooses “Reject” in the pop-up window, an exception will be thrown, which the developer can catch for further processing.
Last updated