hyperledger-labs/cc-tools ? reverse-engineered prompt

Reverse engineered prompt

Build me a Go library for Hyperledger Fabric chaincode that makes it much easier to define and manage business assets.

I want something that lets me describe assets with fields like name, type, key, required, read only, validation, and write permissions, then automatically gives me the usual create, read, update, delete, search, and history actions. It should also support custom data types, arrays, references between assets, private data access rules, and dynamic asset definitions when needed.

Please add a simple wrapper around the Fabric stub so queries can see pending changes during the same transaction, plus a clean way to define custom transactions and events. I also need startup checks that validate the asset and transaction setup, and a mock stub for unit tests.

Keep it usable as a reusable package, with clear examples or tests showing how someone would plug it into a Fabric chaincode project. If you need to check current Fabric docs, go ahead and look them up online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab