1.0.0-beta.35 • Published 5 years ago

susyweb-core-method v1.0.0-beta.35

Weekly downloads
1
License
LGPL-3.0
Repository
-
Last release
5 years ago

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(){ ... });