Skip to main content
When signing messages or data, you need to properly encode your data:

Message Signing

For signing messages (personal signatures), encode your data as base64:
TypeScript

Data Signing

For /v2/wallet/sign/data, send the hash together with transaction_data, the content it was computed from. Magic recomputes the hash and rejects the request with 400 INVALID_SIGNING_PARAMS if they don’t match.
Transactions with an access list, blobs or an authorization list can’t be described in transaction_data yet. To sign an EIP-7702 authorization, use Sign EIP-7702 Authorization, which computes the hash for you.