Signing messages can be used for various method of authentication and off-chain operations, which can be put on-chain if necessary.

Prerequisite: Create Wallet


Obtain user pincode

In your app, ask the user for their wallet’s 6-digit pincode.

You must never store the user pin on your servers.


Sign Message

Fill in the message and sign. Message can be either string or byte array represented in hex string, a common case is to sign a hash.

const transaction = await wk.transactions.signMessage({
    network: Network.Base,
    signerWalletAddress: "<walelt address>",
    message: "hello world",
    userPin: "<user pin>",