Todas as lições · CCC (TypeScript SDK) · Começa aqui · Glossário
CCC EVM and Bitcoin signers pass the exact signed text through signMessageRawPráticoVerificada pelo dono
Verificada pelo dono · Verificação: certa · Verificada em 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.
Porque importa: 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.
Padrão
s.signMessageRaw = (m) => { setWalletShows(typeof m === "string" ? m : ccc.hexFrom(m)); return original.call(signer, m); };Tirado do commit, encurtado.
- Conceitos
- Witnesses and signatures
- Evidência
- Verificada pelo dono: verificada pelo dono do projeto de onde veio, que também publica estas lições
- Vista pela primeira vez
- 2026-11-07
- Última mudança
- 2026-11-07
- Última verificação
- 2026-11-19
- Verificação contra o commit
- certa: a lição sai do commit e continua a valer no código de hoje
Fontes (1)
- 2026-11-07 · LusoCryptoLabs/ckb-ward · mais deste projeto
Mais sobre 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
Verificada por @LusoCryptoLabs (dono do projeto), 2026-11-19.
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
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.