Canton dApp Booster
    Preparing search index...
    • Truncates an identifier for display. A Canton party id is hint::fingerprint, so the hint survives whole and only the fingerprint shrinks, unless hint bounds it too. Anything else is middle-truncated as one segment, never longer than the input, and cut on UTF-16 code units, so a non-ASCII value can split a surrogate pair.

      Reach for this over <Identifier> inside a sentence or another <button>, where the copy control would nest a button in a button. Pass hint where the result must fit a bounded width.

      Parameters

      Returns string

      truncateIdentifier('nico::1220df946c5b01ad0f2d2b480f1f43b1d1f2e498f5a49c2f0b1cbb46')
      // 'nico::1220df…0b1cbb46'
      truncateIdentifier('treasury-operations::1220df94…', { hint: 12 })
      // 'treasury-ope…::1220df94…'