Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

conflux-web-core-method

Package Overview
Dependencies
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

conflux-web-core-method - npm Package Compare versions

Comparing version 0.1.22-alpha.0 to 1.2.2-alpha.0

src/index.js

44

package.json
{
"name": "conflux-web-core-method",
"version": "0.1.22-alpha.0",
"description": "Handles the JSON-RPC methods. This package is also internally used by ConfluxWeb.",
"repository": "https://github.com/Conflux-Chain/ConfluxWeb/tree/master/packages/conflux-web-core-method",
"version": "1.2.2-alpha.0",
"description": "Creates the methods on the conflux-web modules. This is an internal package.",
"repository": "https://github.com/Conflux-Chain/ConfluxWeb/tree/conflux-web-1.2.1/package/conflux-web-core-method",
"license": "LGPL-3.0",
"main": "dist/conflux-web-core-method.cjs.js",
"module": "dist/conflux-web-core-method.esm.js",
"browser": "dist/conflux-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"
},
"types": "types/index.d.ts",
"main": "src/index.js",
"dependencies": {
"@babel/runtime": "^7.3.1",
"conflux-web-core-subscriptions": "0.1.15-alpha.0",
"eventemitter3": "3.1.0",
"lodash": "^4.17.11",
"rxjs": "^6.4.0"
"conflux-web-core-helpers": "1.2.2-alpha.0",
"conflux-web-core-promievent": "1.2.2-alpha.0",
"conflux-web-core-subscriptions": "1.2.2-alpha.0",
"conflux-web-utils": "1.2.2-alpha.0",
"underscore": "1.9.1"
},
"devDependencies": {
"conflux-web-core": "0.1.22-alpha.0",
"conflux-web-core-helpers": "0.1.15-alpha.0",
"conflux-web-core-subscriptions": "*",
"conflux-web-providers": "0.1.15-alpha.0",
"conflux-web-utils": "0.1.15-alpha.0",
"definitelytyped-header-parser": "^1.0.1",
"dtslint": "0.4.2"
},
"files": [
"dist",
"types/index.d.ts"
],
"gitHead": "cf3d7a75d7e3a6445361ae9690ff23e4c21b216a"
"gitHead": "5867aaed668598b8531a372128e7c0b84d975e99"
}
# conflux-web-core-method
This is a sub package of [ConfluxWeb.js][repo]
This is a sub package of [conflux-web][repo]
The Method module abstracts the JSON-RPC method and is used within most [ConfluxWeb.js][repo] packages.
The Method package used within most [conflux-web][repo] packages.
Please read the [documentation][docs] for more.
## Installation
### Node.js
```bash

@@ -13,6 +16,35 @@ npm install conflux-web-core-method

## Types
### In the Browser
All the typescript typings are placed in the types folder.
Build running the following in the [conflux-web][repo] repository:
[repo]: https://github.com/Conflux-Chain/ConfluxWeb
```bash
npm run-script build-all
```
Then include `dist/conflux-web-core-method.js` in your html file.
This will expose the `ConfluxWebMethod` object on the window object.
## Usage
```js
// in node.js
var ConfluxWebMethod = require('conflux-web-core-method');
var method = new ConfluxWebMethod({
name: 'sendTransaction',
call: 'cfx_sendTransaction',
params: 1,
inputFormatter: [inputTransactionFormatter]
});
method.attachToObject(myCoolLib);
myCoolLib.sendTransaction({...}, function(){ ... });
```
[docs]: https://phabricator.conflux-chain.org/w/javascript_api/
[repo]: https://github.com/Conflux-Chain/ConfluxWeb/tree/conflux-web-1.2.1
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