docs: clarify sign_message contract across chains - #185
Conversation
|
@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).
|
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. |
|
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. |
Summary
Clarifies the intended contract of
signMessageacross chains in the signing interface spec.Changes
signMessageuses each chain's message-signing conventionsignMessagerequest shapesignTypedDataVerification
origin/mainNotes
cargois not installedCloses #183