How can I specify input data of type map, where the key is a record, in Dazl?

It seems that Dazl represents Daml map data as Python dict, although this is not listed in the Dazl docs on the page “Mapping Daml types to Python types”: Basics

The problem is that in Python dicts are not hashable, so a dict key cannot be a dict.

Daml doesn’t use hash table for maps, so in Daml a record can be key in a map.

Do you know any solution for this problem?

You can see a hint in the protobuf decoder in dazl. So if you wrap your dict in a FrozenDict you should be good.

1 Like

Thanks, will try.