{"id":21561760,"url":"https://github.com/synonymdev/slashtag-seeding-server","last_synced_at":"2025-07-16T16:31:06.105Z","repository":{"id":62412368,"uuid":"508963399","full_name":"synonymdev/slashtag-seeding-server","owner":"synonymdev","description":null,"archived":true,"fork":false,"pushed_at":"2023-06-08T06:54:56.000Z","size":217,"stargazers_count":3,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-18T13:02:02.773Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/synonymdev.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":"2022-06-30T06:40:41.000Z","updated_at":"2024-06-07T12:20:49.000Z","dependencies_parsed_at":"2024-11-24T12:17:40.677Z","dependency_job_id":null,"html_url":"https://github.com/synonymdev/slashtag-seeding-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/synonymdev/slashtag-seeding-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fslashtag-seeding-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fslashtag-seeding-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fslashtag-seeding-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fslashtag-seeding-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synonymdev","download_url":"https://codeload.github.com/synonymdev/slashtag-seeding-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fslashtag-seeding-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265524626,"owners_count":23782014,"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-24T09:27:54.075Z","updated_at":"2025-07-16T16:31:05.633Z","avatar_url":"https://github.com/synonymdev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# slashtag-seeding-server\n\nSeeds Hypercores\n\nMake HTTP requests to the this server to tell it about new Hypercores to be seeded. It will then track and maintain an in-sync copy of the hypercore.\n\n## Add seeds using Slashtags\n\n```\n// The slashtags (mine one, and the seeding servers)\nconst mySlashtag = 'slash:...my slashtag...'\nconst serverSlashtag = 'slash:...servers slashtag here...'\n\n// A hypercore you want to seed (probably shared on hyperswarm)\nconst core = ... your hypercore that you want to seed ...\n\n// Create the protocol and add the hypercores public key to the seeding list\nconst protocol = new SeedingProtocol(mySlashtag)\nconst response = await protocol.seedAdd(serverSlashtag, core.key.toString('hex'))\n```\n\n## The Web Server\n\nBy default listens on port 3000 (see config)\n\nPOST `/seeding/hypercore` with a json body...\n```\n{\n    \"publicKey\": \"public key of hypercore, hex encoded\"\n}\n```\n\nGET `/seeding/hypercore/:key`\nwhere :key is the hex encoded public key of a hypercore.\nQueries the seeding server for up to date information about a specific hypercore.\nA 200 response will contain the following\n```\n{\n    key: \u003cpublic key\u003e,\n    length: \u003ccurrent length of the hypercore on the seeding server\u003e,\n    contiguousLength: \u003cNumber of blocks contiguously available starting from the first block of this core\u003e,\n    lastUpdated: \u003cwhen the seeding server last saw a change (ms timestamp)\u003e,\n}\n```\n\n## Config\n\n* **http.logger**: true to enable logging on the HTTP server\n* **http.port**: the port for the http server to listen on\n* **store.path**: The path to a folder where the app will store data (for hypercores, key/value store etc)\n* **store.dbName**: A name used to derive the keys for the hyperbee key value store\n* **slashtags.primaryKey**: The key used to derive the servers slashtag\n* **testClient.path**: The path to store data for the test client\n* **testClient.coreName**: The name used to derive the keys for the test hypercore that is created\n\nTo change the config from the defaults found in `config/default.json`, you should create a new file `config/local.json` and override any settings you want to be different from the defaults in there. `local.json` is git ignored.\n\n## Inner workings...\n\nWhen a new hypercore is given to the seeding server (eg via an http request), we create a local copy of the hypercore. We join a topic (the hypercores discovery key) in the hyperswarm to find other peers that are online and download any updates.\n\nFinally we store the new hypercores key in a key/value store (Hyperbee).\n\nDuring startup, all keys in the key/value store are fetched so we can restart the process of monitoring all the hypercores we are responsible for tracking.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynonymdev%2Fslashtag-seeding-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynonymdev%2Fslashtag-seeding-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynonymdev%2Fslashtag-seeding-server/lists"}