How do you specify a multi-party token in participants.json?

For example, how would one add a token where we have actAs=[Alice] and readAs=[Public] ?

1 Like

And to clarify, this is in addition to a “regular” token with just actAs=[Alice] claim.

1 Like

You can only have one token per party. The token for a multi-party submission is resolved by resolving all involved parties and if they don’t map to the same one you get an error.

So you cannot do directly what you want. However, you can specify something like this:

  "parties": {"Alice": "participant", "Public": "participant"},
  "participants": {"participant": {…}}

On the gRPC API this will behave like you would like. You can both submit alice as well as submitMulti [alice] [public].

Over the JSON API, you always have to submit via submitMulti [alice] [public]. The reason for this is that the JSON API always infer the parties from the token. I opened Support for explicit party specifications on the JSON API · Issue #11200 · digital-asset/daml · GitHub to support specifying the parties explicitly in the JSON API which means we could also make this work via Daml Script.

1 Like