bitcoinjs / tiny-secp256k1

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

Is there a fallback build instead of wasm? #109

Closed chendatony31 closed 1 year ago

chendatony31 commented 1 year ago

I want the js can be compatible with most browsers even old ones. Is there a fallback build instead of wasm?

FlorianHubl commented 1 year ago

Anything new on this?

landabaso commented 1 year ago

Use previous 1.* version of tiny-secp256k1. I also maintain this npm package "@bitcoinerlab/secp256k1" based on Paul Miller's Noble that does not require wasm.

chendatony31 commented 1 year ago

Use previous 1.* version of tiny-secp256k1. I also maintain this npm package "@bitcoinerlab/secp256k1" based on Paul Miller's Noble that does not require wasm.

Yes, using @noble/secp256k1 to implement ecc's functions is a way. 👍

junderw commented 1 year ago

@bitcoinerlab/secp256k1 which is maintained by @landabaso is a good alternative.

I am also considering using wasm2js to generate an asm.js (pure JS) based mirror package in the future.

@bitcoinerlab/secp256k1 should be more performance than the asm.js version, though.

That said. React Native now supports WASM. Try convincing your teams to update your react versions to a more recent one so you don't have to deal with these problems anymore.