Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 466 Bytes

File metadata and controls

33 lines (25 loc) · 466 Bytes

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/