Signing Messages
Overview
The signMessage function allows users to sign messages with their private key.
How to Use
Destructure the function from the hook:
const { signMessage } = useJustAuth();Call the function with the message:
const handleSignMessage = async () => { try { const message = 'Hello, JustAuth!'; const signature = await signMessage(message); console.log('Signature:', signature); } catch (error) { console.error('Error signing message:', error); } };
Parameters
message(string): The message to be signed.
Example
Last updated