CKB Pulse

All lessons · Wallets and signing · Start here · Glossary

One placeholder witness per input when all inputs share one lockWorkingFrom one fix

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

In this deploy builder, several funding inputs all share the owner's lock. The signing witness (WitnessArgs) goes at index 0, and every other input gets an empty "0x" witness, so the witnesses list stays as long as the inputs list. That matches the secp256k1 sighash script group layout, where the first witness of the group carries the signature and covers the rest.

Why it matters: Without one witness slot per input, a multi-input transaction under one secp256k1 lock has no agreed place for the single group signature, so signing tools and the lock script's witness hashing see a layout that does not match the inputs.

Pattern

Prefer
tx["witnesses"] = [c.witness()] + ["0x"] * (len(points) - 1)

Taken from the commit, shortened.

Concepts
Witnesses and signatures, Transaction building and fees
Evidence
From one fix: from one project, checked against its commit
First seen
2026-11-05
Last changed
2026-11-05
Last checked
2026-11-19
Check against the commit
right: the lesson follows from its commit and still holds in the code today

Sources (1)

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, "One placeholder witness per input when all inputs share one lock", CKB lessons, https://pulse.lusocryptolabs.com/learned/wallets/one-placeholder-witness-per-input-when-all-inputs-share-one, CC BY 4.0, last changed 2026-11-05.

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.