Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/Example when Canton User's primaryParty makes a difference?Forum ↗

Example when Canton User's primaryParty makes a difference?

App Development2 posts83 viewsLast activity Aug 2025
WA
WallaceKellyOP
May 2025

I’m trying to assemble a simple example in which a Canton User’s primaryParty makes a difference.

For example, in the following script, all three commands are submitted by an admin user with None primary party. The primaryParty (or lack thereof) makes no difference here:

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

  adminId <- validateUserId "admin"
  createUser (User adminId None) [CanActAs alice, CanActAs bob]

  aliceTV <- submitUser adminId do
    createCmd Asset with
      issuer = alice
      owner = alice
      name = "TV"

  bobTV <- submitUser adminId do
    exerciseCmd aliceTV Give with newOwner = bob

  submitUser adminId do
    exerciseCmd bobTV Give with newOwner = alice

The docs say:

  • “indicates which party to use by default when submitting a Ledger API command request as this user” 1.
  • “Navigator… you will interact with the ledger as the primary party of that user.” 2.

Maybe I’m beginning to realize that primaryParty is metadata for tooling to use, not the Ledger API itself. Is that correct? Aside from Navigator, do you know of any other time that primaryParty is used?

WA
WallaceKelly
Aug 2025

@cocreature responded to a similar question in the GSF Slack:

primaryParty doesn’t imply anything. it doesn’t grant any rights but it is often used by tooling to interpret which party the user intends to use. E.g., the splice wallet UI always shows you the wallet for that party.

← Back to Discussions