-
Notifications
You must be signed in to change notification settings - Fork 204
feat: adds waitForUserOperationReceipt to SDKv4 #2150
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: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Pull Request Overview
This PR adds a new function waitForUserOperationReceipt to the aa-sdk core library that waits for a user operation transaction to be confirmed by periodically checking for its receipt with configurable retry parameters.
Key changes:
- Introduces a new utility function for polling transaction receipts with exponential backoff and jitter
- Exports the new function from the core module's public API
- Adds comprehensive documentation for the new function
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
aa-sdk/core/src/actions/smartAccount/waitForUserOperationReceipt.ts |
Implements the core polling logic with retry mechanism and error handling |
aa-sdk/core/src/index.ts |
Exports the new function from the public API |
docs/pages/reference/aa-sdk/core/src/variables/waitForUserOperationReceipt.mdx |
Auto-generated documentation for the new function |
|
|
||
| Defined in: [aa-sdk/core/src/actions/smartAccount/waitForUserOperationReceipt.ts:34](https://github.com/alchemyplatform/aa-sdk/blob/16e1a5e9611a91954d1f60415c45d4b23995e984/aa-sdk/core/src/actions/smartAccount/waitForUserOperationReceipt.ts#L34) | ||
|
|
||
| Waits for a user operation transaction to be confirmed by checking the receipt periodically until it is found or a maximum number of retries is reached. |
Copilot
AI
Oct 1, 2025
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.
The term 'user operation transaction' should be replaced with 'transaction' according to the documentation guidelines. The phrase should read: 'Waits for a transaction to be confirmed by checking the receipt periodically until it is found or a maximum number of retries is reached.'
| @@ -0,0 +1,115 @@ | |||
| --- | |||
| title: waitForUserOperationReceipt | |||
| description: Waits for a user operation transaction to be confirmed by checking the receipt periodically until it is found or a maximum number of retries is reached. | |||
Copilot
AI
Oct 1, 2025
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.
The term 'user operation transaction' in the description should be replaced with 'transaction' to align with the documentation terminology standards.
🌿 Documentation Preview
|
Pull Request Checklist
yarn test)sitefolder, 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 the
waitForUserOperationReceiptfunction to theaa-sdk, allowing users to wait for the confirmation of user operation transactions by checking the receipt periodically. It also includes documentation for this new function.Detailed summary
waitForUserOperationReceiptinindex.ts.waitForUserOperationReceiptfunction inwaitForUserOperationReceipt.ts.