Skip to content

The mainnet RPC endpoint hardcodes a third-party provider #11

Description

@Abioladory123

Summary

NETWORKS.mainnet points at a specific commercial RPC provider's URL. Anyone
calling getNetwork("mainnet") silently routes their traffic through that
provider, with whatever rate limits and availability it happens to have, and
without having chosen it.

networkFromEnv already exists as the override, so the fix is mostly about not
making the surprising choice the default.

Acceptance criteria

  • The mainnet default either requires an explicit RPC URL or documents the
    provider prominently at the point of use.
  • The README states that mainnet traffic should use an endpoint the consumer
    controls.
  • Testnet and local behaviour are unchanged.

Getting started

Fork this repository, clone your fork, and add this repo as upstream:

git clone https://github.com/<your-username>/novatip-sdk.git
cd novatip-sdk
git remote add upstream https://github.com/Novatip/novatip-sdk.git
npm install

Create a branch for this issue:

git checkout -b fix/mainnet-rpc-default

Suggested commit message:

fix: reconsider the hardcoded mainnet RPC

Run npm run lint, npm run typecheck, and npm run build before pushing, then open a pull request from your fork against main and link this issue. See the contributing guide for the full workflow.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions