NamespaceUtils contrusctNamespaces should only use namespace when generating methods and events instead of namespace and chainId. #257
Replies: 4 comments
-
Happy to raise a PR with the fix. The issue arrises when it's used in Multicoin wallet and requires to create methods and event dynamically which is not ideal. |
Beta Was this translation helpful? Give feedback.
-
Hey there Ayush: This is an interesting proposal, which actually speaks to one of the wonkier bits of EVM design to date. As specified and implemented, wallets and dapps don't really have a "wildcard" that can safely be used, and the coming chaos of rollups and ZK rollups in particular makes "cross-chain" assumptions particularly fraught. For this reason, the CAIP-25 protocol which WC namespaces abstract out is very explicit and verbose-- each authorization object that dapp and wallet persist, negotiate, and iterate (modelled on an OAuth3 RAR, if you're curious on the design backstory) is scoped to either a single chain, or an enum of chains with the same authorizations. What we found when researching use-cases and corner-cases for CAIP-25 was that some dapps and dapp<>wallet trust models/permissioning models have a common list of methods they need across all [EVM] chains, and need to be able to extend that list over time. The way to do this is an authorization object scoped to all of |
Beta Was this translation helpful? Give feedback.
-
Hey @bumblefudge that's for detailed explanation. It does sound valid for wallets and dApps having fine control over methods and events for specific chain. However, in the current implementation, the SDK emits the list of methods and events which are not mapped 1-1. It iterates over the user given set of methods and events to generates the list of methods and events. |
Beta Was this translation helpful? Give feedback.
-
sorry, not sure i understand. if you need different methods and/or events per chain, you need to use separate scopeObjects (they're called "namespaces" in the sdk). if you need the same methods and events for 1 or more EVM chains, you can just create a namespace object that is scoped to all of EVM and put 1 or more chains int he |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
The problem with using NamespaceUtils constructNamesapces is that it always needs chainId, when it should only take namespace for the methods and events.
Describe the solution you'd like
{"eip155:personal_sign"}
instead of{"eip155:1:personal_sign"}
should be acceptedBeta Was this translation helpful? Give feedback.
All reactions