WalletKit prompts the user with a modal that shows the message. The user can then review and sign the message using their 6-digit pin.

import { useWalletKitLink } from "@walletkit/react-link";
import { toHex } from "viem";

function App() {
  const walletKit = useWalletKitLink();
  const [signature, setSignature] = useState("");

  const signMessage = async () => {
    const signature = await walletKit.signMessage(toHex("hello world"));
    setSignature(signature);
  };

  return (
    <div>
      <button onClick={() => signMessage()}>Sign Message</button>
      {signature ? <div>Signature: {signature}</div> : null}
    </div>
  );
}