All lessons · Developer tooling · Start here · Glossary
ckb-cli tx sign-inputs stores signatures in the file's signatures map, not witness 0WorkingFrom one fix
From one fix · Check: right · Checked 2026-11-19
ckb-cli `tx sign-inputs --add-signatures` leaves witness 0's lock zero-filled and records the signature in the tx file's `signatures` map keyed by lock arg; `tx send` assembles the final witnesses from that map. A checker that inspects witness 0 for a signature before `tx send` will wrongly report the transaction as unsigned, so read `doc.signatures[lockArg]` instead.
Why it matters: A pre-send checker that looks only at witness 0 reports a properly signed ckb-cli tx file as unsigned, because the signature lives in the file's signatures map until `tx send` assembles it.
Pattern
const recorded = Object.entries(doc.signatures ?? {}).find(([arg]) => arg.toLowerCase() === expectedLockArg);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-09-23
- Last changed
- 2026-09-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 (1)
- 2026-09-23 · toastmanAu/daowow · more from this project
More about Developer tooling
- ckb-cli deploy info file layout for offline multisig signing
- ckb-cli needs --skip-check to sign and send transactions with custom locks
- ckb-cli tx init overwrites an existing tx file with an empty skeleton
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "ckb-cli tx sign-inputs stores signatures in the file's signatures map, not witness 0", CKB lessons, https://pulse.lusocryptolabs.com/learned/tooling/ckb-cli-tx-sign-inputs-stores-signatures-in-the-file-s-signa, CC BY 4.0, last changed 2026-09-23.