Categorygithub.com/PanGan21/ethereum-api
modulepackage
0.0.0-20231001140846-38b6c1aaff50
Repository: https://github.com/pangan21/ethereum-api.git
Documentation: pkg.go.dev

# 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>

# Packages

No description provided by the author
No description provided by the author
No description provided by the author