Skip to main content

Overview

Message signing allows users to prove ownership of their wallet by signing arbitrary messages. This is commonly used for authentication and verification.

Prerequisites

Sign a Message

Sign a raw message

Use signRawMessage to sign raw bytes without the EIP-191 message prefix. This is useful when you need to sign pre-hashed data or raw byte payloads.

Sign Message with SwiftUI

Common Use Cases

Authentication

Signing User Actions

Off-Chain Signatures

Verify Signatures

While signature verification typically happens on the backend or smart contract, here’s how to structure the verification data:

Best Practices

1. Always Handle Errors

2. Include Context in Messages

3. Show Loading States

4. Clear Sensitive Data

Error Handling

Next Steps

Last modified on March 24, 2026