I am planning a script which will be used to initialize the ledger in a canton setup (with multiple participant nodes).
Based on my previous experience I use allocatePartyWithHintOn plus the participant name, and a participant configuration file. This works well.
However, for some reason I need to split this script into two parts, and using --output-file and --input-file to “bridge” the parties. How can I obtain the participant node information or specify the participant node information for these parties in this case, as I don’t need to redo the allocatePartyWithHintOn any more?
The second script needs to know how the parties are mapped to participants. You can specify that in the party_participants section of your participants.json file. E.g., in this example alice is on participant 1 and bob is on participant 2.
Thanks @cocreature for your suggestion. Does it mean that I need to create this file manually after running the first script (then I can create the jwt with the right PartyID)? Is it possible to generate this automatically after running the first script? I am comparing the situation that if the scripts were not broken down, everything could be handled well in the daml script.
There is nothing built in to generate this at this point. You could try writing the config of the second script via --output-file but you have to manually define the output here.