Signing a Message

Once a web application has connected to the ME Ethereum wallet, it can prompt users to sign messages. Signing is commonplace amongst many dApps, as it gives application owners the ability to verify ownership of the wallet. Signing a message does not require any transaction fees!

Let's take a look at what this looks like:

async function signWalletMessage() {
  try {
    const signer = await provider?.getSigner();
    await signer.signMessage(
      "Hello, World! 🌍 Welcome to the Magic Eden wallet on Ethereum"
  } catch (error) {

As you can see, it is relatively simple to prompt users to sign a message. Go ahead and check out sign message in our demo app to see what the full code looks like.