Skip to content

charonne/ethapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

Title: EthApi
Author: Charonne
Date: 2016-12-29
Copyright: Copyright © 2013-2016 Charonne.
Version: 0.1.0

Instroduction

Ethapi is a rest Api server used to communicate with an Ethereum node. It allow to store, deploy and execute Ethereum Smart contracts.

Installation

Install packages

To install, go in the project folder and execute ``` npm install ```

Config

Copy the config/config-sample.js to config/config.js

Launch

To launch the api, execute ``` pm2 start app.js --name="ethapi" ```

To delete the api process, execute

pm2 delete ethapi

Usage

Create a contract

Create a new contract

contracts/create

params: { "source": "<contract_source>"} method: POST

Deploy a contract

Deploy a contract

contracts/deploy

params: { "contract_id": "<contract_id>", "params": []} method: POST

Execute a contract

Execute a contract

contracts/exec

params: { "contract_address": "<contract_address>", "params": {}} method: POST


Get all contracts

contracts/

method: GET



Get contract info

contracts/:contractId

method: GET


Releases

No releases published

Packages

No packages published

Languages