Giter VIP home page Giter VIP logo

ethereum-api's Introduction

Express & ES6 REST API Boilerplate

This is a straightforward boilerplate for building REST APIs with ES6 and Express.

Tip: If you are using Mongoose, you can automatically expose your Models as REST resources using restful-mongoose.

Getting Started

# clone it
git clone [email protected]:developit/express-es6-rest-api.git
cd express-es6-rest-api

# Make it your own
rm -rf .git && git init && npm init

# Install dependencies
npm install

# Start development live-reload server
PORT=8080 npm run dev

# Start production server:
PORT=8080 npm start

Docker Support

cd express-es6-rest-api

# Build your docker
docker build -t es6/api-service .
#            ^      ^           ^
#          tag  tag name      Dockerfile location

# run your docker
docker run -p 8080:8080 es6/api-service
#                 ^            ^
#          bind the port    container tag
#          to your host
#          machine port   

ethereum api

1 cd express-es6-rest-api
2- rm -rf .git && git init && npm init
3- npm install
4- PORT=8080 npm run dev

use postman to test these api
create bip39 wallet for ethereum 
http://localhost:8080/createWallet/44'/60/0

case: create ether wallet on rinkeby network
method: post
endpoint: http://localhost:8080/createWallet
body: {
}
response:{
	"mnemonic":"",
	"address":"",
	"privatekey":""
}

case: get balance from rinkeby network
method: get
endpoint: http://localhost:8080/getBalance/0x00ac8fbedd57107adbbb8a23d56cbf791bf0093e
body: {
}
response:{
	"balance":""
}

case: transfer etherum on rinkeby network
method: post
endpoint: http://localhost:8080/transaction
body: {
	"privatekey":"0x00***pk***", 
	"destination":"0x00ac8fbedd57107adbbb8a23d56cbf791bf0093e", 
	"amount":"0.02",
	"send":true//true or false
}
response:{
	"gasPrices":"",
	"transactionId":"",
	"transactionUrl":""
}

License MIT

ethereum-api's People

Contributors

dependabot[bot] avatar xjjda22 avatar

Watchers

 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.