-
-
Notifications
You must be signed in to change notification settings - Fork 14
feature: Add Nostr Protocol #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Thanks for taking a look at this. I need to dig in further, but on first glance, I don't want to include |
Thanks for the feedback @nzakas , noted. I'll try to either find a lighter library or write from scratch. If I succeed, I'll update this PR. |
Hello again @nzakas , I've removed the nostr-tools dependency and implemented the posting side manually. However, I believe it's hard to bypass elyptic curve algorithms and encryption dependencies: Nostr authentication is like ssh key authentication, you dispatch messages to relays using your private key, and public key is your address, you're not bound to any domain at all. So I had to introduce some encryption libraries for this to work. They were possibly sub dependencies of nostr-tools (havent't checked). I'd appreciate your feedback on this. Theoretically, I can guide the users to use some online sites to convert nsec... formatted private keys to hex format, and provide them in addition to a newly converted public key, and it should remove at least one dependency. However, almost every nostr client uses nsec.. string directly or through a browser extension. PS: If this makes the project out of your focus and you'd think it would not be feasible to merge because of the new dependencies, since nostr is rather a new protocol, I understand, no problems. I was going to make exactly same thing as crosspost, without realizing this exists, then instead simply wanted to contribute 😊 |
Thanks. I'm going to need to find a chunk of time to dig deeply into this to better understand how Nostr is supposed to work and what a coherent strategy would look like. |
Just had some time to look at this now. I'm not comfortable with the current implementation for a bunch of reasons, but rather than go back and forth, I'll just take some time to implement it. I appreciate your work on this and I'll use it as a guide as I move forward. |
Heya, First of all, thank you for the review. Of course, no problems! Also, I'd appreciate if you could share some feedback why it would not be feasible to merge as current state, totally to try to improve myself. Thanks again for the interest, have a great day! |
Hello,
This PR aims to add support for nostr protocol to crosspost.
I've tried to update the documents and write tests accordingly, and tried to keep everything tidy. I've used the popular nostr-tools package to connect with the nostr relays.
I've successfully implemented and dispatched a message to my relays using my fork's branch that I've created on my personal account:
https://primal.net/e/nevent1qqs9qmmd7wmlvh68dy0zm5e288s7uf2hgsmhfjv5tq6u5gpnh57x95cux09ee
This is the snippet that I've used to dispatch this message:
I'd appreciate if you'd consider this contribution for the repository, since I use X, Bluesky, Mastodon and Nostr all.
PS: Nostr does not allow image uploads by the nature, but you can embed any image from any source as long as you provide a valid image URL, such as an s3 bucket, or imgur etc. so I've added a note there.
If you need me to do anything, please let me know.
Thanks, and kind regards!