Ckb-viz: read any CKB transaction as a flow of cells

Hey all,

The cell model is the single hardest thing about CKB to hold in your head. A raw transaction from a node is a wall of hex: capacities in shannons, code hashes, packed since values, molecule witnesses. Nothing about it tells you “Alice sent 100 CKB and 1,500 USDI to Bob and got change back.”

So I built ckb-viz to close that gap.

:link: Live: https://ckb-viz.truthixify.dev

:laptop: Code: GitHub - truthixify/ckb-viz: A read-only CKB (Nervos) transaction visualizer — paste a tx hash, see the input→output cell flow with decoded scripts, capacity/fee, and lineage. · GitHub

Paste a transaction hash (or just open it, it loads the network’s latest tx) and

you get:

  • The cell flow: inputs → the transaction → outputs, connected, with capacity and the fee visible as the difference between the two sides.
  • Decoded scripts: known locks/types named (Secp256k1, Omnilock, JoyID, xUDT, Nervos DAO, Spore…), unknown ones clearly marked, never guessed.
  • A plain-language summary: “A token transfer of 19,310.74 USDI”, “A Nervos DAO withdrawal” (with the real fee split out from the interest earned), and so on.
  • Cell lineage: trace an input back to where it came from, an output forward to where it was spent.
  • Full cell detail: ckb2021 address, code hash, args, raw and decoded data, witnesses, and inline Spore image previews.

It reads directly from a public node (no backend), works on mainnet and testnet, and every transaction is a shareable link.

Where this is going: the honest aim is something like Tenderly, but for CKB, the kind of dev/debug tooling EVM has and we don’t. This visualizer is the starting point (the “transaction overview” layer). Next on my mind: why did a tx fail (and which script), then dry-run/simulation, and eventually a CKB-VM debugger with cycle profiling.

It’s early, and I’d genuinely love feedback on what’s confusing, what’s missing, or what you’d want next. And if you find a transaction it decodes wrong or doesn’t recognize, send me the hash. :folded_hands:

12 Likes

Very cool project, would help a lot of devs if you took it further

3 Likes

This is a great example of a tool that makes CKB much more approachable !

The Cell Model is incredibly powerful, but it can also be difficult for newcomers to understand. A visual way to explore transactions could make learning and debugging much easier.

1 Like

Very neat tool, love it!

1 Like

cool stuff, the UI is amazing!

2 Likes

looks promising, starred.

2 Likes

Quick update on ckb-viz. A few new things landed:

  • Address view — paste a ckb/ckt address to see its CKB balance, token holdings, and recent transactions.
  • Transaction simulator (/simulate) — paste a raw transaction and run it against current chain state: it reports the cycles consumed, or the exact script that fails. The flow renders red and halts when a transaction is rejected.
  • Smaller bits: raw JSON view + copy, off-chain Spore content links, and better error messages.

:link: https://ckb-viz.truthixify.dev

Feedback and hard-to-decode transaction hashes very welcome.

1 Like

Quick update: ckb-viz now has an interactive primer at /learn for folks new to CKB. It came out of a request from neon at the last CKBuilder meeting.

It walks through the cell model using a piggy bank for a wallet and coins for cells: a balance as a set of coins, what a lock and type do, why a cell reserves capacity, and how a payment consumes coins and mints new ones.

There is a build-your-own-transaction step where you pick which coins to spend and watch the inputs, outputs, change and fee balance out (and it stops you if the change would fall below the 61 CKB minimum), plus a walkthrough of a transaction’s life from the mempool through proposed to committed. It ends by mapping the metaphor onto the real field names (cell, capacity, lock and type script, input, output, witness), so stepping over to read an actual transaction feels less foreign.

Try it: ckb-viz — CKB transaction visualizer

1 Like

0x1166ca65353a5cdd3379229280e2805d9065c9b39f3e11d4cf3352542aeef996

1 Like

Thank you, this is a huge transaction, 5000+ inputs and 263 outputs, looking for a way to display this(for now, I implemented it in a way that only the first few are shown).

2 Likes

Pushed another round of updates to ckb-viz. Here is what is new since the last post.

See who gained and lost, not just cell by cell.

There is a new “Owner net” view next to the cell flow. It groups a transaction’s cells by their lock and shows the net CKB and net token per party, with the fee split out to miners. A payout with a couple hundred outputs now reads as one payer and N recipients instead of a wall of near identical cards.

Large transactions actually work now.
A transaction with thousands of inputs used to hang. It renders right away (from a sample), and there is a button to resolve every input on demand, with a progress bar you can cancel. Once it finishes, the input total, fee, and the full owner-net fill in. I tested it on a mainnet transaction with 5,241 inputs and 263 outputs: it now computes the real fee and reads as one payer sending to about 262 recipients.

More decoding depth.

  • RGB++ and BTC time locks now show the Bitcoin UTXO they are bound to, with a link out to a Bitcoin explorer.
  • Spore DOBs are labelled as generative objects and their DNA is shown. I am not rendering the artwork yet, since that needs the DOB decoder running, and I would rather show what is real than guess at an image.
  • A Nervos DAO withdrawal shows its unlock epoch from the input’s since, with a note about the 180-epoch maturity cycle.

Lineage graph.
Beyond the back and forward trace, there is now a small graph of a transaction’s neighbourhood: the parents that created its inputs on the left, the transactions that spent its outputs on the right. Click any node to re-center and walk the graph hop by hop.

Export.
You can export the flow as an SVG or PNG to share.
It all stays read-only and runs against a plain CKB node, with no indexer needed for the core views. Feedback is welcome, and if you have a transaction that decodes poorly or looks wrong, send it over, those are the most useful ones to see.

5 Likes