Skip to content

document Polymarket Safe tx signing on /wallet/sign and eth_sign typedData - #142

Merged
oxyn-payward merged 1 commit into
mainfrom
WAL-372-wallet-sign-safe-tx-docs
Nov 13, 2026
Merged

oxyn-payward merged 1 commit into
mainfrom
WAL-372-wallet-sign-safe-tx-docs

Conversation

@oxyn-payward

Copy link
Copy Markdown
Contributor

Note to Reviewers

This goes with WAL-372 in uoa-server and fridge. The UOA page should merge when uoa-server deploys and the Express API pages when fridge deploys; if they ship together, merge this after both.

Polymarket's relayer only accepts Safe signatures as eth_sign over the 32-byte SafeTx hash, so partners can't use typed-data signing for Safe transactions. /wallet/sign now accepts {method: eth_sign, data: <SafeTx hash>, safeTxTypedData} and checks the SafeTx before signing. Underneath, fridge's sign/data accepts eth_sign with an optional typedData, binds data to it, and screens it.

This branch starts from the #141 branch, so its commits appear here already merged.

Changes Made

  • Adds a "Polymarket Safe transactions" section to uoa/api-reference/wallet-operations.mdx: the request shape, the four checks (canonical SafeTx; chain 137 and the user's own Safe; delegatecall only to MultiSend with plain inner calls; no calls to the Safe itself), and how to pack the signature for the relayer (a v of 31 or 32)
  • Refactors that page's transaction_data, raw_data_hash and warning text to cover both typed data and Safe transactions
  • Refactors the eth_sign row of the sign/data method table in server-wallets/express-api/wallet-operations.mdx to describe the optional typedData
  • Refactors the eth_sign method and typedData field entries in server-wallets/express-api/policy/transaction-data.mdx

Testing: How do you know it works?

  • Unit Tests
  • Integration Tests
  • Local Verification
  • Deploy Preview Verification

Manual Testing Guide

  • The Safe example is valid JSON and lists every SafeTx field in the order Safe hashes them. Its hashes and addresses are placeholders, because real values depend on the user's Safe and nonce.
  • The checks described match the uoa-server code, and the request shape matches what I tested against it. The documented typedData rule matches fridge's tests.
  • The v packing rule matches the relayer SDK's split_and_pack_sig: add 4 to 27/28, or 31 to 0/1.

@oxyn-payward oxyn-payward self-assigned this Nov 12, 2026
@mintlify

mintlify Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
magic-labs 🟢 Ready View Preview Nov 12, 2026, 6:28 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@oxyn-payward
oxyn-payward merged commit 69ddce7 into main Nov 13, 2026
6 of 7 checks passed
@oxyn-payward
oxyn-payward deleted the WAL-372-wallet-sign-safe-tx-docs branch November 13, 2026 12:42

This branch was successfully deployed

1 active deployment
staging — b6389393 Deployed Nov 12, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants