CKB Pulse

All lessons · Wallets and signing · Start here · Glossary

Omnilock owner signing needs an 85 byte zeroed witness lock placeholderWorkingFrom one fix

From one fix · Check: right · Checked 2026-11-19

For an Omnilock cell spent in owner (secp256k1) mode, the WitnessArgs.lock is an 85 byte OmniLockWitnessLock (a 20 byte molecule header 0x5500000010000000550000005500000041000000 plus the 65 byte signature), so the sighash digest must be computed with an 85 byte zeroed placeholder (e.g. CCC prepareSighashAllWitness(lock, 85, client)). A digest taken over the usual 65 byte secp256k1 placeholder does not verify, which the test confirms against a real testnet spend.

Why it matters: A sighash digest computed over a 65 byte placeholder differs from the one Omnilock verifies against the 85 byte OmniLockWitnessLock, so the signature does not verify and the spend fails.

Pattern

Prefer
const digest = await digestOf(onChain, lock, 85, client);

Taken from the commit, shortened.

A test changed in the same commit

It sits next to the fix. We did not run it.

Concepts
Witnesses and signatures, Data encoding (molecule, hex, bigints)
Evidence
From one fix: from one project, checked against its commit
First seen
2026-10-23
Last changed
2026-10-23
Last checked
2026-11-19
Check against the commit
right: the lesson follows from its commit and still holds in the code today

Sources (2)

More about Wallets and signing

All 23 in this topic

Do you maintain a project this lesson came from? Confirm or correct it

Cite this lesson
LusoCryptoLabs, "Omnilock owner signing needs an 85 byte zeroed witness lock placeholder", CKB lessons, https://pulse.lusocryptolabs.com/learned/wallets/omnilock-owner-signing-needs-an-85-byte-zeroed-witness-lock, CC BY 4.0, last changed 2026-10-23.

Drawn from public commits and checked against the commit each one came from and the project's code today. Read the source before you rely on one. Text under CC BY 4.0: credit LusoCryptoLabs, CKB lessons, with a link to the lesson. Want a lesson changed or removed? Open an issue.