OpenProduct / openmask-extension

A TON wallet in your Browser. MetaMask Extension analog for The Open Network.
https://openmask.app
GNU General Public License v3.0
106 stars 31 forks source link

feat: support long message sign for PersonalSign #48

Closed witter-deland closed 4 months ago

witter-deland commented 5 months ago

As it describes, the message is hashed first, so that messages of any length can be supported

@KuznetsovNikita

KuznetsovNikita commented 4 months ago

Hello @witter-deland For what purpose do you use this feature?

witter-deland commented 4 months ago

Thanks for your feedback. We need to sign some structured data to confirm the user's wallet owner identity. In order to allow users to understand the content of the currently signed message, structured data is a better way, so the message will be longer (more than 120 characters). Therefore, we need to support the signature of longer messages.

witter-deland commented 4 months ago

Although I can directly hash the message and then call PersonalSign, the message displayed to the user is garbled, which is not user-friendly.