[DIS] CKB IDL: Interface Description Language and Discoverability for CKB Scripts

Summary

One-paragraph Overview:

This proposal requests a grant of $5,000 to build the next phase of the CKB IDL lifecycle: an open-source, testnet-first Script Registry for publishing, discovering, and independently verifying CKB script interfaces, together with IDL 0.1.1 empty-interface support, Molecule interoperability, and TypeScript support. It builds on the already released IDL 0.1.0 specification, Rust derive/export tooling, Rust client, binding CLI, and reference lock scripts.

Deliverables include:

  • Release CKB IDL 0.1.1, adding explicitly empty witness interfaces, with corresponding schema, specification, conformance vectors, canonicalization, commitment, and documentation updates.

  • Extend the released Rust toolchain and client to generate, bind, verify, encode, and decode explicitly empty witness interfaces alongside structured interfaces.

  • Integrate the existing Rust client and CLI with Registry publication and testnet verification workflows for wallet and transaction-builder consumption.

  • Build the open-source CKB script Registry backend for immutable package releases, IDL and artifact storage, publisher authentication, metadata, and public APIs

  • Implement testnet deployment and verification and automated discovery, connecting registered artifacts to live CKB code cells, while distinguishing cryptographically bound, legacy-attested, and unverified interfaces.

  • Build the public registry user interface for search, script/interface inspection, verification status, IDL viewing, integration guidance, and transaction-builder snippets

  • Add Molecule-to-IDL support to allow existing Molecule-based CKB scripts to generate and publish compatible IDL interfaces without abandoning Molecule

  • Update TypeScript support for CKB IDL 0.1.1, to enable TypeScript script interface consumers

Grant Amount Requested: $5,000 USD equivalent, paid in CKB at the USD value at the time of disbursement

ETA to completion: 15 weeks from Initial Funding

CKB Wallet or Funding Address: ckb1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsq2yyt9j8q6rvv06t3cnjdjvtu64t93ccqgyw9h55


Project Introduction

CKB scripts are powerful and flexible, but their interfaces are often difficult for wallets, transaction builders, indexers, and other developers to discover and use safely, without prior knowledge of the script author, source repository, or serialization implementation. A script may expect a particular lock-witness format, optional fields, nested data, tagged variants, or an encoding convention that is only documented in its source code - or not documented at all. This creates friction for integration: a developer must already know the script, find its repository, understand its serialization rules, and manually reproduce its transaction-building logic.

Consider a time-locked inheritance-vault application. Its frontend currently hard-codes the lock and Type Script deployment hashes and CellDeps, owns a Molecule codec for vault cell data, and implements bespoke create and claim transaction flows. A wallet or another frontend cannot infer this from the script’s code hash; it must find the source code and reproduce integration-specific knowledge. A bound IDL gives the ecosystem a verifiable interface artifact to discover, inspect, and - where the relevant profile is supported - decode or encode without reverse-engineering raw bytes.

The idea is partly inspired by Bitcoin’s Partially Signed Bitcoin Transaction (PSBT) workflow, which makes transaction data portable between independent tools. CKB’s programmable scripts introduce an additional requirement: transaction data alone cannot explain what an unfamiliar script expects. CKB IDL is intended to provide that complementary interface layer, allowing tools to discover and verify script-specific requirements before constructing or signing a transaction.

CKB IDL addresses this gap by providing a standard, machine-readable description of a script interface. An IDL document describes the witness data a lock script expects, including its fields, types, semantic labels, and encoding. The document can be canonically serialized, hashed, and bound to the deployed executable through an append-only trailer in the code cell. This means an integration tool can retrieve an interface document from a registry, independently verify that it matches the deployed script, and use it to construct or validate the script’s witness data.

The project is not only an IDL format. It is an end-to-end lifecycle:

  • Script authors derive or export an IDL from their Rust types or Molecule schemas.

  • Tooling validates, canonicalizes, and binds the IDL to a deployable executable.

  • A client library verifies the binding and exposes a structured witness object to wallets and transaction builders.

  • A public CKB Script Registry makes scripts, deployment information, source references, and optional interface artifacts discoverable, allowing both IDL-enabled and existing scripts to participate.

The Registry is designed as a discovery and evidence layer, not a new source of trust. The authoritative integrity check remains the binding between the canonical IDL hash and the deployed code-cell data. Registry records will distinguish between cryptographically bound interfaces, manually attested legacy interfaces, and unverified submissions, so downstream tools can make informed trust decisions.

Why now?

The foundational pieces are now sufficiently mature to connect into a usable system. The project already has a Rust derive/export workflow, an IDL 0.1.0 specification, a Rust client capable of verification and witness-object handling, binding tooling, and practical lock-script examples. The next step is to turn these separate capabilities into a public workflow that CKB developers can actually discover, publish, verify, and consume.

Molecule compatibility is a priority because Molecule is already widely used for CKB serialization. The project will define an initial Molecule encoding profile and generator that parses supported .mol schemas, preserves their existing wire format, and emits self-contained, canonical CKB IDL documents. Authors will be able to add wallet-facing descriptions and semantic labels through lightweight schema comments, with an optional metadata overlay where necessary. This gives existing Molecule-based scripts a practical path into Registry discovery and client integration without requiring them to abandon Molecule or migrate their encoded data.

By establishing this lifecycle early—before script interfaces become fragmented across incompatible conventions—CKB can gain a shared interface layer that is language-neutral, verifiable, friendly to wallet builders, and open for ecosystem adoption.

Team & Roles

  • Name/Handle: Wilfrid / @OWK50GA

  • Role: Solo developer covering protocol design, backend, and frontend, and design

  • Experience/Relevant background: I am a fullstack software developer with experience building on Blockchain. I am a Bitcoin enthusiast and Chaincode Labs BOSS challenge alumnus. While learning CKB, I studied the implications of its Cell Model and identified the lack of a standard, discoverable, machine-readable interface layer for scripts.

Current Status

The project has progressed beyond the idea stage. The core of the CKB IDL lifecycle has been designed and prototyped across several open-source repositories.

Completed or substantially implemented work includes:

  • IDL 0.1.0 specification: a dedicated specification repository defining the document structure, linear encoding profile, canonical JSON requirements, commitment model, error categories, conformance vectors, and compatibility guidance.

  • Rust derive and export tooling: ckb-idl-derive provides Rust macros for describing witness interfaces, including primitive types, fixed byte arrays, vectors, optional fields, nested structures, and explicitly tagged unions. A host-side exporter supports complete nested IDL generation.

  • Rust client library: ckb-idl-client can parse IDL documents, verify canonical commitments against a deployed executable’s binding trailer, validate witness bytes, and expose decoded witness data as structured objects.

  • Binding CLI: ckb-idl-cli provides commands for validating IDLs, generating and inspecting bindings, packaging artifacts, and verifying bound executables.

  • Reference lock scripts: multiple example lock scripts demonstrate optional fields, nested structures, tagged authorization choices, typed vectors, threshold/multisignature-style data, and commitment-based deployment artifacts.

  • Initial TypeScript work: an earlier TypeScript implementation exists and provides a starting point for the IDL 0.1.0 upgrade.

  • Community discussion: the initial interface-language proposal was published on Nervos Talk and introduced the derive, validate, and commitment direction to the ecosystem.

The work is now at the transition point from protocol/tooling prototypes to ecosystem infrastructure. The remaining work is to stabilize the released workflow, add Molecule compatibility, complete TypeScript support, and build the public registry through which scripts and their interfaces can be published, discovered, independently verified, and integrated.

Relevant links:

Architecture & Design

The proposed system completes the CKB IDL lifecycle: script authors describe an interface, bind it to a deployable executable, publish it for discovery, and allow wallets or transaction builders to verify and consume it.

The full System Design Document is available here: CKB IDL System Design Document. It covers the data model, trust model, storage, deployment operations, security controls, and open design decisions in greater detail.

IDL 0.1.1 will add explicit support for empty witness interfaces. A script that requires no structured witness_args.lock payload still benefits from a discoverable identity, deployment record, verification status, documentation, and a machine-readable declaration that its lock-witness interface is intentionally empty.

Authoring and binding

Script authors define their witness interfaces through one of three paths:

  • Rust derives and exporter: Rust scripts use ckb-idl-derive to describe supported witness types and generate an IDL document.

  • Molecule-to-IDL generation: Molecule schemas are converted into compatible IDL documents, allowing existing Molecule-based scripts to join the same discovery and client workflow.

  • Manual legacy-IDL authoring: existing scripts without an embedded commitment can still publish a manually attested interface document.

The ckb-idl-cli validates the resulting IDL, canonicalizes it according to the IDL specification, calculates its SHA-256 digest, and appends a compact binding trailer to the compiled executable. The bound executable is then deployed as CKB code-cell data.

The trailer commits the deployed executable to the exact canonical IDL document. This gives a consumer a way to verify that an interface retrieved from the Registry actually corresponds to the deployed script.

Script Registry

The CKB Script Registry is an open-source, testnet-first discovery and evidence service for CKB scripts, independent of their implementation language, serialization format, or adoption of CKB IDL.

Scripts can be registered with or without an IDL document. Each registry entry can contain script identity, deployment references, publisher information, release metadata, source references, documentation, and optional interface artifacts.

CKB IDL is the first deeply supported interface standard, enabling cryptographically verifiable interface discovery and structured witness integration. Scripts without IDL remain discoverable, although they do not receive IDL-specific verification or encoding capabilities.

Scope and Focus

Although the Registry is designed as general-purpose infrastructure for CKB scripts, the primary focus of this proposal is completing the CKB IDL lifecycle. The Registry will accommodate scripts without IDL artifacts from its first release, ensuring that its architecture does not depend on adoption of a particular interface standard. However, the development effort, verification tooling, client integrations, and reference workflows funded by this grant will prioritize CKB IDL publication, discovery, verification, and consumption. Broader script-related capabilities can be developed incrementally without requiring a redesign of the Registry.

The initial registry architecture consists of:

  • a Rust API service for public reads, publisher authentication, package publication, validation, and release metadata

  • a background worker for CKB RPC verification, confirmation checks, code-cell liveness checks, retries, and candidate discovery

  • PostgreSQL for publishers, namespaces, releases, deployments, verification claims, jobs, and audit events;

  • content-addressed object storage for immutable IDL documents, manifests, and artifacts;

  • a TypeScript web frontend for search, package pages, interface inspection, deployment evidence, and integration guidance.

GitHub OAuth is sufficient for initial publisher authentication. CKB wallet ownership proofs will be added later, but are not necessary to establish the first useful publication workflow.

The registry is not a general-purpose transaction explorer. It focuses on script interfaces, artifacts, deployment evidence, and integration information, not generic chain analytics.

Consumer Verification

Wallets, SDKs, frontends, and transaction builders use the Registry for script discovery and integration information, but do not need to trust its claims blindly.

A consumer flow is:

  1. Resolve a script or package through the Registry.

  2. Retrieve its registered metadata, available artifacts, and deployment references.

  3. Independently verify the relevant deployment claims against CKB, including the referenced code cell and executable identity.

  4. Inspect the available interface artifacts, if any.

For scripts with a cryptographically bound CKB IDL:

  1. Retrieve the canonical IDL document and the deployed executable’s code-cell data.

  2. Read and validate the executable’s binding trailer.

  3. Canonicalize the retrieved IDL and calculate its SHA-256 digest.

  4. Confirm that the digest matches the commitment in the binding trailer.

  5. Use the verified interface to decode existing witness data or encode structured witness inputs for transaction construction.

For scripts with manually attested CKB IDLs:

  1. Retrieve the published IDL and its associated publisher attestation.

  2. Validate the IDL document against the specification and inspect its declared relationship to the script.

  3. Use the interface for encoding, decoding, or integration where appropriate, while recognizing that its correspondence to the executable has not been cryptographically established.

For scripts without CKB IDL:

  1. Access the available deployment information, source references, documentation, and integration guidance.

  2. Integrate using the script’s existing conventions or supported tooling.

These workflows distinguish verification of on-chain deployment facts from verification of interface commitments. A script may have independently verified deployment information without having a cryptographically bound IDL.

The Registry provides discovery and evidence rather than serving as a trusted authority. For bound interfaces, consumers can independently verify the IDL-to-executable relationship. For manually attested interfaces, the Registry identifies the source and limitations of the attestation without presenting it as equivalent to cryptographic binding.

Verification States

The registry records independent claims rather than presenting every listing as “verified”. A package may be:

  • Cryptographically bound: the canonical IDL digest matches the binding trailer in a deployed executable.

  • Manually attested: an identified publisher has documented an existing script without a trailer binding.

  • Unverified: submitted or discovered, but not yet sufficiently validated

  • Historical, spent, deprecated, or withdrawn: retained for transparency, but not presented as an active recommended deployment.

This allows existing scripts to be documented now without representing them as equivalent to newly bound IDL-enabled scripts.

Design rationale

The design is deliberately lightweight for the first release. It avoids arbitrary source builds, uploaded-code execution, on-chain Registry contracts, package dependency resolution, and a general explorer infrastructure. The Registry validates artifacts and chain facts; it does not execute scripts or claim to audit them.

This keeps the MVP focused on the core value proposition:

author → generate → validate → bind → deploy → publish → discover → verify → consume

It also provides a practical adoption path for both new Rust-based scripts and existing Molecule-based CKB development. The architecture is testnet-first, open-source, and designed to grow into mainnet support only after the publication, verification, resource-limit, and operational workflows have been demonstrated in practice.

Practical Use Cases, Ecosystem Integrations & Key Benefits for CKB

CKB IDL would provide a common interface layer for CKB scripts: one that makes script requirements understandable to both humans and software without weakening CKB’s flexibility or requiring a centralized authority to be trusted.

1. CCC: Generic Transaction Construction for Custom Scripts

CCC provides TypeScript transaction construction and wallet integration for CKB applications. Integrating an unfamiliar custom script still requires developers to understand its deployment, witness encoding, and transaction requirements.

CKB IDL would let CCC-based applications discover and verify published script interfaces, generate structured witness inputs, and encode witness data before passing transactions to CCC for signing and submission. This reduces script-specific integration work without replacing CCC’s existing responsibilities.

2. CellScript: Cross-Language Script Interoperability

CellScript already provides compiler-level interfaces, generated builders, and a registry for its development ecosystem. CKB IDL would complement these capabilities by providing a language-neutral interface artifact for deployed scripts.

CellScript-generated scripts could publish standard IDLs that Rust applications, TypeScript frontends, wallets, and other consumers can independently verify and use without understanding CellScript-specific compiler metadata.

3. Type Scripts: Programmable Game-State Transitions (Future)

A CKB game could represent player positions and game state using cells governed by Type Scripts. A future Type Script IDL profile could describe state-cell data, required move inputs, and structural transaction requirements, enabling frontends to construct transactions while the Type Script enforces valid state transitions.

This use case is outside the proposed IDL 0.1.1 scope but illustrates the value of extending CKB IDL beyond lock-witness interfaces.

4. A verifiable public registry

The Script Registry will provide a public place to search scripts, inspect interfaces, view deployment evidence, and find integration guidance. Importantly, it will not ask wallets to trust a registry database blindly. The registry is a discovery and evidence layer; the client can independently verify the IDL commitment embedded in the executable’s code-cell data.

This distinction is important for CKB: public convenience does not need to compromise self-verification.

Even when a script has no CKB IDL, developers can discover its registered identity, deployment locations, source references, and available documentation through the same Registry.

5. Support for existing as well as new scripts

Not every existing CKB script can be rebuilt with an IDL commitment. The Registry will support manually authored legacy IDLs, but label them distinctly from cryptographically bound interfaces. This allows the ecosystem to document important existing scripts immediately while preserving an honest trust model.

Detailed Deliverables & Milestones

Milestone 0: Initial Funding

Deliverables:

  • Public roadmap and issue board

  • Confirmed release plan

  • Registry repository scaffold

  • CI and local Docker Compose environment

  • Contribution/security documentation

ETA: Week 0

Budget: $500

Milestone 1: Registry Publication Core

Deliverables:

  • Rust API

  • PostgreSQL package/release model

  • Immutable IDL and manifest storage

  • GitHub OAuth publisher flow

  • Namespace and release publication

  • Public read API endpoints

  • Registration and publication of CKB scripts without requiring an IDL artifact

ETA: Week 1 - 3

Budget: $1000

Milestone 2: Testnet Verification & Lifecycle Integration

Deliverables:

  • CKB testnet verification worker

  • Deployment, confirmation, and liveness checks

  • Binding trailer validation,

  • Registry/CLI publication flow

  • Legacy/manually attested IDLs

  • End-to-end publication of reference scripts

  • Ensuring deployment verification works independently of binding trailer

ETA: Week 4 - 7

Budget: $1500

Milestone 3: Discovery and Public Interface

Deliverables:

  • TypeScript registry frontend

  • Package, release, interface, and deployment pages

  • Exact and full-text search

  • Verification-status UI

  • Generated Integration Snippets

  • Initial candidate discovery and revalidation for code cells carrying recognizable IDL binding trailers.

ETA: Week 8 - 11

Budget: $1000

Milestone 4: Molecule and TypeScript Client Interoperability, and Toolchain Hardening

Deliverables:

  • Molecule-to-IDL generation for the supported IDL 0.1.1 profile.

  • IDL 0.1.1 support for explicitly empty witness interfaces across the specification, Rust derive/exporter, client, CLI, conformance vectors, and reference scripts.

  • TypeScript client update to IDL 0.1.1

  • Cross toolchain examples

  • Developer documentation

ETA: Week 12 - 15

Budget: $1000

Total Requested: $5000

A milestone is complete when its code and documentation are public, automated tests pass, the named workflow is demonstrable on testnet where applicable, and a milestone progress report is published.

Budget Breakdown

The requested grant is $5000 USD equivalent for 15 weeks of focused development and testnet delivery.

Development costs: $4000

  • IDL 0.1.1 release and hardening work;

  • Rust derive/export/client/CLI update;

  • Registry API and worker;

  • database and storage integration;

  • CKB testnet verification;

  • frontend;

  • Molecule generation;

  • TypeScript update;

  • testing and reference integrations.

Infrastructure and hosting: $500

  • Testnet API/worker hosting

  • Managed PostgreSQL, object storage, CDN usage

  • Domain/DNS, and

  • CKB RPC access where required.

Documentation and Community Engagement: $300

  • Specification publication,

  • Integration guides & API documentation

  • Reference examples

  • Community feedback, and implementation updates

Security Audit: $0

No formal third-party audit is included. The Registry is testnet-only, does not execute uploaded code, and will undergo automated testing and public review. A formal audit and mainnet launch are future work.

Project Management: $200

  • Milestone planning,

  • Public roadmap maintenance

  • Release coordination

  • Progress reporting.

Out-of-Scope / Possible Future Funding Needs

This proposal is deliberately focused on a testnet-first, open-source implementation of the CKB IDL lifecycle and Script Registry. The following are not included in the requested $5,000 budget and may require later community discussion, follow-up grants, or independent funding.

  • Mainnet Registry launch and production SLA: Mainnet support will be considered only after testnet verification, backup recovery, monitoring, rate-limit testing, and client integration have been demonstrated.

  • Formal third-party security audit: The Registry does not execute uploaded code and this proposal does not deploy a new on-chain Registry contract. However, formal audits may be appropriate before a mainnet launch or if future on-chain components are introduced.

  • Long-term maintenance and infrastructure costs: The proposal covers development and initial testnet operation, not indefinite hosting, monitoring, support, or maintenance.

  • CKB wallet ownership proofs: MVP publisher authentication uses GitHub OAuth. Linking a publisher identity to CKB address ownership is a future enhancement.

  • Reproducible source-build verification: The Registry may link source code, but independently rebuilding source and proving it produces the registered executable requires controlled build infrastructure and is not included.

  • Type Script interface support: The initial IDL profile focuses on lock-witness interfaces. Type Script support requires separate design work, particularly around script arguments and hash_type = type resolution.

  • On-chain Registry contract, governance, or tokenomics: The first Registry is an off-chain discovery and evidence service. No Registry token, governance mechanism, or on-chain publication contract is proposed.

  • Full OpenZeppelin-style curated library or template marketplace: The Registry may later support recommendations and reusable templates, but the MVP focuses on verifiable artifact publication and discovery.

  • Full package dependency resolution: Package dependencies, version solving, and cross-package compatibility analysis are not required for the initial Registry.

  • Universal language and encoding support: Molecule integration and TypeScript support are included. Broader language bindings and support for other possible encoding systems are future work.

  • Multi-region high-availability infrastructure: The MVP does not include Kubernetes, multi-region active-active deployment, Elasticsearch, Kafka, Redis, or comparable operational complexity.


Risk & Mitigation

Risk Impact Mitigation
Registry scope becomes too broad Delays delivery or produces an incomplete product The project is limited to testnet, a focused publication/verification workflow, a basic public frontend, Molecule support for the supported profile, and TypeScript compatibility. Mainnet, audits, and marketplace features are explicitly deferred.
CKB deployment verification is more complex than expected May delay reliable verification of deployments or liveness. The Registry begins with reference scripts and a narrow binding-trailer verification path. Chain checks run in retryable background jobs and record explicit pending or failed states.
RPC outages, stale results, or reorganizations Deployment state may be temporarily uncertain. Store block evidence, use configurable confirmation thresholds, recheck liveness, use retries with backoff, and treat RPC failure as pending verification rather than failure.
Molecule mapping has unsupported constructs Some Molecule schemas may not map losslessly to IDL 0.1.0. Begin with a documented supported subset, publish clear errors for unsupported constructs, and validate against real schemas rather than promising universal coverage.
Low early Registry adoption Fewer publishers and interfaces at launch. Publish reference scripts, support manual legacy-IDL attestation, provide clear integration examples, and make the Registry useful even before broad ecosystem participation.
Misleading or malicious publisher metadata Users could mistake a listing for an audit or endorsement. Separate cryptographic binding, publisher identity, source availability, audit, and recommendation claims. Avoid a single generic “verified” badge
Resource-exhaustion or storage abuse Could increase cost or affect availability. Enforce upload, decompression, document-size, nesting-depth, queue, rate, and per-publisher limits. Use immutable blobs and cacheable public reads.
Solo-developer execution risk Delivery speed depends on one maintainer. Work is divided into independently demonstrable milestones, builds on already released tooling, uses open repositories, and keeps major future features out of scope.
CKB price volatility The CKB-denominated amount may fluctuate. The grant is requested as a USD equivalent, with each CKB disbursement calculated at the USD value at the time of payment.

Closing / Call to Action

CKB already enables developers to build highly flexible scripts. The missing layer is a shared, verifiable way for those scripts to describe their interfaces and for other developers to discover and safely integrate them, without needing to have pre-existing knowledge of the source code of the scripts.

The IDL 0.1.0 toolchain provides the foundation. This proposal funds the next step: a practical testnet lifecycle where interfaces can be generated from Rust or Molecule, bound to executables, published through an open Registry, independently verified by clients, and consumed by wallets and transaction builders.

The goal is not to create another centralized source of truth. It is to make CKB scripts easier to discover and reuse while preserving the ability of clients to verify the interface-to-executable relationship directly from CKB code-cell data.

Feedback on the Registry data model, Molecule integration, TypeScript workflow, verification policy, and testnet rollout is welcome. We appreciate the community’s consideration and look forward to building this openly with the CKB ecosystem.


Supporting Links


Glossary

Term Meaning
Artifact An immutable published file or byte sequence, such as an IDL document, manifest, executable, or source archive.
Binding Trailer 1 The append-only metadata trailer, placed at the end of bound executable code-cell data. It contains the committed canonical IDL digest and metadata needed to parse it.
Bound executable A compiled script executable with a valid IDL binding trailer appended to its bytes.
Canonical IDL bytes Converting an IDL JSON document into one deterministic byte representation before hashing.
Canonicalization Converting an IDL JSON document into one deterministic byte representation before hashing.
CKB code cell A CKB cell whose data contains a script executable that can be referenced by a lock or type script.
Code hash The CKB hash used to identify executable code-cell data for script resolution.
Code-cell data hash A hash of the complete data stored in a specific code cell, including an IDL binding trailer where present.
Consumer A wallet, SDK, transaction builder, frontend, or other application that retrieves and uses an IDL.
Cryptographically bound An interface status indicating that the SHA-256 digest of canonical IDL bytes matches the digest stored in the deployed executable’s binding trailer.
Deployment A concrete on-chain location for an artifact, identified by network, transaction hash, and output index.
Deployment inclusion Evidence that a declared transaction output exists in an observed confirmed CKB block.
Deployment liveness The currently observed state of whether a code cell remains unspent and available on-chain.
Digest A fixed-length cryptographic hash output. IDL 0.1.0 uses SHA-256 for the canonical IDL commitment.
Encoding profile The rules used to serialize and deserialize fields in an IDL interface, such as the initial CKB IDL linear encoding profile.
Field path A stable path describing where a validation or decoding error occurred within an IDL document or witness object.
GitHub OAuth The initial publisher-authentication method used by the Registry. It verifies control of a GitHub account, not ownership of a CKB address.
Hash type The CKB script field that determines how code_hash should be interpreted, such as data or type.
IDL Interface Description Language: a machine-readable document describing a CKB script interface, its fields, types, encoding, and optional semantic labels.
IDL digest The SHA-256 hash of canonical IDL bytes. This is the value committed in Binding Trailer 1.
Legacy IDL A manually authored IDL for a script that does not contain an embedded binding trailer.
Manually attested An interface status indicating that a publisher supplied an IDL for a script but no cryptographic executable binding has been verified.
Manifest An immutable metadata document describing a publication bundle and its artifact digests.
Molecule A serialization framework widely used in the CKB ecosystem. The proposed Molecule integration generates compatible IDL documents from supported schemas.
Namespace A publisher-controlled naming scope used in package coordinates, such as publisher-name/package-name.
Object storage Blob storage used for immutable files such as IDLs, manifests, and optionally executables.
Outpoint A CKB reference to a specific transaction output, consisting of a transaction hash and output index.
Package A human-readable Registry project identity that may contain multiple immutable releases.
Publisher An authenticated account or organization that submits and manages Registry packages and releases.
Registry The off-chain discovery, publication, storage, and verification-evidence service for CKB script, their deployments, metadata, and optional interface artifacts.
Release An immutable versioned publication under a package coordinate, such as namespace/[email protected].
Reorganization (reorg) A chain event in which previously observed blocks are replaced, requiring deployment evidence and confirmation status to be rechecked.
Semantic type An optional label that gives a structural field a wallet-facing meaning, such as an address, signature, public key, or amount.
Structural type / wire type The actual encoded representation of a field, such as u64, bytes, a fixed byte array, vector, struct, or union.
Testnet-first The rollout policy in which the first public Registry and verification workflow target CKB testnet before any mainnet deployment.
Transaction builder Software that assembles CKB transactions, including script arguments, witnesses, inputs, outputs, and signing data.
TypeScript client The planned frontend-oriented IDL library used to retrieve, verify, encode, and decode IDL interfaces in TypeScript applications.
Unverified A Registry state where an artifact or interface has been submitted or discovered but does not yet meet a defined verification status.
Witness object The structured in-memory representation of decoded witness fields that a client can validate, display, or encode into witness_args.lock.
Witness interface The IDL description of data expected in a script witness; IDL 0.1.0 initially focuses on witness_args.lock.
34 Likes

Really love the direction of this. :clap::clap:

Making script interfaces discoverable and verifiable is a massive win for CKB composability. This solves a huge headache for transaction builders.

Wishing you the best with this proposal!

8 Likes

Thank you, Jedi

4 Likes

This is a valuable step toward improving CKB developer experience. A verifiable IDL could help wallets and transaction builders discover script interfaces and catch witness-format errors before submission. TypeScript support and integration with a shared script registry would be key to wider adoption.

Good luck.

5 Likes

This is a much-needed piece of infrastructure for the CKB ecosystem.

One of the biggest barriers to building reusable applications on programmable blockchains is the amount of script-specific knowledge developers need before they can integrate with existing contracts or scripts. A standard, verifiable interface combined with a public registry could significantly reduce that friction for wallets, SDKs, transaction builders, and application developers.

I particularly like the distinction between cryptographically bound, manually attested, and unverified interfaces. Discoverability is useful, but discoverability with independently verifiable integrity is much more valuable.

One area I think deserves particular attention is the developer experience around adoption. The easier it is to generate IDLs from existing scripts, consume them through TypeScript tooling, and integrate discovery into existing development workflows, the more likely this becomes shared ecosystem infrastructure rather than another tool developers have to remember to use.

I’m also interested in how this could eventually extend beyond lock-witness interfaces to Type Scripts and more complex transaction-level requirements.

The bigger question for me is: how do we make CKB script interfaces discoverable and composable by default, so developers can build on existing scripts without needing to understand their internals or rely on centralized registries? If IDL can become a common standard across the ecosystem, it could be a significant step toward making CKB a genuinely composable smart contract platform.

6 Likes

Thanks for putting this together, Wilfrid. I think this addresses a practical issue that becomes more significant as the CKB ecosystem grows. A lot of the knowledge needed to integrate a script still lives in its source code, documentation or bespoke client code. Each new application ends up having to recover and reproduce some of that knowledge. Making it discoverable and reusable has value across quite a few projects.

The relationship with existing tooling is particularly interesting. CCC already provides transaction composition, signing and wallet connections, while SSRI allows scripts to expose information and operations through callable interfaces. A shared description of interface types and encoding could complement both. There is some overlap to work through with the respective maintainers, but getting these pieces to work together would make the ecosystem easier to build on.

From the CellScript side, I can see a concrete use for this. The compiler already has typed schema and interface information, so generating an explicit public IDL looks like a natural direction to explore. Authors should be able to derive that description from what they have already written, and consumers should be able to use it regardless of the language that produced the script. The registry’s language-neutral approach makes sense in that context too.

I’m pleased to see the emphasis on preserving existing Molecule encodings, alongside a clearly labelled path for scripts without embedded IDL commitments. Adoption becomes much more practical when existing projects can participate.

A useful early example would be a supported lock script taken through discovery, interface verification and witness encoding into a CCC transaction. That would make the reduction in integration work tangible, while showing which parts still need protocol-specific logic.

Longer term, I think this could contribute to less fragmented wallet support across CKB. Describing available actions and their Cell transitions would need further work, but making script interfaces easier to discover and consume is already a worthwhile step. It makes the work of each protocol developer more useful to the rest of the ecosystem.

4 Likes

Thanks for the thoughtful feedback, @3m1n3nc3

Developer experience is one of my biggest priorities here. The goal is to make IDL generation and consumption fit naturally into existing development workflows, rather than introduce another complicated process. That’s partly why I’m working on Molecule-to-IDL generation and TypeScript support.

On discoverability and composability, I agree. The Registry is intended to be a discovery and verification layer, not a source of trust. Consumers should be able to independently verify cryptographically bound interfaces against deployed scripts, regardless of where they retrieved the IDL.

Type Script support and richer transaction-level interfaces are directions I’d love to explore, but there is need to establish the initial lock-witness standard, and then extend the capability.

I’d like to be able to discover and integrate unfamiliar CKB scripts with as little script-specific knowledge as possible, while preserving independent verification, and I think other developers would too, hehe.

3 Likes

Thank you, Arthur. I really appreciate the support, and especially your help exploring IDL integration with the CellScript registry earlier.

I agree that the strongest approach is to complement existing tooling rather than duplicate it. CellScript’s existing type information makes IDL generation a particularly interesting integration, and I’d love to explore that further.

I am also exploring how IDL could complement SSRI, particularly where standardized interface descriptions and encoding could help external consumers.

There’s a lot to do, this is just the start :head_shaking_vertically:

3 Likes

Link to vote: https://dao.ckb.community/thread/vot-ckb-idl-interface-description-language-and-discoverability-for-ckb-scripts-81389

1 Like

Based on the Metaforo tally at close, the outcome is Passed. Approval is 59.11%/51% with total voting weight 191,744,644/ 12,254,902 CKB.

Post-close verification has been completed using CKB DAO Watchdog, together with a manual sanity check. The verification cross-checks Metaforo-recorded voting weights against on-chain Nervos DAO deposit weights. In this run, all entries match.

The CKB IDL proposal is confirmed as PASSED.

Verification logs: ckb-dao-watchdog/Verification Logs - CKBIDL at main · kydchen/ckb-dao-watchdog · GitHub

2 Likes

Thank you, Ser.
And thanks to everyone who supported IDL. I am working on it, and will drop updates as I hit the milestones

1 Like