Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/How do you specify a multi-party token in participants.json?Forum ↗

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

App Development3 posts248 views3 likesLast activity Oct 2021
LE
Leonid_RozenbergOP
Oct 2021

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

LE
Leonid_Rozenberg
Oct 2021

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

CO
cocreature
Oct 2021

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.

← Back to Discussions