Sign Message

Make sure you initialize Blocto SDK first

Once your app is connected to Blocto wallet, it can sign message on behalf of the user, with the user's permission.

To sign a message, the app must specify the sign type. All available types are listed below.

Sign TypeTypeMessage

ETH Sign


hex string (0x prefix)

Personal Sign


plain string

Sign Typed Data v3


json string

Sign Typed Data v4


json string

Sign Typed Data

(currently identical to Sign Typed Data v4)


json string

    message: message,
    signTypeEnum: [SignTypeEnum.Eth_Sign/SignTypeEnum.Personal_Sign/SignTypeEnum.SignTypeData/...],
    address: walletAddress,
    callback: signature => {
        Debug.Log($"Signature: {signature}");

For dApps relying on signMessage for off-chain authentication, Blocto follows EIP-1654. To verify the signature, you need to call a method on the wallet contract to check if the signature came from a rightful owner of the wallet contract.

Last updated