Hi DAML community,
I’m trying to find a way to create many parties quickly on DAML hub (such as via API calls or a script) but it seems that it’s not currently supported.
May I know if there is an alternate solution to create a bunch of parties quickly without using the manual clicks required in DAML hub, both from the participant and admin view?
Thank you.
1 Like
You can use the damlhub-cli utility: damlhub-cli - npm
See this part of the example script:
for name in PartyA PartyB PartyC
do
damlhub -j ledger party ${LEDGER_ID} $name > /dev/null
done
Thank you! Will try it out and report back.
Hi gyorg,
I attempted to run this command on an existing ledger on DAML hub :
damlhub -j ledger party <ledgerId> PartyA
after setting my jwt token copied from the identities tab in DAML hub.
I attempted to set the token as both
- my damlhub account username’s part
- the admin party manually created
But it returns the below error for both.
Unexpected error: FetchError: invalid json response body at
https://login.hub.daml.com/auth/ledger/ujw59xsk3hjem7a8/user_grants reason: Unexpected token H in JSON at position 0
at /usr/local/lib/node_modules/damlhub-cli/node_modules/node-fetch/lib/index.js:273:32
at processTicksAndRejections (internal/process/task_queues.js:95:5) {
type: 'invalid-json'
}
Am I wrongly allocating the JWT token?
Thanks,
Julius
Solved: Had to use the jwt token in the account settings for anyone else who may encounter this.
1 Like