Update connect extension protocol documentation.
Zurcusa opened this issue · 1 comments
Is your feature request related to a problem? Please describe.
In the index.ts
of the connect-extension-protocol
there is documentation (comments) explaining how a web-page/app should make use of the substrate extension. More specifically:
* If a web page wants to use the features of the substrate-connect extension,
* it must first check whether the extension is available by checking whether
* there exists an element on the DOM whose `id` is equal to
* {@link DOM_ELEMENT_ID}. This DOM element is automatically inserted by
* the extension when the page loads.
As of this PR this is no longer the case.
(I am not 100% sure I am correct on the following)
Furthermore, it seems that the message format expected by the extension should follow this format, { channelId: messageChannelId, msg }
, whereas the comments do not state anything about the channelId
. Imo that could be a helpful addition.
Describe the solution you'd like
Update the documentation comments to better conform with the current situation of the project. To do that 2 main things must be changed:
- Update the comments regarding how the web page should check if the extension is available.
- (OPTIONAL) Add information regarding the format of the message that is transferred via the
window.postMessage()
.
Describe alternatives you've considered
No response
Additional context
No response
That package will be deprecated soon. We recommend going with the @substrate/discovery protocol instead.