[4337] Add compatibility to convert API received Operations
dasanra opened this issue · comments
Context / issue
In the protocol-kit, those methods which make sense that receive a transaction from the API can receive either the SDK object or the API object (signTransaction, executeTransaction...) and they detect the type of object converting internally to something they can use. We are not doing this kind of conversion in the 4337 kit, which makes it unconvenient to use.
Proposed solution
Allow the sign and execute methods in Safe4337Pack to receive either the SDK object or the API object. If it's the API response, it should be able to convert to an object which is able to use.
We should also make sure that the SDK returned object is already compatible with the API consumed object.