Repository
Current version released
4 years ago
Versions
web3-providers-http
This is a HTTP provider sub-package for web3.js.
Please read the documentation for more.
Usage
import http from 'https://deno.land/std/node/http.ts';
import Web3HttpProvider from 'https://deno.land/x/npm_web3_providers_http@0.0.1/mod.js';
const options = {
keepAlive: true,
timeout: 20000,
headers: [
{name: 'Access-Control-Allow-Origin', value: '*'}
,{...}
],
withCredentials: false,
agent: {http: http.Agent(...), baseUrl: ''}
};
const provider = new Web3HttpProvider('http://localhost:8545', options);