0.0.6 • Published 3 years ago

simple-web3-provider v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

simple-web3-provider

This library creates a web3 provider that delegates sending all signing methods to the given provider (if it is available) and all other methods to the provided endpoint

Installation

npm install ky # a peer dependency
npm install simple-web3-provider

Getting Started

import Web3 from 'web3';
import { Provider } from 'simple-web3-provider';

const web3 = new Web3(new Provider(url, options));

API

Provider Constructor

new Provider(url: string, options?: Options)
  • url: An RPC Endpoint to send requests to
  • options: An Options object

Options

interface Options {
  maxRetries?: number;
  timeout?: number;
}
  • maxRetries: Number of retries for failed requests, defaults to 10
  • timeout: Timeout in milliseconds for getting a response, defaults to 30000

License

MIT License, see the included LICENSE file.

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago