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:
Implemented proper handling errors to deliver an error to a JSON-RPC client
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 methodton_rawSing
. Data type can be eitherhex
(default) ortext
.Additional changes:
hex