python-nostr
python-nostr copied to clipboard
Would a PR which replaces secp256k1 by coincurve be accepted?
@jeffthibault Would you be willing to accept a PR in which secp256k1 is replaced by coincurve (https://github.com/ofek/coincurve) ?
The advantage is that coincurve is a cross-plattform binding for libsecp256k1.
Before I make everything ready, I just want a confirmation.
I decided to make a fork for now: https://github.com/holgern/pynostr
Coincurve does not enable us to do ECDH for nostr. I have added a PR to embit that does. After the next release of embit, I will add it here which will enable windows support. I also prefer to use embit because it includes other components that can be used in this library.
It is possible with coincurve when
from coincurve._libsecp256k1 import ffi, lib
HAS_ECDH = hasattr(lib, 'secp256k1_ecdh')
At least on windows HAS_ECDH is true for me.
You can check my implementation: https://github.com/holgern/pynostr/blob/main/pynostr/key.py
It is possible to do encrypted DMs with it.
It would be cool when everything works with embit, good work!
Thanks!
Okay, I understand what you're doing. However, I still prefer embit for reasons mentioned above. Should be supported soon.
Is embit version available with pip install nostr ?
alternate pr, didn't know the other was available... uses compat layer so code is minimal: https://github.com/jeffthibault/python-nostr/pull/84/files
alternate pr, didn't know the other was available... uses compat layer so code is minimal: https://github.com/jeffthibault/python-nostr/pull/84/files
@earonesty Will this pull request be implemented at some point? Are there really plans for the library to be compatible with Windows or Mac M1-M2 at some point? It would be very useful to have this clear to know whether to use python-nostr or look for other alternatives for systems that do not support secp256k1. Thanks.
will the pr be merged soon?
Hey there, heads up that I just released coincurve v21.0.0 which brings performance improvements and removes all runtime dependencies!
Hey there, heads up that I just released coincurve v21.0.0 which brings performance improvements and removes all runtime dependencies!
thank you 🙏