Welcome to Nexus
- a simple TypeScript proxy server for any Ethereum JSON RPC compliant blockchain. Instead of connecting your dApps to a blockchain node, you can connect them to Nexus
and Nexus
serves the requests for you. Nexus
is open source and free to use.
Check out our documentation for detailed instructions.
# npm
npm install @whatsgood/nexus
# pnpm
pnpm install @whatsgood/nexus
# yarn
yarn add @whatsgood/nexus
// Cloudflare worker example
import { Nexus } from "@whatsgood/nexus";
type Env = Record<string, string>;
const nexus = Nexus.create<Env>({
providers: (ctx) => [
{
name: "alchemy",
key: ctx.ALCHEMY_KEY,
},
{
name: "infura",
key: ctx.INFURA_KEY,
},
{
name: "ankr",
key: ctx.ANKR_KEY,
},
],
globalAccessKey: (ctx) => ctx.NEXUS_GLOBAL_ACCESS_KEY,
chains: [1],
});
export default {
fetch: nexus.fetch,
};