Skip to content
Discussions/App Development/submitMulti with multiPartyToken syntaxForum ↗

submitMulti with multiPartyToken syntax

App Development4 posts417 views2 likesLast activity Jul 2022
LI
liavOP
Jul 2022

Hi,

While coding submitMulti command against damlhub i encounter the below error that apparently related to a missing token which represents both actAs and readAs parties.

Command i wrote:

submitMulti [owner] [public] do
                        exerciseCmd productCid CustomerCreatesPolicyRequest with
                          ..

I’m trying to figure how and where do i pass the multi party token that captures also the readAs party.

The only documentation i saw over the web is here but i dont see the reference to the passed token:

The error:

com.daml.lf.engine.script.ScriptF$FailedCmd: Command submit failed: Tried to submit a command with readAs = [public-xge3136b49pu71xo] but token provides claims for readAs = [ledger-party-bec1438a-5910-4f8f-9dd5-39812ea437f4]. Missing claims: [public-xge3136b49pu71xo]

Can you refer me to the docs which explains how to create and pass the multiPartyToken that contain this claim

CO
cocreature
Jul 2022

submitMulti in Daml Script is equivalent to a submission on the ledger API with the corresponding actAs & readAs fields. In your case, you’re missing the readAs claim for the public party. You should be able to create a token that supports this using damlhub-cli ledger multipartyToken

LI
liav
Jul 2022

Thanks @cocreature

Once I call this DamlHub cli command and create the token, how do I pass it to multiSubmit command?

At the end as the last argument?

CO
cocreature
Jul 2022

No, either specify it via --access-token-file or in the participants config. Take a look at the docs for details.

← Back to Discussions