useSolanaSignMessage

This is the hook that will be used to sign a message. And have the mutation, which would be the end result and the callbacks to modify

Import

1import { useSolanaSignMessage } from "@account-kit/react";

Usage

1const {
2 isPending: isSigningMessage,
3 mutate: signHello,
4 data: signature,
5 reset,
6} = useSolanaSignMessage({});
7mutate({ message: "Hello" });

Parameters

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.