toncenter / ton-wallet

Web Wallet and Browser Extension for TON (The Open Network)
https://wallet.ton.org
GNU General Public License v3.0
192 stars 70 forks source link

add parameter dataType to ton_rawSign #135

Closed NickNekilov closed 1 month ago

NickNekilov commented 2 years ago

Message signing is a common approach for Web3 authentication.

Usually, it's the signing of human-readable messages (e.g., Welcome to yyy! Nonce: zzz). Unfortunately, TON Wallet doesn't let developers do it without converting a message to a hexadecimal string. On the other hand, signing a hexadecimal string is non-obvious (because a user doesn't understand what will be signed).

The following changes were made to solve the mentioned problem.

Introduced a new parameter dataType to method ton_rawSing. Data type can be either hex (default) or text.

Additional changes:

mr-arashmousavi commented 1 year ago

Hello

for request connect to wallet (signature) and create a transaction ( send request to smart contract ), you can give a sample code or guide my thanks