Use the
signMessage
method exported from the useSignMessage
hook to sign a message with a Solana wallet.Usage
Parameters
Message to be signed as a Uint8Array.
Address of the wallet to use for signing the message. Recommended when working with external
wallets to ensure reliable functionality. If not provided, the first wallet will be used.
Response
The signature produced by the wallet.