Todas as lições · Developer tooling · Começa aqui · Glossário
ckb-cli tx sign-inputs stores signatures in the file's signatures map, not witness 0PráticoDe uma correção
De uma correção · Verificação: certa · Verificada em 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.
Porque importa: 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.
Padrão
const recorded = Object.entries(doc.signatures ?? {}).find(([arg]) => arg.toLowerCase() === expectedLockArg);Tirado do commit, encurtado.
- Conceitos
- Witnesses and signatures, Transaction building and fees
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-09-23
- Última mudança
- 2026-09-23
- Ú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-09-23 · toastmanAu/daowow · mais deste projeto
Mais sobre 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
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
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.