Extract choice arguments defined in DAML template from builded .dar file using dazl
- AntonMelentievOP
Hello!
I try to inspect
.darfile usingdazl.
Example of Python code:dar = dazl.util.dar.DarFile("path_to_dar_file") package_ids = list(get_dar_package_ids(dar="path_to_dar_file")) for package_id in package_ids: bytes_dar = dar.package_bytes(package_id) archive = parse_archive(package_id, bytes_dar)So, I can get
Archiveobject and take from it Packages, Modules, Template, and finally Choices.
The choice is aTemplateChoiceobject.Part of DAML code of the Choice:
nonconsuming choice RequestToken: ContractId Token.TokenRequest with token : Text activationDate : Date expiryDate : Optional DateIs it possible to parse arguments, types of arguments, and informational if the argument is optional using
dazl? I didn’t find such options. If there is not a such possibility is it possible to add it todazl?Thanks for support.