Skip to content
Discussions/App Development/What's the best way to get a Canton participant's fingerprint/namespace?Forum ↗

What's the best way to get a Canton participant's fingerprint/namespace?

App Development4 posts261 views1 likesLast activity Jul 2022
DA
Daniel_PorterOP
Jul 2022

When you allocate a party in Canton, it returns as partyName::fingerprint. As an actor outside of the participant, I’d like to figure out the participant’s fingerprint so I can know, prior to allocation, what my party’s name will be. Is that possible?

CO
cocreature
Jul 2022

The best option I’m aware of is to query the participant id and use the namespace from that, e.g., see this grpcurl session:

moritz@right-adjunct ~/foobar> grpcurl -plaintext localhost:6865 com.daml.ledger.api.v1.admin.PartyManagementService/GetParticipantId
{
  "participant_id": "sandbox::1220ac922ccc5e275ccc65d61b37e4f31897f7504b7bf9a0d204956dc6798a682889"
}
moritz@right-adjunct ~/foobar [1]> grpcurl -plaintext -d '{"party_id_hint": "alice"}' localhost:6865 com.daml.ledger.api.v1.admin.PartyManagementService/AllocateParty
{
  "party_details": {
    "party": "alice::1220ac922ccc5e275ccc65d61b37e4f31897f7504b7bf9a0d204956dc6798a682889",
    "is_local": true
  }
}
ST
Stephen
Jul 2022

You can guess this if you like, but the ledger API doesn’t permit you to make this assumption; the produced party ID “is implementation-specific”.

I don’t know whether Canton provides stricter guarantees, if you intend for your allocator to only work with Canton.

ST
stefanobaghino-da
Jul 2022
Stephen:

You can guess this if you like, but the ledger API doesn’t permit you to make this assumption; the produced party ID “is implementation-specific”.

+1 to this!

Stephen:

I don’t know whether Canton provides stricter guarantees, if you intend for your allocator to only work with Canton.

Regardless, Canton could decide to change this between versions, so only Ledger API guarantees should be taken as such. I think the way to think of party IDs is as opaque handles, which is what they are as per Ledger API.

← Back to Discussions