{"id":19866564,"url":"https://github.com/whats-good/nexus","last_synced_at":"2025-05-02T06:30:36.397Z","repository":{"id":205983518,"uuid":"715561444","full_name":"whats-good/nexus","owner":"whats-good","description":"A load balancing blockchain RPC reverse proxy written in TypeScript.","archived":false,"fork":false,"pushed_at":"2024-08-05T13:07:49.000Z","size":1190,"stargazers_count":17,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-06T23:13:26.898Z","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/whats-good.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-07T11:49:30.000Z","updated_at":"2024-11-02T21:06:43.000Z","dependencies_parsed_at":"2024-06-24T16:44:38.460Z","dependency_job_id":"ffdcaf0d-46be-486a-a548-03ffc93ac2b7","html_url":"https://github.com/whats-good/nexus","commit_stats":null,"previous_names":["whats-good/nexus"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whats-good%2Fnexus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whats-good%2Fnexus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whats-good%2Fnexus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whats-good%2Fnexus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whats-good","download_url":"https://codeload.github.com/whats-good/nexus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251998040,"owners_count":21677913,"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-12T15:26:23.547Z","updated_at":"2025-05-02T06:30:35.994Z","avatar_url":"https://github.com/whats-good.png","language":"TypeScript","funding_links":[],"categories":["Infrastructure"],"sub_categories":["Load Balancers"],"readme":"\u003cdiv align=\"center\"\u003e\n\n![hero banner with nexus dog](./docs/images/nexus-hero-banner.svg)\n\n\u003cdiv\u003e\n\n![npm version](https://img.shields.io/npm/v/@whatsgood/nexus)\n![npm downloads](https://img.shields.io/npm/dm/@whatsgood/nexus)\n\u003ca href=\"https://nexus.whatsgood.dog/\" target=\"_blank\"\u003e\u003cimg alt=\"Documentation\" src=\"https://img.shields.io/badge/documentation-yes-brightgreen.svg\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/whats-good/nexus/graphs/commit-activity\" target=\"_blank\"\u003e\u003cimg alt=\"Maintenance\" src=\"https://img.shields.io/badge/maintained%3F-yes-green.svg\" /\u003e\u003c/a\u003e\n\u003ca href=\"#\" target=\"_blank\"\u003e\u003cimg alt=\"license: MIT\" src=\"https://img.shields.io/badge/license-MIT-yellow.svg\" /\u003e\u003c/a\u003e\n\n\u003c/div\u003e\n\n\u003cdiv\u003e\n\n![Discord](https://img.shields.io/discord/1003351311904948334?label=\u0026logo=discord\u0026logoColor=ffffff\u0026color=7389D8\u0026labelColor=6A7EC2)\n![GitHub Actions Status](https://github.com/whats-good/nexus/actions/workflows/main-ci.yml/badge.svg)\n![Docker Image Size (tag)](https://img.shields.io/docker/image-size/whatsgood/nexus/latest?logo=docker\u0026label=Docker)\n\n  \u003c!-- ![GitHub stars](https://img.shields.io/github/stars/whats-good/nexus?style=social\u0026label=Star) --\u003e\n\n\u003c/div\u003e\n\n\u003c/div\u003e\n\n## Introduction\n\nWelcome to `Nexus` - a load balancing blockchain RPC reverse proxy written in TypeScript.\n\n## Documentation\n\nCheck out our [documentation](https://nexus.whatsgood.dog) for detailed instructions.\n\n## Installation\n\n```sh\n# npm\nnpm install @whatsgood/nexus\n\n# pnpm\npnpm install @whatsgood/nexus\n\n# yarn\nyarn add @whatsgood/nexus\n\n```\n\n## Quickstart\n\n```typescript\n// node.js standalone server example\n\nimport { Nexus, NodeProvider, CHAIN } from \"@whatsgood/nexus\";\nimport { createServer } from \"node:http\";\n\nconst llamaRpcNodeProvider = new NodeProvider({\n  name: \"llama-rpc\",\n  chain: CHAIN.ETHEREUM_MAINNET,\n  url: \"https://eth.llamarpc.com\",\n});\n\nconst tenderlyNodeProvider = new NodeProvider({\n  name: \"tenderly\",\n  chain: CHAIN.ETHEREUM_MAINNET,\n  url: \"https://gateway.tenderly.co/public/mainnet\",\n});\n\nconst nexus = Nexus.create({\n  nodeProviders: [llamaRpcNodeProvider, tenderlyNodeProvider],\n  port: 4000,\n});\n\ncreateServer(nexus).listen(nexus.port, () =\u003e {\n  console.log(`🚀 Server ready at http://localhost:${nexus.port}`);\n});\n```\n\n## Interaction\n\nIn this example, since we have configured the server to connect to `Ethereum Mainnet`, we supply the chain id = `1` as the endpoint.\n\n```bash\ncurl \\\n    -X POST http://localhost:4000/1 \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\"jsonrpc\":\"2.0\",\"method\":\"eth_blockNumber\",\"params\":[],\"id\":1}'\n\n```\n\n\u003c!-- TODO: remove the nexus/README.md from version control, and only generate it pre npm publish --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhats-good%2Fnexus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhats-good%2Fnexus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhats-good%2Fnexus/lists"}