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.
with no CantonConnectProvider above it, and from readPartyType where nothing
is connected or no party is reported, which isReady is there to check first.
Example
const { readPartyType } = usePartyType() if ((awaitreadPartyType()) === 'local') { toast.error('This wallet cannot sign messages for a local party') }
Tells a local party from an external one when asked. Each
readPartyTypecall is oneledgerApiread 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 assignMessage, which the reference gateway refuses.