Skip to main content

React Hooks for Solana

Web3Auth provides a set of React hooks for basic Solana wallet operations. These hooks are designed to simplify common Solana interactions in your React app.

info

For advanced Solana features, you should use @solana/web3.js on top of the hooks provided.

Solana Hooks

Hook NameDescription
useSignAndSendTransactionSign and send a Solana transaction.
useSignMessageSign a message with the Solana wallet.
useSignTransactionSign a Solana transaction (without sending).
useSolanaWalletAccess Solana wallet state and utilities.

Further code and advanced usage should be implemented using Solana's web3.js library as needed.

Common Questions

The following questions can be answered using the information on this page:

  1. What React hooks are available for Solana integration in Web3Auth?
  2. How do I sign and send transactions in Solana using Web3Auth hooks?
  3. Can I sign messages with Web3Auth's Solana hooks?
  4. How do I access the Solana wallet state in my React application?
  5. What are the basic Solana operations supported by Web3Auth hooks?
  6. How can I implement advanced Solana features with Web3Auth?
  7. What is the relationship between Web3Auth hooks and @solana/web3.js?
  8. How do I sign a Solana transaction without sending it?
  9. What utilities are available through the useSolanaWallet hook?
  10. Which Solana hook should I use for different wallet operations?