useSolanaSignMessage

1function useSolanaSignMessage(opts): SolanaSignedMessage;

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): SolanaSignedMessage

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.

useSolanaSignMessage
} from "@account-kit/react";
const {
SolanaSignedMessage.isPending: boolean
isPending
:
const isSigningMessage: boolean
isSigningMessage
,
any
mutate
:
const signHello: any
signHello
,
SolanaSignedMessage.data: `0x${string}` | undefined
data
:
const signature: `0x${string}` | undefined
signature
,
const reset: () => void
reset
,
} =
function useSolanaSignMessage(opts: UseSolanaSignMessageParams): SolanaSignedMessage

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.

useSolanaSignMessage
({});
const signHello: any
signHello
({
message: string
message
: "Hello" });

Parameters

ParameterTypeDescription

opts

UseSolanaSignMessageParams

Options for the hook to get setup.

Returns

SolanaSignedMessage

This should be hook mutations plus a few more. Used to get the end result of the signing and the callbacks.