Socket
Socket
Sign inDemoInstall

web3-providers-http

Package Overview
Dependencies
Maintainers
2
Versions
428
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-providers-http - npm Package Compare versions

Comparing version 1.2.9 to 1.2.10-rc.0

10

package.json
{
"name": "web3-providers-http",
"version": "1.2.9",
"version": "1.2.10-rc.0",
"description": "Module to handle web3 RPC connections over HTTP.",

@@ -11,3 +11,3 @@ "repository": "https://github.com/ethereum/web3.js/tree/1.x/packages/web3-providers-http",

"scripts": {
"dtslint": "dtslint --localTs node_modules/typescript/lib types"
"dtslint": "dtslint --localTs ../../node_modules/typescript/lib types"
},

@@ -17,3 +17,3 @@ "types": "types/index.d.ts",

"dependencies": {
"web3-core-helpers": "1.2.9",
"web3-core-helpers": "1.2.10-rc.0",
"xhr2-cookies": "1.1.0"

@@ -23,5 +23,5 @@ },

"dtslint": "^3.4.1",
"typescript": "latest"
"typescript": "^3.9.5"
},
"gitHead": "0e7ee3325437f73f4bace6c2df06aefafd72c716"
"gitHead": "ef81e78b2eed69dd386e0d2cb9bd22d8af998c34"
}

@@ -5,6 +5,4 @@ # web3-providers-http

This is a sub-package of [web3.js][repo].
This is a HTTP provider sub-package for [web3.js][repo].
This is a HTTP provider for [web3.js][repo].
Please read the [documentation][docs] for more.

@@ -20,21 +18,9 @@

### In the Browser
Build running the following in the [web3.js][repo] repository:
```bash
npm run-script build-all
```
Then include `dist/web3-providers-http.js` in your html file.
This will expose the `Web3HttpProvider` object on the window object.
## Usage
```js
// in node.js
var http = require('http');
var Web3HttpProvider = require('web3-providers-http');
const http = require('http');
const Web3HttpProvider = require('web3-providers-http');
var options = {
const options = {
keepAlive: true,

@@ -47,3 +33,3 @@ timeout: 20000, // milliseconds,

var provider = new Web3HttpProvider('http://localhost:8545', options);
const provider = new Web3HttpProvider('http://localhost:8545', options);
```

@@ -50,0 +36,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc