#ckb #type


ckb type id library

3 releases

0.1.0-alpha.3 Jun 7, 2023
0.1.0-alpha.2 Feb 27, 2023
0.1.0-alpha.1 Feb 8, 2023

22 downloads per month

MIT license

83 lines


ckb has a built-in type id contract, which is used to constrain the behavior of id generation.

However, it is a standalone contract and will take the place of cell type script, making it impossible to use other contracts.

This library writes the validation logic of type id as a library that can be embedded in any contract, allowing developers to embed the validation logic of type id in their own contracts, and at the same time, it is relatively small in consumption.

The corresponding c version of the library is link


You can see sample contracts and examples of contract construction in test-lib


~20K SLoC