All lessons · CCC (TypeScript SDK) · Start here · Glossary
Sign a prepared transaction without broadcasting via CCC signOnlyTransactionWorkingFrom one fix
From one fix · Check: partly right · Checked 2026-11-19
signer.signOnlyTransaction(tx) asks the CCC signer to sign a transaction you already completed (inputs, fee, cell deps, zero placeholder witness) without preparing or sending it. Treat the wallet as untrusted: pass it a copy, recheck the connected account after it returns, and verify the signed result against the sign hash you got from tx.getSignHashInfo(lock, client) on the prepared transaction (same tx hash, other witnesses untouched, signature recovers to the expected public key).
Why it matters: Without this, the wallet could switch accounts during signing or return an altered transaction, and the app would accept a signature it never checked.
Pattern
const signed=await signer.signOnlyTransaction(c.Transaction.fromBytes(req.transaction));Taken from the commit, shortened.
- Concepts
- Witnesses and signatures, Transaction building and fees
- Evidence
- From one fix: from one project, checked against its commit
- First seen
- 2026-11-09
- Last changed
- 2026-11-09
- Last checked
- 2026-11-19
- Check against the commit
- partly right: a true core, with a part that is loose or too wide
Sources (1)
- 2026-11-09 · Ticoworld/QuotaCell · 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, "Sign a prepared transaction without broadcasting via CCC signOnlyTransaction", CKB lessons, https://pulse.lusocryptolabs.com/learned/ccc/sign-a-prepared-transaction-without-broadcasting-via-ccc-sig, CC BY 4.0, last changed 2026-11-09.