telescope icon indicating copy to clipboard operation
telescope copied to clipboard

endpoint providers and fallbacks

Open pyramation opened this issue 2 years ago • 0 comments

The default should be easy, so a junior dev can simple provide an URL and get up and running. However, an array of fallback endpoints could be provided if exists!

interface EndpointWeight {
    url: string;
    weight: number;
}

export const getRpc = async (endpoints: EndpointWeight[]) => {
  //... 
};

example docs:

  • [ ] https://docs.ethers.io/v5/api/providers/provider/
  • [ ] https://docs.ethers.io/v5/api/providers/other/#FallbackProvider

example providers that are services

  • https://blog.cosmos.network/kyve-the-web3-data-lake-solution-turns-to-cosmos-to-launch-scalable-and-streamlined-layer-1-16a2f4794f86
  • https://www.pokt.network/

pyramation avatar Aug 04 '22 06:08 pyramation