Use session key manager
A custom React hook that manages the creation and revocation of session tokens, and provides essential methods for signing and sending transactions in a secure and user-friendly way
useSessionKeyManager
is a custom hook that takes an AnchorWallet
, Connection
, and Cluster
as arguments and returns a SessionWalletInterface
. This hook manages the session keys, tokens, and provides methods for signing and sending transactions.
The SessionWalletInterface
consists of the following properties and methods:
Here’s an example of how to use the useSessionKeyManager
:
To use the Session Key Manager across multiple components, you can set up the Provider Component and Context in your application in the following section.
Was this page helpful?