hashgraph / hedera-docs

Welcome to the official Hedera documentation repository.
https://docs.hedera.com
60 stars 107 forks source link

Documenting that mirror nodes do not support use in a browser environment #76

Open ed-marquez opened 2 years ago

ed-marquez commented 2 years ago

Problem

πŸ†•πŸ₯ First Timers Only

This issue is reserved for people who have never contributed to Hedera or any open source project in general. We know that creating a pull request (PR) is a major barrier for new contributors. The goal of this issue and all other issues labeled by 'good first issue' is to help you make your first contribution to Hedera.

πŸ‘Ύ Description of the issue

According to the teams response in the following issue, mirror nodes do not support use in a browser environment. https://github.com/hashgraph/hedera-sdk-js/issues/1114. Add this information to the mirror node section in docs.

Solution

πŸŽ‰ Contribute to Hacktoberfest

Solve this issue as part of the Hacktoberfest event and get a chance to receive cool goodies like a T-Shirt. 🎽

πŸ€” Additional Information

If you have any questions, just ask us directly in this issue by adding a comment. You can join our community chat at Discord. A general manual about open-source contributions can be found here.

Problem

According to the teams response in the following issue, mirror nodes do not support use in a browser environment. https://github.com/hashgraph/hedera-sdk-js/issues/1114

1114 was reported by a Swirlds Labs user, but a Discord user also reported running into this limitation.

Solution

It may be worth adding a sentence or two in the documentation to include info on this limitation. Perhaps here (i think?): https://docs.hedera.com/guides/docs/mirror-node-api/hedera-consensus-service-api-1

Alternatives

No response

radleylewis commented 1 year ago

Problem

Unable to subscribe to topics in the browser environment (where gRPC-web is used). As per the above, and below reference, the explanation given being that the mirror nodes themselves don't support gRPC-web.

However, when in the context of the browser, it is possible to successfully invoke TopicMessageSubmitTransaction to send messages to the Hedera Network.

The get topic messages is, as discussed, not working.

Question

Is it possible to provide more information on the cause of the limitation? I'm assuming that gRPC-web requests are not supported/cannot succeed because the subscription would need to be routed back through the gRPC-web proxy. Would this assumption be accurate?

Reference

This issue is also discussed here. Specifically, that the mirror nodes themselves do not expose a gRPC-web endpoint.