Pimlico Smart Accounts
How to use a Dynamic signer with permissionless.js
Permissionless.js allows you to plug in custom signers to control the accounts that you create. It is possible to use Dynamic as a signer with permissionless.js, allowing you to use Dynamic to create and control smart accounts and sign transactions.
Install the dependencies
Create the Dynamic provider
Following Dynamic’s quickstart guide, set up the Dynamic provider in your app. Also integrate the DynamicWagmiConnector, which will allow you to use Dynamic as a signer with permissionless.js.
Create the SmartAccountClient
Create the smart account client using the Dynamic signer. Note: DynamicWagmiConnector internally sets up the WagmiConfig, so there is no need to do it separately. This is where you would configure what smart account implementation (e.g. Safe, Kernel, Biconomy, SimpleAccount) and what paymaster logic you want to use.
Send a transaction
You can now send transactions as normal. The sponsorUserOperation function will be called before each transaction is signed and sent, applying the custom paymaster logic you have set.
Was this page helpful?