Comment on page

Connect to Bundler

As described in the Account Abstraction page, to interact with a smart account you will need to pass through a Bundler. A Bundler is a new type of node that you can either use from dedicated services like Stackup or deploy yourself. The bundler connection must stay on the server side unless you want your bundler to be publicly acessible.

Setup Stackup Bundler

Stackup is the most mature and reliable ERC-4337 infrastructure available. And you will need their service to use Permissive as a service. We will guide you how to setup a permissive project with Stackup.
Once your account is created you need to choose a network where you will get your deployer. Choose one where permissive and your service is deployed.
Once done you stackup bundler is setup and you can now copy the bundler & node URL

Backend setup

Create a Bundler

To create a Bundler with Permissive you need to import the Bundler class and instantiate it with your bundler url. We advise you to store it in an enviroment variable.
import { Bundler } from '@permissivelabs/sdk';
if(!process.env.BUNDLER_URL) throw;
const bundler = new Bundler(process.env.BUNDLER_URL);
Your backend setup is now ready you can use the users’ granted permissions to interact with their account