Roles on Navigator
- h_twistOP 1
Hello everyone. It might be a silly question, but I could not found it anywhere.
How can I change the roles displayed on the first screen of navigator?
Currently it displays only Alice and Bob.
- stefanobaghino-da 2
Navigator should list all the allocated parties. You can make a quick experiment by running
daml new --template quickstart-java quickstartNavigator will be opened and you’ll see a few allocated parties in the dropdown, including
AliceandBob.If you then run
daml ledger allocate-parties CharlieAnd reload Navigator you should see
Charlielisted there as well. - Max 3
Another way is to have a look at the daml.yaml file, below is an example. If you add another party under
parties, for example,Eve, it should display when you run the navigator againsdk-version: 1.16.0 name: iou-demo version: 0.1.0 source: daml parties: - Alice - Bob - Charlie dependencies: - daml-prim - daml-stdlib - daml-trigger sandbox-options: - --wall-clock-time - --ledgerid=iou-demo-sandbox start-navigator: true codegen: js: output-directory: ui/daml.js npm-scope: daml.js - Ben_M 2
Nice one @Max that’s what I would do.
I was going to suggest that, but in terms of code brevity and simplicity, @stefanobaghino-da wins.
/me upvotes
daml ledger allocate-parties Charlie - stefanobaghino-da 3
On the other hand, @Max’s approach is purely declarative and if you’re trying to set up an environment his approach is probably advisable, allowing you to keep track of parties in your system in a single place.
- Luciano 2
As per @Max 's comment, they can be specified in the
partiessection of thedaml.yamlfile. But note also, that in recent versions of the SDK, this list is populated automatically from anyinit-scriptyou specify in thedaml.yamlfile, if you omitparties.