# parity-rpcs

> A machine-readable list of the Parity JSON RPCs.

Latest version **0.1.0** (published 2017-02-24) · GPL-3.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install parity-rpcs
pnpm add parity-rpcs
yarn add parity-rpcs
bun add parity-rpcs
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2017-02-24 |
| First published | 2017-02-24 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jannis R |
| Maintainers | derhuerst |
| Keywords | ethereum, parity, parity.js, jsonrpc |

## Links

- npm: https://www.npmjs.com/package/parity-rpcs
- Repository: https://github.com/derhuerst/parity-rpcs
- Issues: https://github.com/derhuerst/parity-rpcs/issues
- npm.io page: https://npm.io/package/parity-rpcs

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.1.0 (latest) — 2017-02-24

## README

# [Parity](https://ethcore.io/parity.html) JSON RPCs

**A machine-readable list of the [Parity](https://ethcore.io) [JSON RPCs](https://github.com/ethcore/parity/wiki/JSONRPC).**

[![npm version](https://img.shields.io/npm/v/parity-client.svg)](https://www.npmjs.com/package/parity-client)
[![build status](https://img.shields.io/travis/derhuerst/parity-client.svg)](https://travis-ci.org/derhuerst/parity-client)
![GPL-licensed](https://img.shields.io/github/license/derhuerst/parity-client.svg)
[![chat on gitter](https://badges.gitter.im/derhuerst.svg)](https://gitter.im/derhuerst)

This module contains the definitions of most RPCs, in the most minimal required for making calls. I took them [from the Parity source code](https://github.com/ethcore/parity/tree/72998d3ce333dcbdd4848a3a6e56e2b7d9db30d7/js/src/jsonrpc/interfaces). **This module is intended to be used by libraries like [`parity-client`](https://github.com/derhuerst/parity-client).** Things still missing:

- some of the `parity` RPCs, all of `personal` and `signer`
- an automated setup to generate this module, as having the definitions twice is dangerous

## Installation

```shell
npm install --save parity-rpcs@derhuerst/parity-rpcs
```

## Types

type | JavaScript values/example
-----|--------------------------
`'boolean'` | `true`/`false`
`'number'` | `0`/`-100.32`
`'string'` | `'foo bar baz'`
`'data'` | [`Buffer`](https://nodejs.org/api/buffer.html)
`['array', 'boolean']` | `[true, false]`
`['object', {foo: 'boolean'}]` | `{foo: true}`
`'address'` | `'0x5340e74cda65bc0de4d45908fc288cf99fdb2f9a'`
`'hash'` | `'0xc5f02e4fc4d9c5885cca4e652937ff4701b23fa10d25b42b327c111c0ef88e37'`
`'blockNr'` | `123456`/`'latest'`/`'earliest'`/`'pending'`
`'work'` | *todo*
`'syncing'` | *todo*
`'accountsInfo'` | *todo*

## Usage

```js
const eth = require('parity-rpcs/eth')
// or
const {eth, personal} = require('parity-rpcs')

console.log(eth.getBlockByNumber)
```

```js
{
	name: 'eth_getBlockByNumber',
	params: [
		{format: 'blockNr'},
		{format: 'boolean'}
	],
	returns: [
		'object',
		{
			number: 'number',
			hash: 'hash',
			parentHash: 'hash',
			nonce: 'data',
			sha3Uncles: 'data',
			logsBloom: 'data',
			transactionsRoot: 'data',
			stateRoot: 'data',
			receiptRoot: 'data',
			miner: 'address',
			difficulty: 'number',
			totalDifficulty: 'number',
			extraData: 'data',
			size: 'number',
			gasLimit: 'number',
			gasUsed: 'number',
			timestamp: 'number',
			transactions: ['array', 'data'],
			uncles: ['array', 'hash']
		}
	]
}
```


## Contributing

If you **have a question**, **found a bug** or want to **propose a feature**, go to [the issues page](https://github.com/derhuerst/parity-rpcs/issues).

---
_Source: https://npm.io/package/parity-rpcs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
