All lessons · CCC (TypeScript SDK) · Start here · Glossary
Plain CKB transfer with a CCC signerBasicFrom one fix
From one fix · Check: right · Checked 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.
Why it matters: Without completeInputsByCapacity and completeFeeBy the transaction has no inputs to fund the output and no fee, so the node rejects it.
Pattern
await transaction.completeInputsByCapacity(signer); await transaction.completeFeeBy(signer);Taken from the commit, shortened.
- Concepts
- Transaction building and fees, Witnesses and signatures
- Evidence
- From one fix: from one project, checked against its commit
- First seen
- 2026-10-12
- Last changed
- 2026-10-12
- 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-10-12 · officialcmg/ckb-keyway · more from this project
More about 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
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
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.