Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/GetPackageResponseForum ↗

GetPackageResponse

App Development3 posts359 views6 likesLast activity Apr 2021
FR
FrankieOP
Apr 2021

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?

GA
Gary_Verhaegen
Apr 2021

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.

ST
Stephen
Apr 2021

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.

← Back to Discussions