@whatsgood/nexus

0.12.0 • Public • Published

hero banner with nexus dog

npm version npm downloads Documentation Maintenance license: MIT

Discord GitHub Actions Status

Introduction

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.

Documentation

Check out our documentation for detailed instructions.

Installation

# npm
npm install @whatsgood/nexus

# pnpm
pnpm install @whatsgood/nexus

# yarn
yarn add @whatsgood/nexus

Quickstart

// 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,
};

Package Sidebar

Install

npm i @whatsgood/nexus

Weekly Downloads

194

Version

0.12.0

License

MIT

Unpacked Size

1.17 MB

Total Files

92

Last publish

Collaborators

  • mechanical-turk