-
Notifications
You must be signed in to change notification settings - Fork 170
feat: add use send calls hook #1649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: moldy/wallet-api-base
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd the label graphite-merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
22d2016
to
9ad7468
Compare
895fe14
to
85be9fa
Compare
9ad7468
to
b027dfe
Compare
TEntryPointVersion extends EntryPointVersion = EntryPointVersion, | ||
> = { | ||
id: Hex; | ||
// TODO: deprecate this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually... not sure if we should deprecate this. we will need it for drop and replace unless we come up with a better API for drop and replace
}); | ||
|
||
return { | ||
id: preparedCallIds[0], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this might be a problem if we introduce sending multiple UOs in one request, as proposed here: https://github.com/alchemyplatform/wallet-server/pull/199/files#diff-c00cc16915cfc4387914060aa01512d771fe33d56927f69c95111ceebebc45abR123
const signature = await client.signSignatureRequest( | ||
preparedCalls.signatureRequest, | ||
); | ||
|
||
const { preparedCallIds } = await client.sendPreparedCalls({ | ||
...preparedCalls, | ||
signature, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i assume we are going to need to handle the 7702 stuff in here too, and include the eip7702Auth
in the returned request
below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we end up doing the "multi"
signature type though, i think it would work w/ no changes here other than how we construct the returned request
: https://github.com/alchemyplatform/wallet-server/pull/187/files#diff-f9efb2f119f513d936133e68e1f0faa125d4b2b5400ec33cbc170c5ba4fcc406R46
Pull Request Checklist
yarn test
)site
folder, and guidelines for updating/adding docs can be found in the contribution guide)feat!: breaking change
)yarn lint:check
) and fix any issues? (yarn lint:write
)PR-Codex overview
This PR introduces a new
mode
parameter to various configurations and updates related hooks and types to support it. It enhances theuseSmartWalletClient
anduseSendUserOperation
functions, while also refining error handling and simplifying type definitions.Detailed summary
mode
parameter tocreateConfig.ts
andtypes.ts
with types"local"
|"remote"
.useSmartWalletClient
to accept a generic type for account.GetSmartWalletClientParams
to includemode
.useSendUserOperation
.useSendCalls
hook for managing call sending.