Skip to main content
Before doing anything with the SessionKeyValidatorSDK, you must ensure that the walletPrivateKey being used must have a etherspot-modular-account. SessionKeys can be created on an existing etherspotModularWallet with ERC20SessionKeyValidator installed to itFor Steps to install ERC20SessionKeyValidator, please follow instructions in: install-module
Step 1. set .env variables via export or in your .env If you chose to use them directly skip to Step-2
Step 2. Import the Etherspot Modular SDK.
Step 3. Instantiate the SDK with below initialisation properties using this block of code.
  • privateKey
  • ChainID
  • bundlerProvider
  • bundlerApiKey
  • customBundlerUrl (can be left empty)
And that’s it! You’re now ready to call any of the SessionKeyValidator SDK functions. You can also pass in different parameters when instantiating the SDK.
  • chainId : The chain ID of the blockchain.
  • customBundlerUrl : The bundler you wish to use.
In the next page we’ll take a look at the various functions the SessionKeyValidator SDK offers.