Meeco / hedera-did-sdk-js

Javascript SDK for managing DID Documents & Verifiable Credentials
Apache License 2.0
1 stars 3 forks source link

Try to run SDK on a browser environment #22

Closed linasi closed 2 years ago

linasi commented 2 years ago

SDK won't run on browser because @hashgraph/sdk does not have support for mirror networks for WebClient.

WebClient.js:209 Uncaught (in promise) Error: mirror support is not supported in browsers
    at MirrorNode.eval [as _channelInitFunction] (WebClient.js:209:19)
    at MirrorNode.getChannel (ManagedNode.js:199:30)
    at TopicMessageQuery._makeServerStreamRequest (TopicMessageQuery.js:353:14)
    at TopicMessageQuery.subscribe (TopicMessageQuery.js:326:14)
    at HcsDidTopicListener.subscribe (hcs-did-topic-listener.js:51:46)
    at HcsDidTransaction.eval (hcs-did-transaction.js:141:22)
    at Generator.next (<anonymous>)
    at eval (hcs-did-transaction.js:8:71)
    at new Promise (<anonymous>)
    at __awaiter (hcs-did-transaction.js:4:12)

You can run the demo yourself. demo folder contains browser folder that has source and instructions on how it can be tested.

vijayshiyani commented 2 years ago

let's keep this browser demo code separate for now and not merge it to develop. what do you think @linasi