Question about CAIP-25
At starname.me, we are happy to use CAIP-25 to get the list of all accounts of a wallets to synchronise wallet addresses into a starname in a very smooth way (https://docs.starname.me/for-wallets/integration-with-wallet-connect-and-the-starname-manager). However two things pops into my mind:
-
it would be great to be able to get the list of accounts of a wallet without specifying the list of chain-id (CAIP-2) the wallet is currently supporting, otherwise you need to know on advance which chain-id to query for each wallet. How to solve this issue with CAIP-25? or Should we create another CAIP to query a wallet and get the list of the chain-id the wallet support?
-
to synchronise accounts into a starname, we don't need any method permission so we would have "method" set to an empty array like []. We just want to get the list of accounts that the wallet supports and being returned as a result by CAIP-25.
What do you think @pedrouid ?
That's a great question and I think we should add wildcards to the spec
This could be used in two ways:
- Get multiple accounts for a specific chainId namespace
chains:["eip155:*"] -> accounts:["0xD48F0F5e14262C48961314718113344C770A16B7@eip155:1", "0xD48F0F5e14262C48961314718113344C770A16B7@eip155:5"]
- Get multiple accounts for any chainId namespace
chains:["*"] -> accounts:["0xD48F0F5e14262C48961314718113344C770A16B7@eip155:1", "cosmos1t2uflqwqe0fsj0shcfkrvpukewcw40yjj6hdc0@cosmos:cosmoshub-3"]
Alternatively we could just take your approach which honestly it's much simpler and it doesn't break any regex rules for CAIP:2
Up to you! I think the Regex is fine. I will submit a PR
#29 I did this PR following your suggestions