31 lines
2.1 KiB
Markdown
31 lines
2.1 KiB
Markdown
[](https://polkadot.js.org)
|
|

|
|
[](https://github.com/Flet/semistandard)
|
|
[](https://www.npmjs.com/package/@polkadot/api-jsonrpc)
|
|
[](https://travis-ci.org/polkadot-js/api)
|
|
[](https://codeclimate.com/github/polkadot-js/api/maintainability)
|
|
[](https://coveralls.io/github/polkadot-js/api?branch=master)
|
|
[](https://david-dm.org/polkadot-js/api?path=packages/api-jsonrpc)
|
|
[](https://david-dm.org/polkadot-js/api?path=packages/api-jsonrpc#info=devDependencies)
|
|
|
|
# @polkadot/api-jsonrpc
|
|
|
|
A defintion 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](docs/README.md).
|
|
|
|
## Usage
|
|
|
|
Installation -
|
|
|
|
```
|
|
npm install --save @polkadot/api-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/](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](src/types.js) (Required for flow type checking)
|