Skip to content

docs: clarify sign_message contract across chains - #185

Open
teyrebaz33 wants to merge 2 commits into
open-wallet-standard:mainfrom
teyrebaz33:codex/clarify-sign-message-contract
Open

docs: clarify sign_message contract across chains#185
teyrebaz33 wants to merge 2 commits into
open-wallet-standard:mainfrom
teyrebaz33:codex/clarify-sign-message-contract

Conversation

@teyrebaz33

Copy link
Copy Markdown

Summary

Clarifies the intended contract of signMessage across chains in the signing interface spec.

Changes

  • clarify that signMessage uses each chain's message-signing convention
  • remove EIP-712 typed data from the signMessage request shape
  • document that current reference implementation behavior varies by chain
  • point EVM typed structured data signing to signTypedData

Verification

  • verified the documented key names and operation names against the code
  • verified the documented chain behaviors against the current signer implementations for EVM, Bitcoin, Tron, Sui, Cosmos, Filecoin, Solana, TON, and XRPL
  • rebased onto origin/main

Notes

  • Rust tests were not run in this environment because cargo is not installed

Closes #183

@teyrebaz33
teyrebaz33 requested a review from njdawn as a code owner April 4, 2026 10:23
@vercel

vercel Bot commented Apr 4, 2026

Copy link
Copy Markdown

@teyrebaz33 is attempting to deploy a commit to the MoonPay Team on Vercel.

A member of the Team first needs to authorize it.

Addresses the design questions raised in open-wallet-standard#183:

1. sign_message IS a user-facing cross-chain off-chain signing primitive,
   not a raw-byte escape hatch (use sign() for that).

2. It only exists where there is a recognized ecosystem convention.
   Chains without one SHOULD return CHAIN_NOT_SUPPORTED.

3. The interface is not a low-level utility — raw-byte signing under
   sign_message falsely implies interoperability that does not exist.

4. Transaction signing (sign/signAndSend) and off-chain message signing
   (signMessage) remain strictly separate. EIP-712 typed data is a third
   distinct operation (signTypedData).

5. Filecoin, Solana, and TON currently sign raw/hashed bytes without a
   recognized off-chain envelope — documented as a compatibility
   behavior, not the intended design.

Added a chain behavior table, design intent section, and guidance for
contributors adding new chains (e.g. Nano): a canonical specification
is required before sign_message support can be added.

Removed typedData from SignMessageRequest (use signTypedData instead).
@cbrunnkvist

Copy link
Copy Markdown
Contributor

It would be great to see this clarification confirmed & merged - as there are several uses and potential application uses for this, even if done totally "off-chain" for chains that do not support publishing generic signature blocks.

@0xultravioleta

Copy link
Copy Markdown
Collaborator

Thanks for putting this table together. Most of the rows match the code, but a couple need correcting before merge.

The Cosmos row is inaccurate. The signer doesn't do ADR-036 Amino MsgSignData; sign_message just hashes the message with SHA256 and signs that hash directly. Could you update the row to describe what the code actually does?

The table is also missing a few chains. NEAR and Spark both sign messages and should have rows describing what they do. Nano has a signer too, but its sign_message returns not-supported (there is no canonical Nano standard), so it belongs as an unsupported row like XRPL rather than a signing convention.

Could you fix the Cosmos row and add the three missing chains? Thanks again for the cleanup.

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.

Clarify the intended contract of sign_message across chains

3 participants