全部经验 · 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)
- 2026-11-07 · LusoCryptoLabs/ckb-ward · 这个项目的更多经验
更多关于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
核对人: @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.