Canton dApp Booster
    Preparing search index...
    • Checks the shape of a party id: a non-blank hint, the :: separator, and a 68-character hex fingerprint. Returns undefined when nothing is wrong. Shape only — whether the party exists is the ledger's answer, not this function's.

      Reach for this over isValidPartyId when the caller needs to say what went wrong.

      Parameters

      • value: string

      Returns PartyIdError | undefined

      validatePartyId('nico:1220df94') // 'missing-separator'
      validatePartyId('nico::1220df94') // 'invalid-fingerprint': 8 hex characters, not 68