All lessons · CCC (TypeScript SDK) · Start here · Glossary
CCC EVM and Bitcoin signers pass the exact signed text through signMessageRawWorkingChecked by the owner
Checked by the owner · Check: right · Checked 2026-11-19
In CCC, the EVM and Bitcoin signers' signTransaction builds the text to sign and passes it to this.signMessageRaw. A dApp can temporarily replace signMessageRaw on the signer instance, record the argument, call the original, and restore it afterwards, to show users the text the wallet will sign. Omnilock in Ethereum display mode (auth flag 0x12) passes "CKB transaction: 0x…" and Bitcoin signers pass "CKB (Bitcoin Layer) transaction: 0x…". PW-lock and Omnilock with flag 0x01 pass a bare 32 byte hash. This relies on CCC internals, so recheck it when upgrading.
Why it matters: Without seeing the exact text, users are shown a "CKB transaction" prompt or a bare hash they cannot check against the page, so they cannot confirm what they are signing.
Pattern
s.signMessageRaw = (m) => { setWalletShows(typeof m === "string" ? m : ccc.hexFrom(m)); return original.call(signer, m); };Taken from the commit, shortened.
- Concepts
- Witnesses and signatures
- Evidence
- Checked by the owner: checked by the owner of the project it came from, who is also the publisher of these lessons
- First seen
- 2026-11-07
- Last changed
- 2026-11-07
- Last checked
- 2026-11-19
- Check against the commit
- right: the lesson follows from its commit and still holds in the code today
Sources (1)
- 2026-11-07 · LusoCryptoLabs/ckb-ward · more from this project
More about CCC (TypeScript SDK)
- Re-zero the witness lock before recomputing the sign message with getSignHashInfo
- Reserve co-signer witness space before completeFeeBy in multi-signer CCC transactions
- Adding a wallet missing from CCC's connector via a SignersController subclass
Checked by @LusoCryptoLabs (owner of the project), 2026-11-19.
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "CCC EVM and Bitcoin signers pass the exact signed text through signMessageRaw", CKB lessons, https://pulse.lusocryptolabs.com/learned/ccc/ccc-evm-and-bitcoin-signers-pass-the-exact-signed-text-throu, CC BY 4.0, last changed 2026-11-07.