{"id":16112959,"url":"https://github.com/guilospanck/nostr","last_synced_at":"2025-03-18T09:31:08.549Z","repository":{"id":168749654,"uuid":"584494052","full_name":"Guilospanck/nostr","owner":"Guilospanck","description":"Nostr protocol written in Rust","archived":false,"fork":false,"pushed_at":"2023-07-24T17:29:54.000Z","size":407,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T06:10:45.944Z","etag":null,"topics":["decentralized-applications","nostr","protocol"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/guilospanck-nostr-sdk","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Guilospanck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-02T18:16:10.000Z","updated_at":"2024-09-13T18:53:36.000Z","dependencies_parsed_at":"2024-10-27T17:29:25.945Z","dependency_job_id":"4e7c605e-74b5-4377-a1ec-487e90eeb082","html_url":"https://github.com/Guilospanck/nostr","commit_stats":null,"previous_names":["guilospanck/nostr"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guilospanck%2Fnostr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guilospanck%2Fnostr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guilospanck%2Fnostr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guilospanck%2Fnostr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Guilospanck","download_url":"https://codeload.github.com/Guilospanck/nostr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243911232,"owners_count":20367648,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decentralized-applications","nostr","protocol"],"created_at":"2024-10-09T20:09:49.441Z","updated_at":"2025-03-18T09:31:08.544Z","avatar_url":"https://github.com/Guilospanck.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nostr [![codecov](https://codecov.io/gh/Guilospanck/nostr/branch/main/graph/badge.svg?token=1CF85SBYD9)](https://codecov.io/gh/Guilospanck/nostr)\n\nYet another Nostr implementation in Rust.\n\n## FAQ\n\n### Why\n\nWhy not?\n\n\u003e No, just kidding, not going to be one of those people.\n\nI believe the best way to understand something is to actually implement it. Nostr really got my attention and as I'm willing to improve my Rust (_and not be rusty_ 🥁), I decided to delve into the protocol and implement it in this ~~fkn crazy, don't know WTF I'm doing~~ beautiful language.\n\n### Why Nostr\n\nWe live in the best era of all our society history. We can talk to our loving ones from far away with the simple click of your mouse pointer (or the press of your finger); we can fly to distant places in a relatively comfortable and quick way; we can listen to any music we like at any time we want; we can learn from everyone at everytime, from any era, at any pace, virtually cost-free. Life's amazing.\n\nOne of the problems, though, is that society tends to centralize things in the hands of a few people, giving them absolute power of the lives of others and, as the saying goes, _absolute power corrupts absolutely_. No matter how \"good\" someone is, the system itself is corrupt and will eat them alive.\n\nThis centralization happens, most of the times, in subtle ways. We start using some social media and before we know it, we're addicted and cannot live without it - and this is not just because some dopamine hit that we can't live without, but some people _literally_ depend on social media, either because it's in there they can find customers, or they sell in these platforms, or even some extrapolation like \"knowing when something is going to happen (say a metro strike, therefore I should not leave my home at the same time so I don't get late to get my children at the school)\".\n\nWhen we're denied the use of said platforms, a descending spiral starts to form in our lives and bad things start to happen because of that. But even more than that, it's not just because we apparently won't lose anything that it should be okay in denying one's access to something.\n\nNostr is a way to fight that. It abides to the natural law of communication and the right to come and go.\n\n- _Some relay doesn't want you there or will block you for X-reasons?_ Jump to another relay and tell the people you want to talk to (and want to talk to you) where you are.\n\n- _You don't like the client you are using but you really want to still be connected to your peers?_ No problem, just choose another client that exists - or create your own.\n\nThe protocol is agnostic. It is like nature: _it does not care who you are_. As long as you follow the rules of the implementation of the protocol (laws of nature), you will be allowed to be \"alive\".\n\n### Why Rust\n\nEven though I only know the basics of Rust, I think it brings such enrichment to the mind of a software developer in a sense that it makes you shift your paradigms of how you think when programming. In that sense, I would say it makes you a better programmer overall.\n\n### What challenges faced so far\n\nThe protocol is indeed simple. The [NIP01](https://github.com/nostr-protocol/nips/blob/master/01.md), which states the required basis for the implementation, is not a complex subject - although I would have preferred that document to be a little more detailed/formatted.\n\nThe real challenge for me was/is regarding the async operations in Rust. I think that it's a whole pain to learn and to implement and to debug and whatnot. There are so many concepts in action and many of them crash with the concepts of `Ownership` and `Mutation` that Rust has. Once you get something working, it will become a little, little easier to put everything together.\n\nKeep going. I think it will pay off.\n\n## NIPs implemented\n\n- [x] NIP01\n- [x] NIP10\n\n## How to run\n\nBoth `client`, `relay` and `nostr-sdk` read from `.env` variables to work. If it is not found, it is going to use the default values.\nYou can find `.env` example files inside each folder with the name `example.env`. Create a `.env` file inside each of them with the values\nyou desire.\n\n```bash\n##! Inside each folder\ncp example.env .env\n```\n\n### Relay\n\n```bash\nmake relay-run\n```\n\nWill start listening on the value defined by the `RELAY_HOST` environment variable. If it doesn't find it, will default to `0.0.0.0:8080`.\n\n### Client\n\n```bash\nmake client-run\n```\n\nClient will try to connect automatically to the addresses defined by the `RELAY_LIST` environment variable. If: If it doesn't find it, will default to `ws://127.0.0.1:8080/`.\n\n## Debugging\n\n`CMD/Ctrl P` then `\u003eDebug: Select and Start Debugging`. Then you can choose which part (client or relay) you wanna debug.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguilospanck%2Fnostr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguilospanck%2Fnostr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguilospanck%2Fnostr/lists"}