Socket
Socket
Sign inDemoInstall

github.com/PanGan21/ethereum-api

Package Overview
Dependencies
5
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/PanGan21/ethereum-api


Version published

Readme

Source

ethereum-api

Ethereum api using go lang

Run it

go run main.go
or if you want to run it with ganache use
docker-compose up --build

Api endpoints

  • Fetch the latest block: http://localhost:8080/api/eth/latest-block
  • Send some ethers using Curl: curl -d '{"privKey":"<private-key>", "to":"<account-to-send>", "amount":<amount>}' -H "Content-Type: application/json" -X POST http://localhost:8080/api/eth/send-eth
  • Get the transaction information: http://localhost:8080/api/eth/get-tx?hash=<tx-hash-from-response>
  • Check your balance: http://localhost:8080/api/eth/get-balance?address=<the-recipient-address>

FAQs

Last updated on 31 Jan 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc