{"id":19291809,"url":"https://github.com/hirosystems/rx","last_synced_at":"2025-04-22T06:31:47.439Z","repository":{"id":52198864,"uuid":"363937572","full_name":"hirosystems/rx","owner":"hirosystems","description":"Reactive Extensions client for the Stacks Blockchain","archived":false,"fork":false,"pushed_at":"2021-10-12T20:29:37.000Z","size":2134,"stargazers_count":8,"open_issues_count":2,"forks_count":2,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-04-15T21:43:54.844Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/hirosystems.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}},"created_at":"2021-05-03T13:24:12.000Z","updated_at":"2021-11-29T02:49:56.000Z","dependencies_parsed_at":"2022-09-06T06:40:13.947Z","dependency_job_id":null,"html_url":"https://github.com/hirosystems/rx","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/hirosystems%2Frx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Frx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Frx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Frx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hirosystems","download_url":"https://codeload.github.com/hirosystems/rx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250183245,"owners_count":21388682,"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-09T22:27:59.507Z","updated_at":"2025-04-22T06:31:47.128Z","avatar_url":"https://github.com/hirosystems.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @stacks/rx\n\n[![Build and test status](https://github.com/metachris/typescript-boilerplate/workflows/Lint%20and%20test/badge.svg)](https://github.com/metachris/micropython-ctl/actions?query=workflow%3A%22Build+and+test%22)\n\nReactive Extensions client for the Stacks Blockchain 🚀\n\n## Getting Started\n\n```bash\nyarn add @stacks/rx rxjs\n```\n\n```ts\nimport { RxStacks, HIRO_API_URL } from '@stacks/rx';\n\nconst client = new RxStacks({ url: HIRO_API_URL });\n\nclient.blocks$.subscribe(block =\u003e console.log('New block: ', block.height));\n```\n\n## Demo App\n\n```bash\ngit clone https://github.com/blockstack/rx\ncd demo/demo-app\nyarn \u0026\u0026 yarn start\n```\n\nOpen [http://localhost:3000](http://localhost:3000) to view it in your browser.\n\n## Tutorial\n\n### Broadcasting a transaction\n\n## Tutorial\n\n### Using @stacks/rx to follow a transaction's lifecycle\n\n```ts\n\nfrom(broadcastTransaction(transaction)).pipe(\n\n  tap(tx =\u003e notifyBroadcastSuccess(tx)),\n  \n  concatMap(txid =\u003e mempoolTxs$.pipe(filterByTxid(txid))),\n\n  tap(mempoolTx =\u003e notifyTxInMempool(mempoolTx)),\n\n  concatMap(memTx =\u003e txs$.pipe(filterByTxid(txid))),\n)\n.subscribe(tx =\u003e notifyTransactionConfirm());\n```\n\n\n## Resources\n\n- [RxJS documentation](https://rxjs-dev.firebaseapp.com/guide/overview)\n- [RxJS 7 Live Asia 2021 talk by @benlesh](https://docs.google.com/presentation/d/1-LU7YE3NWw8jHeAgdmLu4CBfG7osCx6MsSIeFs16k60/edit#slide=id.gd5a1fd8e28_0_415)\n- [RxJS marble diagrams](https://rxmarbles.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirosystems%2Frx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhirosystems%2Frx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirosystems%2Frx/lists"}