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

add rpc router section to SIP-26 #151

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

adonesky1
Copy link
Contributor

@adonesky1 adonesky1 commented Oct 10, 2024

Adds further detail to the RPC Router:

RPC Router

The RPC Router is a native wallet component responsible for routing RPC requests made via the Multichain API to either a Protocol Snap or the Account Router, depending on whether the requested method is registered as a signing method or not.

Role and Functioning

  • Initial Request Handling: Receives all incoming RPC requests made via the Multichain API that do not have an eip155 namespace. For now, eip155 scoped requests will continue to be handled by the native wallet, though we will need to consider how to allow users to decide whether to route these requests to snaps as well in the future.

  • Method Registration: Provides entry points for the Account Router and Protocol Snaps to register their methods, method signatures, and scopes, and maintains a registry of these RPC methods and their respective handlers.

  • Request Routing: Uses the internal registry to determine the correct handler for each incoming RPC request based on the method name, method signatures, and scope strings, forwarding the request to either the Account Router or the appropriate Protocol Snap.


See the diff for more!

@adonesky1 adonesky1 force-pushed the ad/sip-26/add-rpc-router-details branch from e50d6cb to 051318f Compare October 11, 2024 14:01
@adonesky1 adonesky1 force-pushed the ad/sip-26/add-rpc-router-details branch from 051318f to 2e1d94c Compare October 11, 2024 14:08
@adonesky1 adonesky1 changed the title add rpc router section WIP add rpc router section Oct 11, 2024
@adonesky1 adonesky1 changed the title add rpc router section add rpc router section to SIP-26 Oct 11, 2024
@adonesky1 adonesky1 force-pushed the ad/sip-26/add-rpc-router-details branch from 953910b to e084b41 Compare October 11, 2024 14:29
@adonesky1 adonesky1 marked this pull request as ready for review October 11, 2024 14:29
@adonesky1 adonesky1 requested review from Montoya, ziad-saab and a team as code owners October 11, 2024 14:29
@adonesky1 adonesky1 force-pushed the ad/sip-26/add-rpc-router-details branch from 7557007 to 8eca4a6 Compare October 18, 2024 20:52
@adonesky1 adonesky1 force-pushed the ad/sip-26/add-rpc-router-details branch from 8eca4a6 to 9b69ce1 Compare October 18, 2024 20:53
Base automatically changed from dr/accounts to main November 14, 2024 15:51
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.

2 participants