Skip to main content
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.
createSession and revokeSession use the V1 SessionToken. A program that expects SessionTokenV2 rejects these tokens. See Integrating Sessions in your Program.
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.