feat: adds waitForUserOperationReceipt to SDKv4#2150
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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. | |||
There was a problem hiding this comment.
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.