Go-based Ethereum new Block alert REST Interface
This REST API support Gin framework.
Handler Method Support:
- Post Block
- Get Block
- Alerting (PING)
Field:
- Height (Block number)
- Minedby (Block Miner)
$ go mod init
$ go run main.go$ make devhttp://localhost:8080/web Web Interface GET http://localhost:8080/blockfeed
POST http://localhost:8080/blockfeedif you want to reproduce new field use a Unit Test
$ cd platform
$ go testawait fetch('/blockfeed', { method: 'POST', headers: {'content-type': 'application/json'}, body: JSON.stringify({ number: '1', minedby: '2Miners' }) })