Todas as lições · CCC (TypeScript SDK) · Começa aqui · Glossário
Plain CKB transfer with a CCC signerBásicoDe uma correção
De uma correção · Verificação: certa · Verificada em 2026-11-19
With CCC, a simple CKB transfer is built as ccc.Transaction.from({ outputs: [{ lock, capacity }] }), then transaction.completeInputsByCapacity(signer) and transaction.completeFeeBy(signer) are called before signer.sendTransaction(transaction). The recipient lock comes from ccc.Address.fromString(address, signer.client), and its .script is used as the output lock.
Porque importa: Without completeInputsByCapacity and completeFeeBy the transaction has no inputs to fund the output and no fee, so the node rejects it.
Padrão
await transaction.completeInputsByCapacity(signer); await transaction.completeFeeBy(signer);Tirado do commit, encurtado.
- Conceitos
- Transaction building and fees, Witnesses and signatures
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-10-12
- Última mudança
- 2026-10-12
- Ú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-10-12 · officialcmg/ckb-keyway · mais deste projeto
Mais sobre CCC (TypeScript SDK)
- Reserve co-signer witness space before completeFeeBy in multi-signer CCC transactions
- Sign each lock group with its own placeholder length and witness shape
- completeFeeBy adds change instead of shrinking outputs, breaking output bound proofs
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Plain CKB transfer with a CCC signer", CKB lessons, https://pulse.lusocryptolabs.com/learned/ccc/plain-ckb-transfer-with-a-ccc-signer, CC BY 4.0, last changed 2026-10-12.