@polymarket/multi-endpoint-provider
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

@polymarket/multi-endpoint-provider

ethers.js JsonRpcProvider and Web3Provider that try backup rpc endpoints when requests fail.

This package is expects ethers.js as a peer dependency so that different versions of ethers don't conflict.

import { JsonRpcMultiProvider } from "@polymarket/multi-endpoint-provider";

const provider = new JsonRpcMultiProvider([
    "https://polygon-mainnet.infura.io/v3/<infura_key>",
    "https://rpc-mainnet.maticvigil.com/v1/<matic_vigil_key>",
], {
  network: 137,
}

Readme

Keywords

Package Sidebar

Install

npm i @polymarket/multi-endpoint-provider

Weekly Downloads

332

Version

0.1.5

License

MIT

Unpacked Size

36 kB

Total Files

23

Last publish

Collaborators

  • poly-rodr
  • esinger93457
  • jonamen
  • l-kov
  • sherrbss
  • mttwlkr
  • mshrieve
  • niraek
  • chloe-tan
  • schestakov
  • nickbytes
  • javamonnnn
  • legate