All lessons · CCC (TypeScript SDK) · Start here · Glossary
Split CCC signTransaction from sendTransaction to retry on consumed inputsWorkingFrom one fix
From one fix · Check: partly right · Checked 2026-11-19
When several clients race to spend the same shared cell, sign with signer.signTransaction and send with signer.client.sendTransaction as two steps instead of signer.sendTransaction. The dead-input rejection only appears at broadcast, so wrapping just the send in the retry catch lets you tell contention (re-read the live cell, rebuild, sign again) from a wallet refusal or a script verification failure, which must not be retried. Cap the attempts, because each retry costs another signature.
Why it matters: With a single sign-and-send call, a lost race for the shared cell cannot be cleanly separated from a wallet refusal. The retry loop then cannot rebuild against the new live cell.
Pattern
return await signer.client.sendTransaction(signedTx);Taken from the commit, shortened.
- Concepts
- Transaction building and fees, Network and RPC reliability
- Evidence
- From one fix: from one project, checked against its commit
- First seen
- 2026-09-23
- Last changed
- 2026-09-23
- 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-09-23 · toastmanAu/daowow · more from this project
More about CCC (TypeScript SDK)
- CCC client cache can keep dropped transactions; check status without cache
- Clamp the node's get_fee_rate_statistics median before using it as a fee rate
- Classifying sendTransaction failures before dropping a pending CKB transaction
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "Split CCC signTransaction from sendTransaction to retry on consumed inputs", CKB lessons, https://pulse.lusocryptolabs.com/learned/ccc/split-ccc-signtransaction-from-sendtransaction-to-retry-on-c, CC BY 4.0, last changed 2026-09-23.