ethereum-api

command module
v0.0.0-...-38b6c1a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2023 License: MIT Imports: 7 Imported by: 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>

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳