Epoch SDK
Last updated
Was this helpful?
Last updated
Was this helpful?
To send transactions, manage smart contract wallet addresses and signing you can use Epoch SDK
Bundler Instance is needed to connect to the bundler and perform bundler specific actions like send userOps, getUserOps, getUserOperationHash etc.
You need to the bundlerUrl, address and the chain id to setup Bundler Instance
The Account API is essential to manage user's Smart Contract Wallet.
There are 2 Implementations of the Account API in Epoch's SDK
For SAFE Account API we need the SAFE Config like below, you can use the SAFE config from the SDK itself or you can pass you own.
The safeConfig and salt are essential to calculate an address for your SAFE Account. If the salt changes the address will change as well. So make sure you keep a standardised Salt for your application.
Note -
Connecting an existing ERC4337 Compatible Address is WIP and we'll soon add support for it. For now if you know the correct safeConfig and salt you can use that address as well.
You don't need to do anything for a normal transaction to calculate nonce. The SDK takes care of it or you can manually pass in the nonce if you like.
Nonce management through Epoch SDK is slightly different when compared to the usual approach for automated transactions, this is to make sure there are no nonce clashes in case you have many user ops in the queue.
Sending transactions is straightforward.
To get a list of all the transactions that are with the bundler simply run these
To delete a specific userOp in the automation queue you need to send a new userOp with the same nonce as the userOp you want to delete.
Account API Implementation for Eth-Infinitism
You can get the ENTRY_POINT and FACTORY_ADDRESS from the Github
Account API Implementation for SAFE Wallet and
ERC4337 Module only works for The wallet deployed using our SDK will have that version