CASA
CASA copied to clipboard
RPC/CAIP-25 Call, 05 Oct 2023
PRs to refine/move to close
Ongoing issues/topics
- new CAIP idea: dapp suggesting snaps to wallets
- sessionProperties object could be extended by this
- refreshes or re-connects could change the permissions wallet gives to dapp
- pre-configs or defaults in wallet could be baseline for CAIP-25 (not how MM has been thinking about this, tho)
- altho we ARE going away from "chainswitching"/1-at-a-time mode; we want handshake/initial connect to expose multiple chains and addresses through our interal permission system
- have to consider the UX/flow for permissions per-dapp over time as opposed to upfront
- initial connection --> metamask pops up and asks for permissions (which accounts, which chains you have[, some more chains you don't which might be non-evm, which snaps that you already have installed, and... these snaps that you don't])
- even without a snap, need to name/ticker/block-explorer
- may be able to pull from ethereum-lists/chains, but a fallback/manual pass-in would be good
- need to ask wallet which snaps are enabled
- even without a snap, need to name/ticker/block-explorer
- scopeObject variation - adding chains on the fly in CAIP-25 negotiation?
- does a scope's contents GET PARSED AND MAPPED to a set of possible snapIDs or do they INCLUDE them?
- what if snap suggestions or scope annotations lived in a sessionProperties?
- does a scope's contents GET PARSED AND MAPPED to a set of possible snapIDs or do they INCLUDE them?
- other CAIP-25 variation
- addEthereumChain required fields (need ticker for native coin, etc) for batching addEthChain
straw man - what if annotations lived OUTSIDE rather than inside scope objects tho: - they don't change over the course of a session (and thus are truly sessionProperties) - they can be dropped safely by any non-extensible wallet - they can be processed before deciding which scopes are sessionScopes
{
requiredScopes{
"eip155:1": ...
},
optionalScopes{
"eip155:12412": ...
},
sessionProperties {
annotations: [
"eip155:12412": {
"suggestedSnaps": { "1234", "5678"}
"networkConfig": [
"name": "example",
"rpc": "https://example.com/endpoint"
]
}
]
}
}
Next Steps
- action items
- [X] juan will open a PR to make the extension/feature discovery flags more explicit in 170
- [ ] @hmalik88 and @adonesky1 will start a PR that adds snap suggestions and/or network config properties to scopeObjects