Additional Resources
...
Aggregator Beta
What are Sessions?

Session Setup Guide

6min

Creating a session is similar to logging into our app. With active sessions, all other transactions within the app are signless and instantaneous.

Creating a session involves signing 2 transactions in metamask

  1. Transaction 1 : This generates a JSON Web Token (JWT) which is valid for 30 days. It is generated by signing your Smart Wallet address and timestamp.
  2. Transaction 2 : This involves signing specific bytes for Arbitrum and Optimism. The session key stored on your browser enables authorized transactions like swaps, bridges, trades, and gas tank deposits.

Step 1 : Signing Transaction 1

  • Head to your account to activate the session. Click on Create Session
  • Sign Transaction 1 to generate JWT token.
Document image

Document image


Step 2 : Verify Message of Transaction 2 (Optional)

  • After signing Transaction 1, if desired you can verify the message of Transaction 2.
  • Copy data from the modal and follow the outlined steps in the next section.
Document image


Step 3 : Signing Transaction 2

  • Click "Sign" in the second popup to set up the session.
Document image


Steps to Verify Message of Transaction 2

  1. Copy the code snippet by clicking on click here to copy data.
  2. Visit the Stackblitz. (Use chromium based browsers like Chrome, Firefox, Brave...)
  3. Replace the contents of data.json file with the copied code snippet data from step 1.
  4. Save the file (cmd+s, ctrl+s).
  5. Run “pnpm verify” on the terminal.
  6. Compare the signature payloud output printed with that shown in message of the second MetaMask popup.