Skip to content
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

feat(blockchainAPI): bundler interaction API #246

Merged
merged 6 commits into from
Aug 7, 2024
Merged

Conversation

geekbrother
Copy link
Contributor

This PR adds a bundler interaction API to the Blockchain-API new /v1/bundler endpoint. The user can choose the bundler to call and pass the json-rpc operation to the designated bundler.

@geekbrother geekbrother self-assigned this Jul 26, 2024
Copy link

vercel bot commented Jul 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
walletconnect-specs ⬜️ Ignored (Inspect) Visit Preview Aug 7, 2024 9:12pm

```

List of supported `method` values:
* `sendUserOperation` - Sends a user operation to the given EVM network.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since method names differ in different bundlers (not all, but some) we can unify them as I did here (and convert to the bundler-specific at the server-side) or pass the method through without any changes to the designated bundler.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need support for wallet_getCallsStatus and wallet_showCallsStatus, Im not aware if we need the others.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@geekbrother please add wallet_getCallsStatus to the supported list

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we also need to add: wallet_sendCalls, or how the client sends the batch to the designated bundler? I believe this should be also done by our endpoint?
cc @llbartekll @jakubuid

Copy link
Contributor

@jakubuid jakubuid Jul 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ganchoradkov what's the implementation here? I thought that wallet is responsible for executing an atomic batch on it's own and this endpoint is for dapp to call for a status

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the API: we will allow just wallet_getCallsStatus and wallet_showCallsStatus operations for now.

@geekbrother geekbrother changed the title feat(blockchainAPI): bundler interaction API [DRAFT] feat(blockchainAPI): bundler interaction API Jul 26, 2024
@geekbrother geekbrother requested review from nopestack and lukaisailovic and removed request for nopestack July 26, 2024 16:11
@geekbrother geekbrother marked this pull request as ready for review July 26, 2024 16:12
```

List of supported `method` values:
* `sendUserOperation` - Sends a user operation to the given EVM network.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need support for wallet_getCallsStatus and wallet_showCallsStatus, Im not aware if we need the others.

```

List of supported `method` values:
* `sendUserOperation` - Sends a user operation to the given EVM network.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


List of supported `method` values:
* `wallet_getCallsStatus` - Returns the status of a call batch that was sent via `wallet_sendCalls`.
* `wallet_showCallsStatus` - Requests that a wallet shows information about a given call bundle that was sent with `wallet_sendCalls`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the current demo PoC, we're fetching eth_getUserOperationReceipt are we going to support it?

Copy link
Contributor Author

@geekbrother geekbrother Jul 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's support it for a demo. Updated by adding eth_getUserOperationReceipt.

Copy link
Contributor Author

@geekbrother geekbrother Jul 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add this operation also if needed. Let's support it for now. I have added it.

@geekbrother geekbrother requested a review from jakubuid August 6, 2024 11:48
Copy link
Member

@ganchoradkov ganchoradkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, the api is used now in WalletConnect/walletconnect-monorepo#5171 and reown-com/appkit#2666 💯 💯

Copy link
Member

@chris13524 chris13524 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@geekbrother geekbrother changed the title [DRAFT] feat(blockchainAPI): bundler interaction API feat(blockchainAPI): bundler interaction API Aug 7, 2024
@geekbrother geekbrother merged commit 34bdb3b into main Aug 7, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants