{"id":20254643,"url":"https://github.com/shocknet/smart","last_synced_at":"2026-03-05T20:10:30.596Z","repository":{"id":101967402,"uuid":"571267142","full_name":"shocknet/SMART","owner":"shocknet","description":"Slightly More Advanced Relay Technology for NOSTR","archived":false,"fork":false,"pushed_at":"2023-10-14T16:41:48.000Z","size":5,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T03:32:12.232Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shocknet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["shocknet"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-11-27T17:34:23.000Z","updated_at":"2023-11-25T02:01:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"ed116ea5-d79d-4809-b410-4f307ac9df59","html_url":"https://github.com/shocknet/SMART","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shocknet%2FSMART","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shocknet%2FSMART/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shocknet%2FSMART/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shocknet%2FSMART/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shocknet","download_url":"https://codeload.github.com/shocknet/SMART/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241705908,"owners_count":20006398,"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":[],"created_at":"2024-11-14T10:34:15.263Z","updated_at":"2026-03-05T20:10:25.539Z","avatar_url":"https://github.com/shocknet.png","language":null,"funding_links":["https://github.com/sponsors/shocknet"],"categories":[],"sub_categories":[],"readme":"# SMART\n\n*(Slightly More Advanced Relay Technology (for Nostr))*\n\n`rfc`\n\n**PURPOSE**\n\nA middleware service that provides a performant interface to nostr, by sitting between client applications and relay-networks, to run logic that is beyond the scope or NIP compliance of core relay implementations. These added capabilities or “SMART Routes” are enabled by server-side caching, indexing, and rendering that would otherwise have to otherwise be done client-side and cause poor usability.\n\nSMART Routes should supply only results that are contrived from NIPs, and are therefore verifiable. A client appending `/proof` to their request should expect the raw events needed to reconstruct a result. Routes are to be defined similarly to NIPs, but with the assumptions of being an application back-end rather than a client-side protocol.\n\nUnlike NIPs, an SR is referenced by name instead of arbitrary numbers. For example, a route for GET `/smart/npub/nip05/` would be referenced as `npub-nip05`.\n\nSMART is **not** intended as its own relay, but drop-in middleware for client applications, that will in many instances forward raw events and requests.\n\n**Example usecases:**\n\n- A nostr-based contact list in lightning wallet:\n    - User inputs their `npub`,\n    - Client GETs `/smart/npub/contacts/`,\n    - A list of all accounts the provided npub follows is returned.\n    - Each contact returned would contain lnurl or lpub `payee` information from its indexed metadata, and could thus be used by the wallet for the sending payments, as well as other profile display information like avatars, pet names, etc.\n\n- Key Delegation:\n    - Responses should include data published via delegated keys to save a client multiple round trip look-ups. Indexes enabling this route could combine multiple delegation NIPs into a single GET response.\n\n**OTHER NON-ROUTE FEATURES**\n\n- Scavenging and Forwarding Policies\n    - Write events received from clients may be forwarded to other networks.\n    - Other networks may also be queried if local results are unsatisfactory.\n    - Service publishes forwarding and scavenging policies\n        - Clients may use these to help a user determine if they want to specify additional networks for use.\n\n- Scalability\n    - Uses relays as write-leader for eventual consistency.\n    - Access tiering\n    - Highly Available\n\n- Private API\n    - Chaumian tokens, sold to or earned reputationally by clients, allow ephemeral keys to write without leaking who whitelisted them.\n    - Authenticated routes can protect metadata Direct Messages and other sensitive kinds.\n\n**DEFINITIONS**\n\n- Unsatisfactory Results\n    - No results for specified kind / tag / age\n    - Signatory has tagged a relay that is not in scavenging array\n\n**ROUTES**\n\n- Stable\n- Dev\n- To Do\n  - npub-avatar\n  - npub-name\n  - npub-nip05\n  - npub-payee\n  - npub-contacts\n  - npub-delegates\n  - npub-relays\n  - raw-write\n  - raw-req\n  - nevent-\n  - nevent-\n  - nprofile-\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshocknet%2Fsmart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshocknet%2Fsmart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshocknet%2Fsmart/lists"}