susyweb-core-method
v1.0.0-beta.35
Published
Creates the methods on the susyweb modules. This is an internal package.
Downloads
9
Readme
susyweb-core-method
This is a sub package of susyweb.js
The Method package used within most susyweb.js packages. Please read the documentation for more.
Installation
Node.js
npm install susyweb-core-method
In the Browser
Build running the following in the susyweb.js repository:
npm run-script build-all
Then include dist/susyweb-core-method.js
in your html file.
This will expose the SusyWebMethod
object on the window object.
Usage
// in node.js
var SusyWebMethod = require('susyweb-core-method');
var method = new SusyWebMethod({
name: 'sendTransaction',
call: 'sof_sendTransaction',
params: 1,
inputFormatter: [inputTransactionFormatter]
});
method.attachToObject(myCoolLib);
myCoolLib.sendTransaction({...}, function(){ ... });