alchemyplatform / aa-sdk

Home Page:https://www.alchemy.com/account-abstraction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docs: add docs on signing UserOperations

noam-alchemy opened this issue · comments

Is this a request for new documentation or updates to existing documentation
New Documentation

If new documentation, a clear summary of what needs to be added
A guide on how to properly construct and sign, but not submit, UserOperations. This is useful or required in several flows. Example feedback below.

Screenshot 2024-03-18 at 2 59 44 PM

we need to update this doc: https://accountkit.alchemy.com/packages/aa-core/smart-account-client/actions/buildUserOperation.html

The buildUserOperation method actually does sign UOs now. It builds fully submittable UOs since the signing now happens as part of the middleware stack which is what buildUO does.

There's also a method called signUserOperation on the client, which is not documented. But this method does not do estimation

@moldy530 we were not supposed to sign the user op within build user op or runmiddlewarestack.
this change was introduced with the multisig pr, and fixed from #587 pr.

the issue is also described in the pr description. (TLDR: for checksponsorship, dropandreplace, simulation, etc. we should not involve signing up (for drop and replace, for the first middleware pipeline run))

@noam-alchemy we already have a method for signUserOperation(), and we also had a doc, but it wasn't added to the sidebar in the accountkit doc page. Thanks for reporting this.

Fixed in this PR #604

Screenshot 2024-04-21 at 10 47 00 AM