conflux-web-core-method
This is a sub package of conflux-web
The Method package used within most conflux-web packages.
Please read the documentation for more.
Installation
Node.js
npm install conflux-web-core-method
In the Browser
Build running the following in the conflux-web repository:
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
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(){ ... });