From 1bd60c5bc8e1c830a9ddc1a638160d03e2cac938 Mon Sep 17 00:00:00 2001 From: Oxyn Kuvatov Date: Tue, 10 Nov 2026 22:26:41 +0500 Subject: [PATCH 1/2] document typed data signing on /wallet/sign --- uoa/api-reference/wallet-operations.mdx | 54 +++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 3 deletions(-) diff --git a/uoa/api-reference/wallet-operations.mdx b/uoa/api-reference/wallet-operations.mdx index 2400c18..c2b9a20 100644 --- a/uoa/api-reference/wallet-operations.mdx +++ b/uoa/api-reference/wallet-operations.mdx @@ -31,6 +31,44 @@ curl -X POST 'https://uoa-server.magic.xyz/wallet/sign' \ }' ``` +To sign EIP-712 typed data, send it as `transaction_data` instead of `message`: + +```bash cURL icon="square-terminal" +curl -X POST 'https://uoa-server.magic.xyz/wallet/sign' \ + -H 'Content-Type: application/json' \ + -H 'Authorization: Bearer USER_JWT_TOKEN' \ + -H 'X-MAGIC-SECRET-KEY: YOUR_MAGIC_SECRET_KEY' \ + -d '{ + "raw_data_hash": "0xe8290d5c9c62619dfbd74f495ab122e6375312f767a4ff983d4e2d55a94078b9", + "transaction_data": { + "method": "eth_signTypedData_v4", + "typedData": { + "types": { + "EIP712Domain": [ + { "name": "name", "type": "string" }, + { "name": "version", "type": "string" }, + { "name": "chainId", "type": "uint256" } + ], + "ClobAuth": [ + { "name": "address", "type": "address" }, + { "name": "timestamp", "type": "string" }, + { "name": "nonce", "type": "uint256" }, + { "name": "message", "type": "string" } + ] + }, + "primaryType": "ClobAuth", + "domain": { "name": "ClobAuthDomain", "version": "1", "chainId": "137" }, + "message": { + "address": "0x1111111111111111111111111111111111111111", + "timestamp": "1762700000", + "nonce": "0", + "message": "This message attests that I control the given wallet" + } + } + } + }' +``` + **Response:** ```json @@ -44,12 +82,22 @@ curl -X POST 'https://uoa-server.magic.xyz/wallet/sign' \ ### Request Parameters - +Provide either `message` or `transaction_data`. + + A plain text message to sign. It is signed as an EIP-191 (`personal_sign`) message over its UTF-8 bytes, so you can verify it with standard tools such as ethers' `verifyMessage`. + +EIP-712 typed data to sign, as `{"method": "eth_signTypedData_v4", "typedData": {...}}`. `typedData` has `types` (including `EIP712Domain`), `primaryType`, `domain` and `message`, as passed to `eth_signTypedData_v4`. The signature is over the typed data's EIP-712 digest, so it verifies with ethers' `verifyTypedData` (pass `types` without `EIP712Domain`). + + + +With `transaction_data`, the EIP-712 digest you computed for it. Optional; if you send it and it doesn't match the typed data, the request returns `400`. + + -Signing a bare hash is not supported. A request with `raw_data_hash` and no `message` returns `400`. +Signing a bare hash is not supported. A request with `raw_data_hash` and neither `message` nor `transaction_data` returns `400`. `transaction_data` accepts only `eth_signTypedData_v4`. ### Response Fields @@ -63,7 +111,7 @@ The hex-encoded signature. -The EIP-191 hash of `message` that was signed. +The hash that was signed: the EIP-191 hash of `message`, or the EIP-712 digest of `transaction_data.typedData`. From daeb6c965cd6339b4a31d0019d06038e9e513616 Mon Sep 17 00:00:00 2001 From: Oxyn Kuvatov Date: Tue, 10 Nov 2026 22:32:46 +0500 Subject: [PATCH 2/2] fix relative account recovery link on the Twilio configuration page --- .../customization/custom-twilio-configuration.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-wallets/authentication/customization/custom-twilio-configuration.mdx b/embedded-wallets/authentication/customization/custom-twilio-configuration.mdx index 086d2c2..484b0a9 100644 --- a/embedded-wallets/authentication/customization/custom-twilio-configuration.mdx +++ b/embedded-wallets/authentication/customization/custom-twilio-configuration.mdx @@ -61,7 +61,7 @@ Currently, we support the following Sender Types: ### How to Add a Twilio Verify Service -A Twilio Verify Service enables additional verification channels required to enable the [account recovery](embedded-wallets/authentication/features/account-recovery#account-recovery) feature. +A Twilio Verify Service enables additional verification channels required to enable the [account recovery](/embedded-wallets/authentication/features/account-recovery#account-recovery) feature. 1. Navigate to **Verify → Services** in your Twilio Console and click **Create new**