GithubHelp home page GithubHelp logo

polymoonfarm / ether-node-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from improvein/ether-node-api

0.0 0.0 0.0 45 KB

Ethereum Node API. Interacting with Ethereum network thru a REST API or Console.

License: MIT License

JavaScript 100.00%

ether-node-api's Introduction

Ethereum Node API

This module provides an API for an Ethereum node by using web3. 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:

$ 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:

$ npm start

or

$ 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 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:

$ 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 <account>

    Get the balance of an account

  • account-send <from> <to> <wei>

    Send ether (wei) from one account to another address

  • send [options] <from> <fromKey> <to> <wei>

    Send (wei) from an address to another

  • transaction <txhash>

    Gets the transaction information

  • block [options] <blockid>

    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 or add a PR.

ether-node-api's People

Contributors

diegogurpegui avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.