pec-core-method
v1.0.5
Published
Creates the methods on the web3 modules. This is an internal package.
Downloads
15
Readme
pec-core-method
[![NPM Package][npm-image]][npm-url] [![Dependency Status][deps-image]][deps-url] [![Dev Dependency Status][deps-dev-image]][deps-dev-url]
This is a sub-package of [pec.js][repo].
This method package is used within most [pec.js][repo] packages.
Please read the [documentation][docs] for more.
Installation
Node.js
npm install pec-core-method
Usage
const Web3Method = require('pec-core-method');
const method = new Web3Method({
name: 'sendTransaction',
call: 'pec_sendTransaction',
params: 1,
inputFormatter: [inputTransactionFormatter]
});
method.attachToObject(myCoolLib);
myCoolLib.sendTransaction({...}, function(){ ... });
Types
All the TypeScript typings are placed in the types
folder.