useSolanaSignMessage
Defined in: account-kit/react/src/hooks/useSolanaSignMessage.ts:65
This is the hook that will be used to sign a message. It will prioritize external connected Solana wallets, falling back to the internal signer when not connected.
Example
import { function useSolanaSignMessage(opts: UseSolanaSignMessageParams): SolanaSignedMessageThis is the hook that will be used to sign a message. It will prioritize external connected Solana wallets, falling back to the internal signer when not connected.
useSolanaSignMessage } from "@account-kit/react"; const { SolanaSignedMessage.isPending: booleanisPending: const isSigningMessage: booleanisSigningMessage, anymutate: const signHello: anysignHello, SolanaSignedMessage.data: `0x${string}` | undefineddata: const signature: `0x${string}` | undefinedsignature, const reset: () => voidreset, } = function useSolanaSignMessage(opts: UseSolanaSignMessageParams): SolanaSignedMessageThis is the hook that will be used to sign a message. It will prioritize external connected Solana wallets, falling back to the internal signer when not connected.
useSolanaSignMessage({}); const signHello: anysignHello({ message: stringmessage: "Hello" });
Parameters
Returns
SolanaSignedMessage
This should be hook mutations plus a few more. Used to get the end result of the signing and the callbacks.