# @steemit/koa-jsonrpc

> Spec compliant JSON-RPC 2.0 server middleware for Koa

Latest version **1.1.2** (published 2018-02-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @steemit/koa-jsonrpc
pnpm add @steemit/koa-jsonrpc
yarn add @steemit/koa-jsonrpc
bun add @steemit/koa-jsonrpc
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2018-02-01 |
| First published | 2017-12-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | justinwsteemitadmin, steemitinc |

## Links

- npm: https://www.npmjs.com/package/@steemit/koa-jsonrpc
- npm.io page: https://npm.io/package/@steemit/koa-jsonrpc

## Dependencies (4)

- [uuid](https://npm.io/package/uuid.md) ^3.2.1
- [dsteem](https://npm.io/package/dsteem.md) ^0.8.6
- [verror](https://npm.io/package/verror.md) ^1.10.0
- [@steemit/rpc-auth](https://npm.io/package/@steemit/rpc-auth.md) ^1.1.1

## Recent versions

- 1.1.2 (latest) — 2018-02-01
- 1.1.1 — 2018-01-25
- 1.1.0 — 2017-12-28
- 1.0.0 — 2017-12-11

## README

@steemit/koa-jsonrpc
====================

*Build status: [![CircleCI](https://circleci.com/gh/steemit/koa-jsonrpc.svg?style=svg)](https://circleci.com/gh/steemit/koa-jsonrpc)*

Spec compliant JSON RPC Server middleware for Koa


```javascript
const Koa = require('koa')
const {JsonRpc} = require('@steemit/koa-jsonrpc')

const rpc = new JsonRpc()
rpc.register('my_method', async (foo, bar) => {
    return foo + bar
})

const app = new Koa()
app.use(rpc.middleware)
app.listen(8080)

```

```
$ curl -X POST -d '{"id":1,"jsonrpc":"2.0","method":"my_method","params":["honkey","tonk"]}' localhost:8080
{"jsonrpc":"2.0","id":1,"result":"honkeytonk"}
```

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