JSON-RPC client for getblock.io.
Install
go get github.com/ofen/getblock-go
Example
package main
import (
"context"
"fmt"
"github.com/ofen/getblock-go/eth"
)
func main() {
ctx := context.Background()
client := eth.New("your-api-token")
head, err := client.BlockNumber(ctx)
if err != nil {
panic(err)
}
fmt.Println(head)
}
Documentation
https://getblock.io/docs/