Template IDs extraction

Oh I thought you’re just interested in the package id. There is daml damlc inspect --json but the output is undocumented and not stable across SDK versions so you probably don’t want to rely on it too heavily.

The other option is decoding the dalf. com.daml:daml-lf-interface is probably the easiest library to use here but it’s a Scala library and can have breaking changes across SDK versions. Alternatively, you can use com.daml:daml-lf-1.14-archive-proto to decode from Java but that gives you the raw protobuf which can be difficult to interpret.

1 Like