Getting started
Dependencies
To integrate Pimlico into your Sei dApp, install these dependencies:permissionless.js is an AA SDK that works with any account, paymaster, or bundler implementation. It does not lock you in to one vendor.
Setting up Pimlico dashboard
Before you start the integration:- Go to the Pimlico dashboard.
- Create an account. Then generate an API key.
- Store your API key in a
.envfile:
Configuring Pimlico client
First, set up the necessary clients and configurations.Creating a smart account
Next, create a simple smart account instance. A single EOA signer controls this account:For the full list of smart account types that permissionless.js supports, see the smart account comparison.
Setting up the smart account client
To interact with the smart account, create aSmartAccountClient:
Sending a gasless transaction
When the setup is complete, you can send a gasless transaction from your smart account:Complete example
This complete example combines all of the steps:What’s happening under the hood?
When you send a transaction with the smart account client:- The client builds a user operation (a transaction format for smart accounts).
- The client requests sponsorship from Pimlico’s paymaster.
- The client signs the operation with the private key of the smart account owner.
- The client submits the operation to Pimlico’s bundler.
- The bundler monitors the chain until the operation is included in a block.
Conclusion
This guide showed how to:- Set up Pimlico’s infrastructure
- Create a smart account
- Send gasless transactions