-
Notifications
You must be signed in to change notification settings - Fork 32
feat(did-ckb): add did-ckb package for basic did operations #337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: releases/next
Are you sure you want to change the base?
Conversation
Hanssen0
commented
Dec 16, 2025
- I have read the Contributing Guidelines
🦋 Changeset detectedLatest commit: 72c6956 The changes in this PR will be included in the next version bump. This PR includes changesets to release 20 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for appccc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for apiccc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for liveccc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Summary of ChangesHello @Hanssen0, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly expands the project's capabilities by introducing a dedicated package for DID CKB operations. It lays the groundwork for managing decentralized identities on the CKB network, providing essential functions for their lifecycle and integration with existing core components. The inclusion of comprehensive examples will aid developers in quickly adopting these new features. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces the new @ckb-ccc/did-ckb package, providing essential functionalities for Decentralized Identifier (DID) operations on CKB. The changes are comprehensive, including the core logic for creating, transferring, and destroying DIDs, along with necessary codec implementations for data serialization. The addition of DidCkb to KnownScript and its configurations for both mainnet and testnet are correctly implemented.
The new package is well-integrated into the existing ecosystem, with updates to the shell package, playground, and documentation configuration. The inclusion of clear and practical examples is particularly helpful, demonstrating the usage of the new DID features effectively.
I've found one minor issue regarding the package description in package.json. Otherwise, the code is well-structured, clean, and follows the project's conventions. Great work on this feature!
✅ Deploy Preview for docsccc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
2db08c2 to
9e52b2d
Compare
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces two new packages, @ckb-ccc/type-id and @ckb-ccc/did-ckb, to support Decentralized Identifiers on CKB. The implementation is well-structured, leveraging a generic buildTypeIdOperations factory to create, transfer, and destroy Type ID-based assets, which is a great pattern for reusability. The new did-ckb package builds upon this to provide DID-specific functionality. The code is clean and includes helpful examples. I've identified a couple of areas for improvement in the packages/type-id/package.json file to enhance correctness and maintainability, detailed in the comments below.
b0ac2d4 to
6455238
Compare
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces two new packages, @ckb-ccc/did-ckb and @ckb-ccc/type-id, to support Decentralized Identifiers on CKB. The architecture is well-designed, with @ckb-ccc/type-id providing a generic framework for Type ID-based scripts, which @ckb-ccc/did-ckb then utilizes for its specific implementation. The PR also includes comprehensive examples and necessary updates to the playground environment, which is great for usability. The overall code quality is high. I've provided a couple of suggestions to optimize performance by caching script information to avoid redundant asynchronous calls.
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces two new packages, @ckb-ccc/did-ckb and @ckb-ccc/type-id, to support Decentralized Identifier (DID) operations on CKB. The changes are extensive, including new package configurations, source code, and integration into existing packages like shell, examples, and playground. The implementation of type-id provides a solid foundation for did-ckb. The code is well-structured and follows the existing patterns of the codebase. The new examples are clear and helpful for understanding the new functionality. I have a couple of suggestions to improve flexibility and readability.
261c91a to
042fa01
Compare
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces two new packages, @ckb-ccc/type-id and @ckb-ccc/did-ckb, for handling Type ID and DID operations on CKB. The implementation is clean, well-structured, and follows the existing patterns in the codebase. The introduction of a generic buildTypeIdOperations function in the @ckb-ccc/type-id package is an excellent design choice, promoting reusability. The @ckb-ccc/did-ckb package effectively utilizes this for its DID-specific logic. The PR is comprehensive, including clear examples and necessary updates to the playground. I have one suggestion to improve the forward-compatibility of a data codec, which I've detailed in a specific comment. Overall, this is a high-quality contribution.
|
/canary |
|
🚀 Canary version published successfully! View workflow run The following packages have been published to npm:
|
|
web5 did cache has switch to this SDK, it work well and reduce many code. https://github.com/web5fans/web5-did-cache/tree/ccc-sdk |
|
/canary
This surprised me because the args in the original type id design are 32 bytes long. Anyway, it's fixed in the latest code. Please try again. @rink1969 |
|
🚀 Canary version published successfully! View workflow run The following packages have been published to npm:
|
|
/canary |
|
🚀 Canary version published successfully! View workflow run The following packages have been published to npm:
|
71b7193 to
fd00646
Compare
20f0b3e to
a73127f
Compare
|
/canary |
|
🚀 Canary version published successfully! View workflow run The following packages have been published to npm:
|
|
/canary |
|
🚀 Canary version published successfully! View workflow run The following packages have been published to npm:
|
