Files
api/packages/type-jsonrpc
Jaco Greeff 54eada5d87 Allow handling of RPC errors, promise resolve/reject (#572)
* Allow handling of RPC errors, promise resolve/reject

* Revert doing too much, focus on api-promise only

* tap instead of map

* Bump version, CHANGELOG
2019-01-11 16:46:01 +01:00
..
2019-01-08 13:39:38 +01:00
2018-11-21 13:37:27 +01:00

@polkadot/jsonrpc

A definition of all the methods exposed in a general Polkadot client application. These are used not only to provide a comprehensive code-generated document of the available methods, but are also used in the API to auto-generate endpoints with the required type-checking.

For a list of currently exposed methods, see the method documentation.

Usage

Installation -

yarn add @polkadot/jsonrpc

Adding methods

As methods are added, simply adding the name, inputs & output will prepare it for use.

  • Add the method to the correct file in src/rpc/ (Input/Output types as cross-referenced from the canonical implementation and match one-to-one)
  • Should a new type be required, add it to the type list, src/types.js (Required for TSLint type checking)