{"id":20626625,"url":"https://github.com/roosoft/nostr","last_synced_at":"2025-04-15T15:21:36.171Z","repository":{"id":65046355,"uuid":"580906325","full_name":"RooSoft/nostr","owner":"RooSoft","description":"Connect to the nostr network with Elixir","archived":false,"fork":false,"pushed_at":"2023-10-24T12:23:02.000Z","size":423,"stargazers_count":34,"open_issues_count":2,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-22T20:38:55.013Z","etag":null,"topics":["nostr","social-network"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RooSoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-12-21T18:56:37.000Z","updated_at":"2024-11-16T15:16:45.000Z","dependencies_parsed_at":"2024-11-23T08:02:07.939Z","dependency_job_id":null,"html_url":"https://github.com/RooSoft/nostr","commit_stats":{"total_commits":418,"total_committers":1,"mean_commits":418.0,"dds":0.0,"last_synced_commit":"787e78ab15b4a16abeb43556b4561a51376d513a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RooSoft%2Fnostr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RooSoft%2Fnostr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RooSoft%2Fnostr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RooSoft%2Fnostr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RooSoft","download_url":"https://codeload.github.com/RooSoft/nostr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249094981,"owners_count":21211842,"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":["nostr","social-network"],"created_at":"2024-11-16T13:14:12.774Z","updated_at":"2025-04-15T15:21:36.140Z","avatar_url":"https://github.com/RooSoft.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nostr\n\n![nostr](https://raw.githubusercontent.com/RooSoft/nostr/main/guides/assets/images/nostr.jpeg)\n![Elixir](https://raw.githubusercontent.com/RooSoft/nostr/main/guides/assets/images/elixir-with-name.svg)\n\nCommunicate with any participant, be it relays or clients, with elixir \n\n## DISCLAMER\n\nThis library is in the process of being built in the wild. It should at the moment be considered\nalpha quality. Function names and what they return will most probably be improved in the near future, so\ndon't expect to write production code on top of it just yet. This is for education purposes only.\n\nThe current goal is to get feature complete with the most common NIPs, and will then be refined so it's\nas easy to use as can be.\n\n## Installation\n\n```elixir\ndef deps do\n  [\n    {:nostr, \"~\u003e 0.2.0\"}\n  ]\nend\n```\n\n## Create a private key\n\n```bash\niex -S mix\n```\n\n```elixir\nNostrBasics.Keys.PrivateKey.create()\n```\n\n## Use the example app\n\nIn the lib/examples, there is a NostrApp ready to be used. It connects to a relay and\nretrieves your own notes and stuff. The easiest way to use it is to create a `.iex.local.exs`\nfile and paste that in\n\n```elixir\nrelays = [\n  \"wss://relay.nostr.bg\",\n  \"wss://relay.nostr.pro\"\n]\n\nprivate_key = NostrBasics.Keys.PrivateKey.create\n\nNostrApp.start_link(relays, private_key)\n```\n\nand start iex\n\n```bash\niex -S mix\n```\n\n## Now what?\n\n### Edit your profile\n\n```elixir\n%NostrBasics.Models.Profile{\n  about: \"Instance of https://github.com/RooSoft/nostr being tested in the wild\",\n  name: \"roosoft_test_bot\",\n  picture: \"https://nostr.build/i/p/5158p.jpg\"\n}\n|\u003e NostrApp.update_profile()\n```\n\n### Subscribe to your profile... will send the current version and any subsequent changes\n\n```elixir\nNostrApp.profile\n```\n\n### Subscribe to a timeline\n\n```elixir\nNostrBasics.Keys.PublicKey.from_private_key(private_key)\n|\u003e NostrApp.timeline()\n```\n\nYou'll receive past and live events from all your followed contacts into the console, \nand are now able to send messages with that identity.\n\n### Send a message\n\n```elixir\nNostrApp.send_note(\"aren't you entertained?\")\n```\n\n### Repost a message\n\n```elixir\nNostrApp.repost(\"note14n5txr742qzq4awx0mmd2x36tul9lrlrgfjvjpr6ev8h82z6yzqs5msdq7\")\n```\n\n### Delete a message\n\n```elixir\nNostrApp.delete(\"note14n5txr742qzq4awx0mmd2x36tul9lrlrgfjvjpr6ev8h82z6yzqs5msdq7\")\n```\n\n### Follow someone\n\nThis is a bit rough around the edges still, but will be simplified soon\n\n```elixir\nNostrApp.follow(\"npub1s5yq6wadwrxde4lhfs56gn64hwzuhnfa6r9mj476r5s4hkunzgzqrs6q7z\")\n```\n\n### Unfollow someone\n\n```elixir\nNostrApp.unfollow(\"npub1s5yq6wadwrxde4lhfs56gn64hwzuhnfa6r9mj476r5s4hkunzgzqrs6q7z\")\n```\n\n### See who someone is currently following\n\nCould be yourself or anybody...\n\n```elixir\nNostrApp.contacts(\"npub1s5yq6wadwrxde4lhfs56gn64hwzuhnfa6r9mj476r5s4hkunzgzqrs6q7z\")\n```\n\n### Subscribe to incoming encrypted direct messages\n\n```elixir\nNostrApp.encrypted_direct_messages\n```\n\n### Send an encrypted direct message to someone\n\n```elixir\nNostrApp.send_encrypted_direct_messages(\"npub1s5yq6wadwrxde4lhfs56gn64hwzuhnfa6r9mj476r5s4hkunzgzqrs6q7z\", \"Howdy?\")\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froosoft%2Fnostr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froosoft%2Fnostr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froosoft%2Fnostr/lists"}