0.1.0 • Published 6 years ago
tweb3-core-method v0.1.0
tweb3-core-method
This is a sub package of tweb3.js
The Method package used within most tweb3.js packages. Please read the documentation for more.
Installation
Node.js
npm install tweb3-core-method
In the Browser
Build running the following in the tweb3.js repository:
npm run-script build-all
Then include dist/tweb3-core-method.js
in your html file.
This will expose the Web3Method
object on the window object.
Usage
// in node.js
var Web3Method = require('tweb3-core-method');
var method = new Web3Method({
name: 'sendTransaction',
call: 'mit_sendTransaction',
params: 1,
inputFormatter: [inputTransactionFormatter]
});
method.attachToObject(myCoolLib);
myCoolLib.sendTransaction({...}, function(){ ... });
0.1.0
6 years ago