CKB Pulse

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

Prefer
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)

More about CCC (TypeScript SDK)

All 33 in this topic

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.

Drawn from public commits and checked against the commit each one came from and the project's code today. Read the source before you rely on one. Text under CC BY 4.0: credit LusoCryptoLabs, CKB lessons, with a link to the lesson. Want a lesson changed or removed? Open an issue.