Open jkk-vmw opened 4 years ago
Bump!
Hi @jkk-vmw, the Ledger API already provides this information, albeit in the very low level form of DAML LF packages (see package service). There is currently no plan to add a higher level API in the next couple of months, but we will revisit the topic in the future for sure.
LedgerReader
takes com.digitalasset.ledger.client.services.pkg.PackageClient
as a parameter and returns type PackageStore = Map[String, Interface]
which contains all types and templates.
Howdy, DA folks.
I've already gotten answer that JSON-API will not be providing package metadata for template data structures and generic function definitions of choices (generic, defined by the .daml, which can be very complicated nested structures, referring other defined generic structures and even non-daml-primitive Haskell data types)
It seems that by after uploading the DAR package, the ledger already have the metadata in hand; otherwise, it wouldn't even be able to create the database table/collection with indexes and columns. (I could be wrong on this)
In short, are there any plans to provide this metadata via for Ledger API? or any other endpoints?
Thanks in advance. You guys are doing awesome work!
Related to: https://github.com/digital-asset/daml/issues/3539 https://github.com/digital-asset/daml/issues/3508