PartyIdHint and displayName in Canton 3.x?

In the Canton 3.x snapshots, I’ve noticed some changes (from Canton 2.x) related to PartyIdHint and displayName. Additionally, the /v2/parties endpoint introduces a new localMetadata field.

For example, the following Daml Script…

  alice <- allocatePartyWithHint "Alice" (PartyIdHint "Alice")

…results in 2.10.0, /v1/parties:

{
   "displayName": "Alice",
   "identifier": "Alice::1220ecc4fb65988e736b61c06fb8082d586a66365e643514c28945e79018181b9c98",
   "isLocal": true
}

In contrast, the same Daml Script in 3.3.0-snapshot.20250319.0, /v1/parties:

{
   "identifier": "Alice::1220ecc4fb65988e736b61c06fb8082d586a66365e643514c28945e79018181b9c98",
   "isLocal": true
}

And the following /v2/parties

{
  "party": "Alice::12209ae25620faea9a248780009170e7da367f0736d13e6e86a081151d10c7be89c8",
  "isLocal": true,
  "localMetadata": {
      "resourceVersion": "0",
      "annotations": {}
  },
  "identityProviderId": ""
}

What is the plan for PartyIdHint and displayName in Canton 3.x?

On a related note, the following Daml Script:

  alice <- allocatePartyWithHint "Alice Cooper" (PartyIdHint "Alice")

Results in 2.10.0:

{
  "displayName": "Alice Cooper"
  "identifier": "Alice::1220d00714b4f9d734e19ad9dbeff0a22bd8e42eee3890fa963e139bb0ffef00fc2a",
  "isLocal": true
}

Results in 3.3.0-snapshot.20250319.0:

Requested name 'Alice Cooper' cannot be different from id hint 'Alice'

The display_name functionality has been folded into the more general local_metadata concept. It allows for a more complete and elaborate annotation of the parties with additional name:value pairs. In a grpcurl request, you can do:

grpcurl -d '
 {"party_id_hint": "Max",
  "local_metadata":{
    "annotations":{
      "display_name":"Maximus Decimus Meridius",
      "profession":"general"
    }
   } 
 }' 
 --plaintext 
 localhost:5001
 com.daml.ledger.api.v2.admin.PartyManagementService/AllocateParty

Similarly in the json

curl -d '{
  "partyIdHint":"Lucilla",
  "identityProviderId":"", 
  "synchronizerId":"", 
  "localMetadata":{
    "resourceVersion":"", 
    "annotations":{
      "display_name":"Annia Aurelia Galeria Lucilla",
      "profession":"empress"
    }
  }
}' 
-H "Content-Type: application/json" 
-X POST 
localhost:8080/v2/parties
2 Likes