To create contracts with the JSON API i need a Party Id in order to create the JWT token. In Canton how can i get Party ids? Is it possible to create a json file with this content like with the following command?
We’ve added support for user names that allow you to use stable identifiers and JWT tokens and manage the permissions the users have with respect to parties on the participant node directly. Right now, we support both types of tokens, the ones referring directly to parties and the ones using the user management feature.
You can create stable user names that you can map locally on a participant to a set of parties:
@ val alice = participant1.parties.enable("Alice")
alice: PartyId = Alice::1220f95d22be...
@ val myUser = participant1.ledger_api.users.create("myuser", actAs=Set(alice.toLf), primaryParty=Some(alice.toLf), readAs=Set(alice.toLf), participantAdmin=true)
myUser: LedgerApiUser = LedgerApiUser(id = "myuser", primaryParty = Some(value = "Alice::1220f95d22be53f44b9004e6d03b2ba5069bbad3f4abe03340747d52042c1f1e69aa"))