GetPackageResponse
- FrankieOP 1
In GetPackageRequest/Response Ledger API service, the response contains an archived payload.
https://docs.daml.com/app-dev/grpc/proto-docs.html#getpackageresponse
Is the payload a binary file? Is it possible to inspect the content of it?
- Gary_Verhaegen 3
As the documentation you linked to mentions, this is a Daml-LF file, which is Daml “bytecode” encoded in protobuf.
Protobuf is a fairly popular binary format designed by Google. There are many tools that would allow you to look at that archive as pure protobuf. You can also look at it “as Daml code” with the
daml damlc inspectcommand. The output will probably be easier to read than raw protobuf, though keep in mind this is bytecode, so it’s not going to be easy to read. - Stephen 2
To elaborate on @Gary_Verhaegen 's two suggestions, if you, personally, just want to look at the code, with your eyes, then
daml damlc inspectis the right tool. If you mean programmatically, it would be easier to use Protobuf tools appropriate to your language, in concert with thedaml-lf-*-archivepackages available on Maven Central to supply the protobuf definitions at the minor version you want to support.