Canton dAppBooster
    Preparing search index...
    • Tells a local party from an external one when asked. Each readPartyType call is one ledgerApi read of the participant id, its namespace compared with the party's; nothing is cached, so hold the answer where several components need it. Reach for it before an action a local party cannot take, such as signMessage, which the reference gateway refuses.

      Returns UsePartyTypeResult

      with no CantonConnectProvider above it, and from readPartyType where nothing is connected or no party is reported, which isReady is there to check first.

      const { readPartyType } = usePartyType()
      if ((await readPartyType()) === 'local') {
      toast.error('This wallet cannot sign messages for a local party')
      }