Canton dAppBooster
    Preparing search index...
    • Signs an arbitrary message with the connected wallet; the SDK owns the encoding.

      Returns UseSignMessageResult

      with no CantonConnectProvider above it, and from signMessage where nothing is connected, the wallet is locked or no party is reported. A wallet refusal throws too and lands in error, always as an Error: see toError.

      const { account } = useAccount()
      const { signMessage } = useSignMessage()

      if (account === undefined) return <p>Connect and unlock the wallet first.</p>

      const signed = await signMessage('Approve vesting claim')