{"id":21561748,"url":"https://github.com/synonymdev/slashtags-widget-bitcoin-feed","last_synced_at":"2025-07-16T16:31:04.702Z","repository":{"id":104962248,"uuid":"554173833","full_name":"synonymdev/slashtags-widget-bitcoin-feed","owner":"synonymdev","description":null,"archived":true,"fork":false,"pushed_at":"2024-05-16T11:48:01.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-18T13:02:03.097Z","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-10-19T11:24:53.000Z","updated_at":"2024-06-04T08:42:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"b1807c16-45a3-4449-9ca4-bcfd73bb01a2","html_url":"https://github.com/synonymdev/slashtags-widget-bitcoin-feed","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/synonymdev/slashtags-widget-bitcoin-feed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fslashtags-widget-bitcoin-feed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fslashtags-widget-bitcoin-feed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fslashtags-widget-bitcoin-feed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fslashtags-widget-bitcoin-feed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synonymdev","download_url":"https://codeload.github.com/synonymdev/slashtags-widget-bitcoin-feed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fslashtags-widget-bitcoin-feed/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265524624,"owners_count":23782013,"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:52.761Z","updated_at":"2025-07-16T16:31:03.719Z","avatar_url":"https://github.com/synonymdev.png","language":"JavaScript","readme":"# slashtags-widget-bitcoin-feed\n\nPopulates the data for the Bitcoin stats widget.\n\n## Usage\n\n### Feed\n\nCopy `config/config.example.json` to `config/config.json` then edit the relay address.\n\n```bash\ncp config/config.example.json config/config.json\n```\n\nStart the feed writer\n\n```bash\nnpm start\n```\n\nIt will generate a `keyPair` and persist that in `config/config.json` for future sessions.\n\nIt should print: `Running Bitcoin price feed: slashfeed:\u003cid\u003e/Bitcoin Price?relay=\u003crelay-address\u003e`\n\n### Reader\n\nTo read The price feed use the `Reader` helper class.\n\n```js\nconst { Feed, Reader } = require('slashtags-widget-price-feed');\n\n(async () =\u003e {\n  const client = new Client({ storage: './path/to/feed/storage', relay: 'https://web-relay.example.com' })\n  const feed = new Feed(client, config, { icon })\n\n  await feed.ready() \n\n  const client = new Client({ storage: './path/to/reader/storage'})\n\n  const readerClient = new Client({ storage: tmpdir() })\n  const reader = new Reader(readerClient, feed.url)\n\n  const unsubscribe = reader.subscribeBlockInfo(latestBlock =\u003e {\n    // latestBlock:\n    // {\n    //     height: \u003cblock height\u003e,\n    //     timestamp: \u003ctimestamp of last block\u003e,\n    //     transactionCount: \u003ctx count\u003e,\n    //     size: \u003csize of block\u003e,\n    //     weight: \u003cweight of block\u003e,\n    //     difficulty: \u003cdifficulty\u003e,\n    //     hash: \u003cblocks hash\u003e,\n    //     merkleRoot: \u003cblocks merkle root\u003e\n    // }\n  })\n\n  // Either call unsubscribe or close reader to close subscriptions\n  unsubscribe()\n  reader.close()\n})\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynonymdev%2Fslashtags-widget-bitcoin-feed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynonymdev%2Fslashtags-widget-bitcoin-feed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynonymdev%2Fslashtags-widget-bitcoin-feed/lists"}