Socket
Socket
Sign inDemoInstall

web3-core-method

Package Overview
Dependencies
Maintainers
2
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-core-method - npm Package Compare versions

Comparing version 1.0.0-beta.55 to 1.0.0

src/index.js

45

package.json
{
"name": "web3-core-method",
"namespace": "ethereum",
"version": "1.0.0-beta.55",
"description": "Handles the JSON-RPC methods. This package is also internally used by web3.",
"repository": "https://github.com/ethereum/web3.js/tree/1.0/packages/web3-core-method",
"version": "1.0.0",
"description": "Creates the methods on the web3 modules. This is an internal package.",
"repository": "https://github.com/ethereum/web3.js/tree/1.x/packages/web3-core-method",
"license": "LGPL-3.0",
"main": "dist/web3-core-method.cjs.js",
"module": "dist/web3-core-method.esm.js",
"browser": "dist/web3-core-method.umd.js",
"scripts": {
"build": "rollup -c",
"dev": "rollup -c -w",
"test": "jest",
"test:watch": "jest --watchAll",
"dtslint": "dtslint types --onlyTestTsNext"
"engines": {
"node": ">=8.0.0 <=11.15.0"
},
"types": "types/index.d.ts",
"main": "src/index.js",
"dependencies": {
"@babel/runtime": "^7.3.1",
"eventemitter3": "3.1.0",
"lodash": "^4.17.11",
"rxjs": "^6.4.0",
"web3-core": "1.0.0-beta.55",
"web3-core-helpers": "1.0.0-beta.55",
"web3-core-subscriptions": "1.0.0-beta.55",
"web3-utils": "1.0.0-beta.55"
},
"devDependencies": {
"definitelytyped-header-parser": "^1.0.1",
"dtslint": "0.4.2",
"web3-providers": "1.0.0-beta.55"
},
"files": [
"dist",
"types/index.d.ts"
],
"gitHead": "37347fd46344f45d1c57104920bdda0779f0d51c"
"underscore": "1.9.1",
"web3-core-helpers": "1.0.0",
"web3-core-promievent": "1.0.0",
"web3-core-subscriptions": "1.0.0",
"web3-utils": "1.0.0"
}
}
# web3-core-method
This is a sub module of [web3.js][repo]
This is a sub package of [web3.js][repo]
The Method module abstracts the JSON-RPC method and is used within most [web3.js][repo] modules.
The Method package used within most [web3.js][repo] packages.
Please read the [documentation][docs] for more.
## Installation
### Node.js
```bash

@@ -13,7 +16,35 @@ npm install web3-core-method

## Types
### In the Browser
All the typescript typings are placed in the types folder.
Build running the following in the [web3.js][repo] repository:
```bash
npm run-script build-all
```
Then include `dist/web3-core-method.js` in your html file.
This will expose the `Web3Method` object on the window object.
## Usage
```js
// in node.js
var Web3Method = require('web3-core-method');
var method = new Web3Method({
name: 'sendTransaction',
call: 'eth_sendTransaction',
params: 1,
inputFormatter: [inputTransactionFormatter]
});
method.attachToObject(myCoolLib);
myCoolLib.sendTransaction({...}, function(){ ... });
```
[docs]: http://web3js.readthedocs.io/en/1.0/
[repo]: https://github.com/ethereum/web3.js
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