Todas as lições · Wallets and signing · Começa aqui · Glossário
Lock code hashes differ between testnet and mainnet for Omnilock, JoyID, ACP and PW lockPráticoVerificada pelo dono
Verificada pelo dono · Verificação: certa · Verificada em 2026-11-19
When identifying a wallet's lock by its code hash, Omnilock, JoyID, anyone-can-pay and PW lock have different code hashes on testnet and mainnet (per CCC's known scripts), while secp256k1 and multisig share one across networks. Code that compares against a single testnet hash will misclassify or fail to filter mainnet locks, so keep a hash per network (or look it up from the client's known scripts).
Porque importa: With only the testnet hashes, a mainnet Omnilock, JoyID, ACP or PW lock is not recognised, so it gets a generic 'lock 0x…' label and skips the lock-specific branches, such as reading the Omnilock mode flag or choosing what the wallet will show.
Padrão
if (lock.codeHash === OMNILOCK) {Tirado do commit, encurtado.
- Conceitos
- Cell deps and script lookup
- 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-08
- Última mudança
- 2026-11-08
- Ú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-08 · LusoCryptoLabs/ckb-ward · mais deste projeto
Mais sobre Wallets and signing
- Binding an off-chain lock proof to the live cell deps it ran with
- JoyID sub key signatures depend on the live CoTA cell dep holding the sub key root
- Use the secp256k1 sighash dep group, not the bare code cell, as the lock dep
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, "Lock code hashes differ between testnet and mainnet for Omnilock, JoyID, ACP and PW lock", CKB lessons, https://pulse.lusocryptolabs.com/learned/wallets/lock-code-hashes-differ-between-testnet-and-mainnet-for-omni, CC BY 4.0, last changed 2026-11-08.