https://github.com/improvein/ether-node-api
Ethereum Node API. Interacting with Ethereum network thru a REST API or Console.
https://github.com/improvein/ether-node-api
console ethereum ethereum-node nodejs rest-api smart-contracts web3 web3js
Last synced: 9 months ago
JSON representation
Ethereum Node API. Interacting with Ethereum network thru a REST API or Console.
- Host: GitHub
- URL: https://github.com/improvein/ether-node-api
- Owner: improvein
- License: mit
- Archived: true
- Created: 2017-12-29T14:59:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-10T18:43:52.000Z (over 7 years ago)
- Last Synced: 2025-03-27T05:32:17.533Z (about 1 year ago)
- Topics: console, ethereum, ethereum-node, nodejs, rest-api, smart-contracts, web3, web3js
- Language: JavaScript
- Homepage:
- Size: 43.9 KB
- Stars: 9
- Watchers: 3
- Forks: 12
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Ethereum Node API
=================
This module provides an API for an Ethereum node by using [web3](https://github.com/ethereum/web3.js/). It does it in two flavors:
* HTTP RESTful API
* Console commands
Why?
This module is intended as an experiment, proof of concept (or however you want to call it), but it also can be helpful to use if you need HTTP REST API interaction with Ethereum instead of JSON RPC.
Install
-------
Just clone the repo and then install dependencies:
```bash
$ npm install
```
The install process creates a new `config.js` file in the root directory, based on the `config.js.default` file. There you can set up the parameters for running your instance.
### Configuration
(@TODO)
HTTP RESTful API
----------------
In order to start the HTTP API service you just need to run:
```bash
$ npm start
```
or
```bash
$ node api
```
You'll see a message indicating that the service is already running.
### Endpoints
The OpenAPI Specification for the REST API is in the [/docs/rest_api.yaml](/docs/rest_api.yaml) file
Also, this URL has an online UI for that documentation: https://app.swaggerhub.com/apis/improvein/ether-node-api/0.0.2
Console commands
----------------
In order to use the console you need to execute:
```bash
$ node cli [options] [command]
```
This is the list of commands (you can use the `--help` to find more info about each one)
* `status`
See the status of the App and the network/connection
* `balance `
Get the balance of an account
* `account-send `
Send ether (wei) from one account to another address
* `send [options] `
Send (wei) from an address to another
* `transaction `
Gets the transaction information
* `block [options] `
Gets the block information
Contributing
----------------
We encourage everyone to contribute to this project with requests, comments, suggestions and even code improvements.
Everything is welcome, just [report an issue](https://github.com/improvein/ether-node-api/issues) or [add a PR](https://github.com/improvein/ether-node-api/pulls).