Skip to content

Conversation

@jiexi
Copy link
Contributor

@jiexi jiexi commented Apr 10, 2025

This CAIP discusses the motivation, specification, and rationale for a proposal aimed at improving how web extension wallets interact with websites. It outlines the current method of injecting JavaScript provider APIs into websites, its advantages, and its numerous disadvantages, such as security concerns, performance issues, and the risk of breaking websites. An alternative strategy is proposed that specifies a standard communication specification over a new transport layer which enables websites to be able to embed their own provider as a library, addressing the disadvantages of injecting providers into websites and improving web extension interoperability as a whole.

jiexi and others added 22 commits April 23, 2024 14:19
Co-authored-by: Alex Donesky <alex.donesky@consensys.net>
Co-authored-by: Alex Donesky <alex.donesky@consensys.net>
Co-authored-by: Alex Donesky <alex.donesky@consensys.net>
…nication' into browser-extension-provider-communication
Co-authored-by: Alex Donesky <alex.donesky@consensys.net>
Co-authored-by: Alex Donesky <alex.donesky@consensys.net>
Co-authored-by: Alex Donesky <alex.donesky@consensys.net>
…nication' into browser-extension-provider-communication
@jiexi
Copy link
Contributor Author

jiexi commented Apr 10, 2025

WIP. I still need to address comments in the old PR here. Opening this now to secure a caip number since we have need for this in our implementation we will soon be exposing publicly


## Security Considerations
<!--Please add an explicit list of intra-actor assumptions and known risk factors if applicable. Any normative definition of an interface requires these to be implementable; assumptions and risks should be at both individual interaction/use-case scale and systemically, should the interface specified gain ecosystem-namespace adoption. -->
`externally_connectable` has seen a decade of usage via extensions on Chrome. It has a strictly better security when compared to postMessage over contentscript.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`externally_connectable` has seen a decade of usage via extensions on Chrome. It has a strictly better security when compared to postMessage over contentscript.
`externally_connectable` has seen a decade of usage via extensions on Chrome. It has strictly better security properties when compared to `postMessage` over content scripts.

@bumblefudge
Copy link
Collaborator

@jiexi Should this be merged into #341 ? It seems like they're complementary, to some degree; if you want to keep them as two distinct documents, maybe this one should be informational and that one should be normative (might require moving some stuff over there)

While web extensions could realize the benefits of `externally_connectable` without using it with a standardized interface, this would mean that every web extension would have to ship a provider library that worked specifically for their interface and that Dapps would need to import them. It wouldn't be feasible for Dapps to import every single web extension's specific provider implementation, making this approach less viable.

Web extension inter-operability is the key to enabling generalized provider implementations. Generalized provider implementations allows for convenient adoption by Dapps, leading to more wide spread adoption of the standard as a result.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reminder: maybe mention other uses of the transport being possible?

@pedrouid
Copy link
Member

pedrouid commented Oct 8, 2025

Shouldnt this be closed in favor of the recently merged #282

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants