Sign Message
Once the web application is connected to Blocto wallet, it can sign the message on behalf of the user, with the user's permission.
In order to sign a message, the web application must:
Create a sign message request payload.
Have it be signed by the user's Blocto wallet.
Sign a message
Verify signatures
After getting the signature, you might want to verify it to see whether it's valid. For this purpose, we need to figure out the keys that we used to sign the message since Blocto wallet creates multi-signers account for you. By checking with the bitmap in the response you got, you can get the public keys that we need for verifying the signatures.
Here we use tweetnacl for verifying the message. For each signature, we need to verify with the corresponding public key we just got by reading bitmap. Every signature should pass the verification.
Sample Code
Last updated