CKB Pulse

全部经验 · CCC (TypeScript SDK) · 从这里开始 · 术语表

CCC EVM and Bitcoin signers pass the exact signed text through signMessageRaw实践由所有者核对

由所有者核对 · 核对结果:正确 · 核对于 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.

为什么重要: 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.

代码模式

推荐
s.signMessageRaw = (m) => { setWalletShows(typeof m === "string" ? m : ccc.hexFrom(m)); return original.call(signer, m); };

摘自提交,已缩短。

概念
Witnesses and signatures
证据
由所有者核对: 由其来源项目的所有者核对,该所有者同时也是这些经验的发布者
首次出现
2026-11-07
最近改动
2026-11-07
最近核对
2026-11-19
对照提交的核对结果
正确:这条经验出自该提交,并且在今天的代码中仍然成立

来源(1)

更多关于CCC (TypeScript SDK)

查看此主题的全部 33 条

核对人: @LusoCryptoLabs (项目所有者), 2026-11-19.

你维护这条经验的来源项目吗?请确认或纠正

引用这条经验
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.

取自公开提交,并对照每条经验的来源提交和项目当前代码做了核对。使用前请先读来源。 文本采用 CC BY 4.0:请署名 LusoCryptoLabs, CKB lessons,并附上经验的链接。 想修改或撤下某条经验?请提交 issue。