Getting Started
Dependencies
To integrate Pimlico into your Sei application, you’ll need to install the following dependencies:permissionless.js is an AA SDK that works with any account, paymaster, or bundler implementation - no vendor lock-in.
Setting up Pimlico Dashboard
Before starting the integration:- Visit the Pimlico dashboard
- Create an account and generate an API key
- Store your API key in a
.envfile:
Configuring Pimlico Client
First, let’s set up the necessary clients and configurations.Creating a Smart Account
Now let’s create a simple smart account instance. This account will be controlled by a single EOA signer:For a full list of all supported smart account types in permissionless.js see here
Setting up the Smart Account Client
To interact with the smart account, we need to create a SmartAccountClient:Sending a Gasless Transaction
With everything set up, we can now send a gasless transaction from our smart account:Complete Example
Here’s a complete example that puts everything together:What’s Happening Under the Hood?
When you send a transaction using the smart account client:- The client builds a user operation (a transaction format for smart accounts)
- Requests sponsorship from Pimlico’s paymaster
- Signs the operation with the smart account owners’s private key
- Submits it to Pimlico’s bundler
- The bundler monitors the chain until the operation is included in a block
Conclusion
You’ve now learned how to:- Set up Pimlico’s infrastructure
- Create a smart account
- Send gasless transactions