CKB Pulse

All lessons · Developer tooling · Start here · Glossary

Identify script groups by type and hashWorkingFrom one fix

From one fix · Check: right · Checked 2026-11-19

In CKB the same script hash can be both a lock script group and a type script group in one transaction, and each group has its own input and output indices. When selecting or reporting a script group, for example from a verifier's group list, match on group type together with script hash, never on the hash alone.

Why it matters: Matching by hash alone can return the lock group's members when the type group was selected (or the reverse), so the tool reports the wrong inputs and outputs for the verified group.

A test changed in the same commit

It sits next to the fix. We did not run it.

Concepts
Witnesses and signatures, Other
Evidence
From one fix: from one project, checked against its commit
First seen
2026-11-16
Last changed
2026-11-16
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 Developer tooling

All 35 in this topic

Do you maintain a project this lesson came from? Confirm or correct it

Cite this lesson
LusoCryptoLabs, "Identify script groups by type and hash", CKB lessons, https://pulse.lusocryptolabs.com/learned/tooling/identify-script-groups-by-type-and-hash, CC BY 4.0, last changed 2026-11-16.

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.