> ## Documentation Index
> Fetch the complete documentation index at: https://etherspot.fyi/llms.txt
> Use this file to discover all available pages before exploring further.

# Functions

<Info>
  This page will contain an exhaustive list of all functions we can call using the SessionKeyValidator SDK.
</Info>

If you want to take a look at the SDK code in more detail then you can check these functions out [here on Github](https://github.com/etherspot/etherspot-modular-sdk/blob/master/src/sdk/SessionKeyValidator/SessionKeyValidator.ts).

| Function Name                                                                                                                                                                             | Description                                                                                                                                                                              |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| enableSessionKey(token: string,functionSelector: string,spendingLimit: string,validAfter: number,validUntil: number,keyStore?: KeyStore) returns SessionKeyResponse                       | generates a new sessionKey in KMS in secured cloud service and enables the sessionKey onchain in the ERC20SessionKeyValidator                                                            |
| rotateSessionKey(token: string,functionSelector: string,spendingLimit: string,validAfter: number,validUntil: number,oldSessionKey: string,keyStore?: KeyStore) returns SessionKeyResponse | generates a new sessionKey in KMS in secured cloud service and enables the sessionKey onchain in the ERC20SessionKeyValidator followed by deletion of oldSessionkey in KMS               |
| disableSessionKey(sessionKey: string) returns SessionKeyResponse                                                                                                                          | verify if the sessionKey exists and active followed by disabling sessionKey onchain on ERC20SessionKeyValidator and ending with deletion of sessionkey from KMS in secured cloud service |
| getAssociatedSessionKeys(sessionKey: string) returns string\[]                                                                                                                            | query all sessionKeys of the etherspotModularWallet address from onchain - ERC20SessionKeyValidator                                                                                      |
| sessionData(sessionKey: string) returns GetSessionKeyResponse                                                                                                                             | get onchain sessionData from ERC20SessionKeyValidator                                                                                                                                    |
| getSignUserOp(account: string,chainId: number,apiKey: string,sessionKey: string,userOp: UserOperation) returns SignedUserOp                                                               | extracts the privateKey of the sessionKey from KMS and signs the UserOp with the privateKey and returns the signedUserOp. this function is to be tried from remote-signer SDK            |
