bitcoinjs / tiny-secp256k1

A tiny secp256k1 native/JS wrapper
MIT License
86 stars 55 forks source link

remove dependancy from `window` object on browser #111

Closed shamoilarsi closed 1 year ago

shamoilarsi commented 1 year ago

currently this package cannot be used in a service worker on the browser because we don't have access to the window object in the service worker.

there is only 1 place in the codebase where we use window object, which is for the crypto package.

we could fix this by directly using the crypto package and skipping window entirely.

would love to work on this. will raise a PR soon