2018-05-27 22:03:25 -07:00
**Nim-eth-rpc**
2018-03-22 17:26:33 +00:00
2018-04-26 19:52:55 +01:00
[")](https://travis-ci.org/status-im/nim-eth-rpc)
[")](https://ci.appveyor.com/project/jarradh/nim-eth-rpc)
2018-03-22 17:26:33 +00:00
Nim-eth-rpc is designed to provide remote procedure calls to the Nimbus Ethereum research project.
2018-05-27 22:03:25 -07:00
# Installation
2018-03-22 17:26:33 +00:00
2018-05-27 22:03:25 -07:00
`git clone https://github.com/status-im/nim-eth-rpc`
## Requirements
2018-03-22 17:26:33 +00:00
* Nim 17.3 and up
2018-05-27 22:03:25 -07:00
# Usage
2018-03-22 17:26:33 +00:00
2018-05-27 22:03:25 -07:00
## Server
2018-03-22 17:26:33 +00:00
```nim
import rpcserver, asyncdispatch
when isMainModule:
var srv = newRpcServer("")
asyncCheck srv.serve()
runForever()
```
2018-05-27 22:03:25 -07:00
## Client
2018-03-22 17:26:33 +00:00
```nim
import rpcclient, asyncdispatch, json
proc main {.async.} =
var client = newRpcClient()
await client.connect("localhost", Port(8545))
let response = waitFor client.web3_clientVersion(newJNull())
echo response.result.pretty
waitFor main()
```
2018-05-27 22:03:25 -07:00
# Contributing
2018-03-22 17:26:33 +00:00
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
2018-05-27 22:03:25 -07:00
# License
[MIT ](https://choosealicense.com/licenses/mit/ )