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

Update CAIP-25 based on CASA Gathering in Amsterdam #108

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions CAIPs/caip-25.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,21 @@ The application would interface with a provider to initiate a session by calling
"id": 1,
"jsonrpc": "2.0",
"method": "caip_handshake",
"params": {
"chains": ["eip155:1"],
"methods": ["eth_sendTransaction", "eth_signTransaction", "eth_sign", "personal_sign"]
}
"params": [
{
"chains": ["eip155:1"],
"methods": ["eth_sendTransaction", "eth_signTransaction", "eth_sign", "personal_sign"]
"events": ["accountsChanged", "chainChanged"]
}
]
}
```

The JSON-RPC method is labelled as `caip_handshake` and expects two parameters:
The JSON-RPC method is labelled as `caip_handshake` and expects an array with objects with three parameters:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The JSON-RPC method is labelled as `caip_handshake` and expects an array with objects with three parameters:
The JSON-RPC method is labelled as `caip_handshake` and expects an array with objects with three properties:


* chains - array of CAIP-2 compliant chainId's
* chains - array of CAIP-2 compliant chainId's to be used during the session
* methods - array of JSON-RPC methods expected to be used during the session
* events - array of JSON-RPC message/events expected to be emitted during the session

### Response

Expand Down Expand Up @@ -95,12 +99,18 @@ The valid error messages codes are the following:
* When user disapproves accepting calls with the request methods
* code = 5001
* message = "User disapproved requested methods"
* When user disapproves accepting calls with the request events
* code = 5002
* message = "User disapproved requested events"
* When wallet evaluates requested chains to not be supported
* code = 5100
* message = "Requested chains are not supported"
* When wallet evaluates requested methods to not be supported
* code = 5101
* message = "Requested methods are not supported"
* When wallet evaluates requested events to not be supported
* code = 5102
* message = "Requested events are not supported"

## Links

Expand Down