From 7c7a7171c1a69f7c834ed233f22f9c603e13b30d Mon Sep 17 00:00:00 2001 From: Antoine Herzog Date: Thu, 12 Nov 2020 16:19:59 +0100 Subject: [PATCH 1/2] add wildcard case --- CAIPs/caip-25.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/CAIPs/caip-25.md b/CAIPs/caip-25.md index 0adb546f..9ac082e7 100644 --- a/CAIPs/caip-25.md +++ b/CAIPs/caip-25.md @@ -44,16 +44,31 @@ The application would interface with a provider to initiate a session by calling The JSON-RPC method is labelled as `caip_handshake` and expects two parameters: -* chains - array of CAIP-2 complaint chainId's +* chains - array of CAIP-2 complaint chainId's or an array with a wildcard "*" * methods - array of JSON-RPC methods expected to be used during the session +Example of the request with a wildcard: + +``` +{ + "id": 1, + "jsonrpc": "2.0", + "method": "caip_handshake", + "params": { + "chains": ["*"], + "methods": ["eth_sendTransaction", "eth_signTransaction", "eth_sign", "personal_sign"] + } +} +``` + + ### Response The wallet can respond to this method with either a success result or an error message. #### Success -The response MUST be a success result when the user approved accounts matching the requested chains to be exposed and the requested methods to be used. +The response MUST be a success result when the user approved accounts matching the requested chains to be exposed or all of chains available in case of a wildcard and the requested methods to be used. An example of a successful response should match the following format: From 8d9b2c45dce23d75b22af942284325cadebc9be2 Mon Sep 17 00:00:00 2001 From: Antoine Herzog Date: Thu, 12 Nov 2020 16:24:27 +0100 Subject: [PATCH 2/2] add a word --- CAIPs/caip-25.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CAIPs/caip-25.md b/CAIPs/caip-25.md index 9ac082e7..16bf5dc2 100644 --- a/CAIPs/caip-25.md +++ b/CAIPs/caip-25.md @@ -68,7 +68,7 @@ The wallet can respond to this method with either a success result or an error m #### Success -The response MUST be a success result when the user approved accounts matching the requested chains to be exposed or all of chains available in case of a wildcard and the requested methods to be used. +The response MUST be a success result when the user approved accounts matching the requested chains to be exposed or matching all of chains available in case of a wildcard and the requested methods to be used. An example of a successful response should match the following format: