Skip to content

useRequestSignature

Usage

connect() must be called and WalletConnect session must be initiated before account information will be returned.

The useRequestSignature hook is a React Hook wrapper around the requestSignature function

import { useRequestSignature } from '@puzzlehq/sdk';
const { requestSignature, response, loading, error } = useRequestSignature("hi friends!");

Return Value

{
requestSignature: () => void,
response?: {
signature?: string | undefined;
messageFields?: string | undefined;
error?: string | undefined;
},
loading: boolean,
error?: string,
};