-
Notifications
You must be signed in to change notification settings - Fork 165
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
CAIP-300: Wallet Connect JSON-RPC Method #300
base: main
Are you sure you want to change the base?
Conversation
How will the standard handle the request if one of the rpc method requested via |
Then the wallet must reject it with 7001 code for invalid method Or partially reject it with an error message in the batch |
Can we consider adding
|
@lukaisailovic i'm seeing a commit adding jake as author but not one adding a _disconnect method (or for that matter, pointing to the _disconnect method added by the still-open CAIP-285 PR) 😅 holler at me when there's an approval from jake so we can get this merged and visible on the website 😎 |
@jxom there is only one concern with introducing wallet_disconnect here... the different payloads have different purposes So is the intention to batch them together as a batch "disconnection"... for example you have wallet_authenticate and wallet_createSession... the former is providing a SIWE signature while the latter is enabling a live session with the wallet... are you disconnecting both?? Also regarding ERC-7715 would the wallet_disconnect perform a wallet_revokePermissions?? Definitely agree that the absence of |
Co-authored-by: Bumblefudge <[email protected]>
i've lost the plot a bit, what are next steps here, @pedrouid ? this looks complete but I vaguely remember this being blocked on some of the non-DOM connection flows or something? Totally fine to switch it to draft if you're waiting for other implementers or open research questions to finish it. |
This comment was marked as off-topic.
This comment was marked as off-topic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some general comments:
-
The CAIP could use a chain specification to support requests for different chains.
-
It would be nice to add support for transaction requests. Although Smart Sessions allow the user to trigger transactions on the go, a faster approach (for some scenarios and specific contexts) would be for the dapp to request a series of transactions to be executed immediately. In some cases, this simplification could even eliminate the need for a connection altogether.
"jsonrpc": "2.0", | ||
"method": "wallet_connect", | ||
"params": { | ||
"<method_name>" : { ...params } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how does the wallet know which chain is being targeted for each specific method?
Do you think we should add a CAIP-10 Chain reference variable? or am I missing something 😄
Maybe something like this:
{
"id": 1,
"jsonrpc": "2.0",
"method": "wallet_connect",
"params": [{
"method" : "<method_name>",
"params": { ...params },
"namespace": "<chain_id without reference e.g. eip155:1>"
}]
}
|
||
## Abstract | ||
|
||
This proposal enables a one-click experience to fulfill several RPC requests in parallel during the connection approval when it's established when the user is requested to connect its wallet. It gives the ability for a wallet to not only establish a session, but also authenticate the user, expose capabilities or features, define some onchain permissions, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This proposal enables a one-click experience to fulfill several RPC requests in parallel during the connection approval when it's established when the user is requested to connect its wallet. It gives the ability for a wallet to not only establish a session, but also authenticate the user, expose capabilities or features, define some onchain permissions, etc. | |
This proposal enables a one-click experience to fulfill several RPC requests in parallel during the connection approval when it's established when the user is requested to connect its wallet. It gives the ability for a wallet to not only establish a session, but also authenticate the user, expose capabilities or features, define some onchain permissions, execute transactions, etc. |
This CAIP defines a JSON-RPC method to request a batch of RPC methods to be resolved when connecting a wallet in a single roundtrip.