ChaincodeDevs
Using Hyperledger composer Javascript APIs - Printable Version

+- ChaincodeDevs (https://chaincodedevs.com)
+-- Forum: Hyperledger Fabric (https://chaincodedevs.com/forumdisplay.php?fid=1)
+--- Forum: Help & Support (https://chaincodedevs.com/forumdisplay.php?fid=3)
+--- Thread: Using Hyperledger composer Javascript APIs (/showthread.php?tid=460)



Using Hyperledger composer Javascript APIs - usama.yousuf - 06-27-2019

I am trying to work around with composer common api and struggling to get any result. I want to list all the enum types defined in my cto file. I want to use “getEnumDeclarations” method of ModelFile but how ? I couldnt find any sample code or useful material online.

 new ClassDeclaration(model,ast);

This methods take model file and AST, what is AST i cant find anywhere. Plus how can i pass model file as a parameter ?
Please help.
here is the link :
https://hyperledger.github.io/composer/v0.19/api/common-modelfile#getenumdeclarations


RE: Using Hyperledger composer Javascript APIs - admin - 07-06-2019

This is a good one. I tried finding some examples of someone using getEnumDeclaration() but haven't found much. I'll update my reply when I find something.