Hi!
I want to use Postman to get read data from my Ledger. In every topic and even documentation, JWT coded payload sholud be looks like this:
{
"https://daml.com/ledger-api": {
"ledgerId": "sandbox",
"applicationId": "foobar",
"actAs": ["Alice"]
}
}
I don’t know why have I to provide participantId in “actAs” line, like this:
"actAs": ["Alice::121354861534864231684321"]
Everything works fine with this, but it’s make more problems when I’m trying build JWT Token in front-end via React.
I use my own application and I followed Levente Barczy video from Introduction to Daml (episode 5 - (Daml Training Platform)) and I used the ui-template from here (daml-ui-template/Report.tsx at 9c76c3548a65bd2603614e7760f460697d566dbf · digital-asset/daml-ui-template · GitHub).
I’m using jwt.io to generate tokens.
I know that front-end works with back-end, because if I hardcoded participantId in “createToken” function, everything works fine.
I have 2 ways, but I don’t know which is correct and possible:
1 - creating token doesn’t require participantId
2 - somehow read participantId with every ledger start and add it to payload.
Could you tell me, what I’m doing wrong?
Edit: on version 1.18.3 everything works with simply “actAs: [“Alice”]”. Problem is on sdk version 2.2.0