Signs an arbitrary message with the connected wallet; the SDK owns the encoding.
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.
signMessage
error
Error
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') Copy
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')
Signs an arbitrary message with the connected wallet; the SDK owns the encoding.