Todas as lições · Apps and UI · Começa aqui · Glossário
Witness data in input_type and folding sub-minimum changePráticoDe uma correção
De uma correção · Verificação: em parte certa · Verificada em 2026-11-19
Put the type script's witness data in WitnessArgs.input_type of each input it guards (the type script reads the first witness of its own input group), so the lock field stays free for the wallet's signature and one signature can cover several such inputs. If the change left after a fixed fee is below a plain cell's minimum occupied capacity, add it to an existing output whose scripts accept extra capacity; if there is no such output, refuse the build instead of creating a cell that cannot exist.
Porque importa: If the type script's data sat in the lock field, the wallet's signature would overwrite it or clash with it, and one wallet could not sign a transaction that retires several tickets at once.
Padrão
witnesses: inputs.map(() => WitnessArgs{inputType: data}); if (rest < plainFloor) outputs[0].capacity += restUm teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- toastmanAu/daowow:
apps/web/test/retire-tx.test.js
- Conceitos
- Witnesses and signatures, Transaction building and fees, Capacity and cell size
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-11-14
- Última mudança
- 2026-11-14
- Última verificação
- 2026-11-19
- Verificação contra o commit
- em parte certa: um núcleo verdadeiro, com uma parte solta ou demasiado larga
Fontes (1)
- 2026-11-14 · toastmanAu/daowow · mais deste projeto
Mais sobre Apps and UI
- Pre-sign checkers must mirror every on-chain comparison
- Exact CKB-to-shannon conversion with BigInt
- Occupied capacity depends on the actual lock's args length
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Witness data in input_type and folding sub-minimum change", CKB lessons, https://pulse.lusocryptolabs.com/learned/apps/witness-data-in-input-type-and-folding-sub-minimum-change, CC BY 4.0, last changed 2026-11-14.