Open pedrouid opened 7 months ago
This means that if you would like to authenticate yourself with SWIx for multiple chains then you need to sign multiple messages
Why is this the case?
1
as any, or simply ignore the chainIdCan you provide an example of the problem you are trying to solve here? "I want to sign in with multiple chainids at once" is not a problem, it's a proposed solution.
If I were to take a guess on what problem you are trying to solve I think you need to give dapps access to call rpc methods for multiple chains? However, I'm not sure why SIWE is relevant for that?
"Just ignore" is always a dicey way of specifying behavior; perhaps the best solution is an extension spec that specifies exactly how to ignore or override CAIP122 behavior if X and Y conditions are met (presumably, resource array members, since that's basically the only open-ended part of the spec)? Even if that extension CAIP is only applicable to eip155, it might still be worth writing in a generic way and profiling in eip155/caipXXX.md in case some almost-evm compatible L1 wants to use it the same way with slightly different recaps or recap-equivalent capability expression format...
SIWx is a great standard but currently it only supports one chain per message signed
The multi-chain experience is now considered to be de facto standard for Web3 in general but SIWx is still designed for single-chain
This means that if you would like to authenticate yourself with SWIx for multiple chains then you need to sign multiple messages
The current Wallet UX does not support batch signing for messages and even if it did it would require a lot of inspection from users unless the UI would aggregate the common parts of the message
A much simpler approach would be to change CAIP-122 to support multiple chains
Instead of specifying a single chain per message then it could support a range of chains
This could be approach for example with the following options:
Each option has its own pros and cons:
Maybe there are options besides these ones above but I feel like something needs to be done address this
But the intended goal should be that if a user wants to authenticate for chain A, B and C then it should sign a single message rather than 3 messages