Skip to content

Commit 66fdf0d

Browse files
authored
Merge pull request #360 from ffmcgee725/chore/update-caip25
Modify CAIP-25 spec to account for additive vs atomic wallet_createSession requests
2 parents 692847b + f1fe99c commit 66fdf0d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

CAIPs/caip-25.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@ Note that wallets NOT returning `sessionId`s MUST implement additional methods a
4646
* [`wallet_sessionChanged`][CAIP-311] to notify caller of updated session authorizations.
4747

4848
After a session is established between wallet and caller, subsequent `wallet_createSession` calls can be used to update the properties and authorization scopes of the session.
49-
- When a `sessionId` is returned in the initial `wallet_createSession` response, subsequent `wallet_createSession` calls either:
49+
- When a `sessionId` is returned in the initial `wallet_createSession` response, subsequent `wallet_createSession` calls either:
5050
- include a previously used `sessionId` on the root of the request meaning this request is intended to modify that session, or
5151
- do not include a `sessionId`, in which case a new session is created - the respondent generates a new `sessionId` and sends it with the success response - and the previous session dangles in parallel (until its expiration, if applicable), though maintaining concurrent sessions is discouraged (see Security Considerations).
52-
- When the wallet does not provide a `sessionId` in its initial response, subsequent `wallet_createSession` calls overwrite the previous singular session between caller and wallet.
52+
- When the wallet does not provide a `sessionId` in its initial response, subsequent `wallet_createSession` calls target the previous singular session between caller and wallet.
53+
- Wallets MAY interpret the intent of subsequent scope requests as adding to or overwriting of existing permissions
54+
- Users MAY choose to grant a subset, superset, or entirely different set of permissions
5355

5456
When a user wishes to update the authorizations of an active session from within the wallet, the wallet should notify the caller of the changes with a [`wallet_sessionChanged`][CAIP-311] notification.
5557

@@ -119,7 +121,7 @@ Example:
119121
},
120122
"scopedProperties": {
121123
"eip155:42161": {
122-
"extension_foo": "bar"
124+
"extension_foo": "bar"
123125
}
124126
},
125127
"sessionProperties": {
@@ -210,7 +212,7 @@ An example of a successful response follows:
210212
"cosmos": {
211213
...
212214
}
213-
},
215+
},
214216
"scopedProperties": {
215217
"eip155:42161": {
216218
"walletExtensionConfig": {
@@ -296,7 +298,7 @@ Regardless of caller trust level, the following error responses can reduce frict
296298
- message = "Unknown notification(s) requested"
297299
- When a badly-formed request defines one `chainId` two ways
298300
- code = 5204
299-
- message = "ChainId defined in two different scopes"
301+
- message = "ChainId defined in two different scopes"
300302
- Invalid scopedProperties Object
301303
- code = 5300
302304
- message = "Invalid scopedProperties requested"

0 commit comments

Comments
 (0)