Huge news!Announcing our $20M Series A led by Andreessen Horowitz.Learn more
Socket
Socket
Log inDemoInstall

github.com/PanGan21/ethereum-api

Package Overview
Dependencies
5
Maintainers
0
Issues
File Explorer

github.com/PanGan21/ethereum-api

    v0.0.0-20210131190413-e24cd52b0b81

Version published
Maintainers
0

Readme

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 installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install
SocketSocket SOC 2 Logo

Product

  • Package Issues
  • 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