Updating a party's display name

Hello all, is it at all possible to change a party’s display name after allocation. Via the Json API doesn’t seem to be possible, but is this something that can be achieved either on ledger API or canton console?
Thank you.

1 Like

From the Canton console you can use <participant_name>.parties.set_display_name. From the Ledger API you can use PartyManagementService#UpdatePartyDetails (which is what the Canton Console calls, ultimately). In the Java bindings, you can use this to access the PartyManagementService.

Thank you for the quick reply, are you planning on including this on the Json Api sometime soon, or is it not foreseen? And, is this achievable on Daml Hub?

I am not aware of plans to include this in the JSON API.

I believe this should be achievable using Daml Hub since it exposes the Ledger API.

Hello! Since Daml Script accesses the Ledger API, is this doable via Daml Script?

It’s not exposed in Daml Script.

Thanks, cocreature.

Why is update to ‘display names’ not allowed for update party?

I believe the UpdatePartyDetails endpoint can be used to update only the local_metadata field of the party, but it does not work to update display_name.

I believe this is because displayName has essentially been deprecated in the 2.x line of Canton, and is removed in 3.x

So the recommendation to be ready for future evolution to 3.x is that you rely on this data held in the local_metadata field instead.

See further detail here from the daml 2.x docs

display_name
Human-readable name of the party to be added to the participant. It doesn't have to be unique. Use of this field is discouraged. Use local_metadata instead. Optional


local_metadata
Participant-local metadata to be stored in the PartyDetails of this newly allocated party. Optional```