All lessons · CCC (TypeScript SDK) · Start here · Glossary
Use JsonRpcTransformers.transactionFrom to serialize CCC transactions for CKB/Fiber RPCWorkingReproduced
Reproduced · Check: right · Checked 2026-11-19
Serializing a ccc.Transaction with ccc.stringify keeps cached input fields (cellOutput, outputData) that a native RPC such as Fiber submitSignedFundingTx does not expect. JsonRpcTransformers.transactionFrom from @ckb-ccc/core/advanced emits snake_case hex with inputs containing only previous_output and since, while keeping the tx hash and witnesses unchanged, as the commit's tests check.
Why it matters: Serializing with ccc.stringify sends cached input metadata (cellOutput, outputData) in a non-RPC shape to the native Fiber node's submitSignedFundingTx. The commit's tests show the RPC form must carry only previous_output and since per input, with the hash and witnesses intact.
Pattern
return JsonRpcTransformers.transactionFrom(transactionLike as ccc.TransactionLike);Taken from the commit, shortened.
A test changed in the same commit
It sits next to the fix. We did not run it.
- officialcmg/ckb-keyway:
tests/managed-node.test.ts,tests/remote-ckb-signer.test.ts
Reproduced by a test
A public test runs what this lesson says on @ckb-ccc/core 1.23.1, with no node. Anyone can run it.
tests/ccc/serialize-for-rpc.test.mjs
- Concepts
- Data encoding (molecule, hex, bigints), Transaction building and fees
- Evidence
- Reproduced: reproduced by a public test
- First seen
- 2026-09-28
- Last changed
- 2026-09-28
- 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-09-28 · officialcmg/ckb-keyway · more from this project
More about CCC (TypeScript SDK)
- Parsing snake_case JSON-RPC transactions in CCC
- Transaction size for fee rate is serialized bytes plus 4
- Convert Fiber RPC snake_case scripts to CCC camelCase ScriptLike
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "Use JsonRpcTransformers.transactionFrom to serialize CCC transactions for CKB/Fiber RPC", CKB lessons, https://pulse.lusocryptolabs.com/learned/ccc/use-jsonrpctransformers-transactionfrom-to-serialize-ccc-tra, CC BY 4.0, last changed 2026-09-28.