Title: | EthApi |
Author: | Charonne |
Date: | 2016-12-29 |
Copyright: | Copyright © 2013-2016 Charonne. |
Version: | 0.1.0 |
Ethapi is a rest Api server used to communicate with an Ethereum node. It allow to store, deploy and execute Ethereum Smart contracts.
To install, go in the project folder and execute ``` npm install ``` Copy the config/config-sample.js to config/config.js To launch the api, execute ``` pm2 start app.js --name="ethapi" ```To delete the api process, execute
pm2 delete ethapi
Create a new contract
contracts/create
params: { "source": "<contract_source>"} method: POST
Deploy a contract
contracts/deploy
params: { "contract_id": "<contract_id>", "params": []} method: POST
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