Open codeglobally opened 5 years ago
I don't believe this implementation will be able to run in browsers, if that's what this issue is intended to highlight.
The only instance of fetch is in the http-resolver which is used externally for full authenticating flows (so larger issues, it should probably be moved into did-typescript-common), but this component is interchangable so a browser compliant window.fetch varient of the exact same code should resolve this in the immediate case.
Running code in a browser/non-node client results in the exception _Uncaught (in promise) TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation at indexOP.js:30496 at Generator.next ()
at indexOP.js:30436
at new Promise ()
at _awaiter (indexOP.js:30432)
at genDid (indexOP.js:30484)
at resolver.resolve.then.catch (indexOP.js:30572)