{"id":15353922,"url":"https://github.com/staltz/ssb-keys-neon","last_synced_at":"2025-07-06T00:06:35.014Z","repository":{"id":37032090,"uuid":"237818111","full_name":"staltz/ssb-keys-neon","owner":"staltz","description":"A drop-in replacement of ssb-keys, implemented in Rust and delivered as a native module in Node.js","archived":false,"fork":false,"pushed_at":"2023-12-15T03:49:49.000Z","size":12289,"stargazers_count":13,"open_issues_count":7,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-17T00:48:48.622Z","etag":null,"topics":["cryptography","neon","neon-bindings","scuttlebutt","ssb","ssbc"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/staltz.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":"2020-02-02T18:42:09.000Z","updated_at":"2022-06-18T16:34:41.000Z","dependencies_parsed_at":"2024-10-16T02:41:10.499Z","dependency_job_id":"6735b995-b43f-4702-bc30-cc8e5f46b8a3","html_url":"https://github.com/staltz/ssb-keys-neon","commit_stats":{"total_commits":166,"total_committers":3,"mean_commits":"55.333333333333336","dds":0.09638554216867468,"last_synced_commit":"9dd574330c1b73f11dbe024e42b2cb0570576102"},"previous_names":["staltz/ssb-neon-keys"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/staltz/ssb-keys-neon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staltz%2Fssb-keys-neon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staltz%2Fssb-keys-neon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staltz%2Fssb-keys-neon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staltz%2Fssb-keys-neon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/staltz","download_url":"https://codeload.github.com/staltz/ssb-keys-neon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staltz%2Fssb-keys-neon/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263828719,"owners_count":23516789,"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":["cryptography","neon","neon-bindings","scuttlebutt","ssb","ssbc"],"created_at":"2024-10-01T12:16:06.589Z","updated_at":"2025-07-06T00:06:34.996Z","avatar_url":"https://github.com/staltz.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ssb-keys-neon\n\n\u003e A drop-in replacement of `ssb-keys`, implemented in Rust and delivered as a native module in Node.js\n\n```\nnpm install ssb-keys-neon\n```\n\n## Motivation\n\nIt would make a lot of sense for SSB to be implemented in Rust, a language for safety and performance. [Sunrise Choir](https://github.com/sunrise-choir/) has written a lot of SSB modules in Rust, but these are not yet running in production, simply because it requires a lot of work to migrate from Node.js (and/or Electron) to Rust.\n\n[Neon](https://neon-bindings.com) allows you to create native modules for Node.js written in Rust. This is great, because it allows us to use Sunrise Choir's modules directly inside Node.js!\n\nssb-keys-neon does exactly that, it runs [ssb-crypto](https://github.com/sunrise-choir/ssb-crypto), [ssb-keyfile](https://github.com/sunrise-choir/ssb-keyfile), [ssb-multiformats](https://github.com/sunrise-choir/ssb-multiformats) (Rust crates) under the hood, but provides an API that **perfectly mirrors** that of `ssb-keys`. There is no code you need to migrate, just replace `ssb-keys` with `ssb-keys-neon` and it's done.\n\nWe even run the same test suite for `ssb-keys` on `ssb-keys-neon`.\n\n## Usage\n\nThere are two ways you can use this npm package.\n\n### Option 1: (easiest) automatically replace\n\nIn your **package.json**, assuming you already have `ssb-keys`, you can replace its *implementation* by pointing to the GitHub repo for `ssb-keys-neon`:\n\n```diff\n   // ...\n   \"dependencies\": {\n     \"ssb-ebt\": \"^5.6.7\",\n     \"ssb-friends\": \"^4.1.4\",\n     \"ssb-invite\": \"^2.1.3\",\n-    \"ssb-keys\": \"7.2.0\",\n+    \"ssb-keys\": \"staltz/ssb-keys-neon#replace-7.2.0\",\n     \"ssb-lan\": \"^0.2.0\",\n     \"ssb-logging\": \"^1.0.0\",\n     \"ssb-markdown\": \"^6.0.4\",\n   }\n   // ...\n```\n\nThis is the easiest method because you only need to change `package.json`, your code can still `require('ssb-keys')` and under the hood it will load `ssb-keys-neon`.\n\nNote that you **cannot specify version ranges**. If you previously had `\"ssb-keys\": \"7.x.x\"`, you will have to specify an exact version when you write `\"staltz/ssb-keys-neon#replace-7.2.0\"`, you cannot write `\"staltz/ssb-keys-neon#replace-7.x.x\"`.\n\n### Option 2: manually replace\n\nThis method gives you more control over the usage of `ssb-keys-neon`, as well as allows you to specify version ranges. Just *remove ssb-keys* from your package.json, and *add ssb-keys-neon*:\n\n```diff\n   // ...\n   \"dependencies\": {\n     \"ssb-ebt\": \"^5.6.7\",\n     \"ssb-friends\": \"^4.1.4\",\n     \"ssb-invite\": \"^2.1.3\",\n-    \"ssb-keys\": \"8.0.0\",\n+    \"ssb-keys-neon\": \"\u003e=8.0.0-1\",\n     \"ssb-lan\": \"^0.2.0\",\n     \"ssb-logging\": \"^1.0.0\",\n     \"ssb-markdown\": \"^6.0.4\",\n   }\n   // ...\n```\n\n**Then**, you also have to replace usages of ssb-keys manually in JavaScript source files:\n\n```diff\n-var ssbKeys = require('ssb-keys')\n+var ssbKeys = require('ssb-keys-neon')\n\n // ...\n```\n\n## Versioning and support\n\n`ssb-keys-neon@X.Y.Z-num` is compatible with `ssb-keys@X.Y.Z`. Versions older than 8.0.0 still use the old name `ssb-neon-keys` so be sure to type it correctly.\n\nVersions of ssb-keys that are mirrored by ssb-keys-neon currently include (and which platforms are guaranteed to be supported):\n\n\u003cdetails\u003e\n\u003csummary\u003e8.0.0 (click here to see which platforms are supported)\u003c/summary\u003e\n\nAs of `ssb-keys-neon@8.0.0-5`\n\n- macOS (darwin-x64)\n  - Node 10.x\n  - Node 12.x\n  - Node 14.x\n  - Electron 7.x\n  - Electron 8.x\n  - Electron 9.x\n  - Electron 10.x\n- Linux (linux-x64)\n  - Node 10.x\n  - Node 12.x\n  - Node 14.x\n  - Electron 7.x\n  - Electron 8.x\n  - Electron 9.x\n  - Electron 10.x\n- Windows (win32-x64)\n  - Node 10.x\n  - Node 12.x\n  - Node 14.x\n  - Electron 7.x\n  - Electron 8.x\n  - Electron 9.x\n  - Electron 10.x\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e7.2.2 (click here to see which platforms are supported)\u003c/summary\u003e\n\n**As of `ssb-neon-keys@7.2.2-2`**\n\n- macOS (darwin-x64)\n  - Node 10.x\n  - Node 12.x\n  - Node 14.x\n  - Electron 7.x\n  - Electron 8.x\n  - Electron 9.x\n  - Electron 10.x\n- Linux (linux-x64)\n  - Node 10.x\n  - Node 12.x\n  - Node 14.x\n  - Electron 7.x\n  - Electron 8.x\n  - Electron 9.x\n  - Electron 10.x\n- Windows (win32-x64)\n  - Node 10.x\n  - Node 12.x\n  - Node 14.x\n  - Electron 7.x\n  - Electron 8.x\n  - Electron 9.x\n  - Electron 10.x\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e7.2.1 (click here to see which platforms are supported)\u003c/summary\u003e\n\n**As of `ssb-neon-keys@7.2.1-3`**\n\n- macOS (darwin-x64)\n  - Node 10.x\n  - Node 12.x\n  - Node 14.x\n  - Electron 7.x\n  - Electron 8.x\n  - Electron 9.x\n  - Electron 10.x\n- Linux (linux-x64)\n  - Node 10.x\n  - Node 12.x\n  - Node 14.x\n  - Electron 7.x\n  - Electron 8.x\n  - Electron 9.x\n  - Electron 10.x\n- Windows (win32-x64)\n  - Node 10.x\n  - Node 12.x\n  - Node 14.x\n  - Electron 7.x\n  - Electron 8.x\n  - Electron 9.x\n  - Electron 10.x\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e7.2.0 (click here to see which platforms are supported)\u003c/summary\u003e\n\n**As of `ssb-neon-keys@7.2.0-18`**\n\n- macOS (darwin-x64)\n  - Node 10.x\n  - Node 12.x\n  - Node 14.x\n  - Electron 7.x\n  - Electron 8.x\n  - Electron 9.x\n  - Electron 10.x\n- Linux (linux-x64)\n  - Node 10.x\n  - Node 12.x\n  - Node 14.x\n  - Electron 7.x\n  - Electron 8.x\n  - Electron 9.x\n  - Electron 10.x\n- Windows (win32-x64)\n  - Node 10.x\n  - Node 12.x\n  - Node 14.x\n  - Electron 7.x\n  - Electron 8.x\n  - Electron 9.x\n  - Electron 10.x\n\n\u003c/details\u003e\n\n## License\n\nLGPL-3.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstaltz%2Fssb-keys-neon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstaltz%2Fssb-keys-neon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstaltz%2Fssb-keys-neon/lists"}