GetPackageResponse

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?

1 Like

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 inspect command. 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.

3 Likes

To elaborate on @Gary_Verhaegen 's two suggestions, if you, personally, just want to look at the code, with your eyes, then daml damlc inspect is the right tool. If you mean programmatically, it would be easier to use Protobuf tools appropriate to your language, in concert with the daml-lf-*-archive packages available on Maven Central to supply the protobuf definitions at the minor version you want to support.

2 Likes