Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Donesky <alex.donesky@consensys.net>
  • Loading branch information
FrederikBolding and adonesky1 authored Nov 14, 2024
1 parent f59f3cc commit 7b35ebc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions SIPS/sip-26.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ which will require to be implemented or modified.
The RPC Router will be a new native component responsible for routing JSON-RPC
requests to the appropriate Snap or keyring.

To route a request, the RPC Router MUST extract the method name and chain ID
To route a request, the RPC Router MUST extract the method name and [CAIP-2 chainId][caip-2]
from the request object. It then determines whether the method is supported by
a Protocol Snap or an Account Snap, with Account Snaps taking precedence over
Protocol Snaps.
Expand Down Expand Up @@ -127,19 +127,21 @@ type ResolveAccountAddressRequest = {
};
};
```
`scope` - The [CAIP-2][caip-2] chainId the request is targeting

`request` - A `JsonRpcRequest` containing strictly JSON-serializable values.
The implementation MUST return a value of the type `{ address: string }` or `null`.

#### Protocol Snaps

Protocol Snaps implement and expose methods that do not require an account to
execute and MUST list their supported methods in their manifest file:
execute and MUST list their supported methods and notifications in their manifest file:

```json5
"initialPermissions": {
"endowment:protocol": {
"scopes": {
"<chain_id_1>": {
"<caip2_chainId>": {
"methods": [
// List of supported methods
],
Expand Down Expand Up @@ -178,7 +180,7 @@ interface OnProtocolRequestArguments {

`origin` - The origin making the protocol request (i.e. a dapp).

`scope` - The scope of the request, currently a chain ID as defined by the [CAIP-2 specification][caip-2].
`scope` - The [CAIP-2][caip-2] chainId the request is targeting.

`request` - A `JsonRpcRequest` containing strictly JSON-serializable values.

Expand Down

0 comments on commit 7b35ebc

Please sign in to comment.