A Golang SDK for CodeChain
go get -u github.com/CodeChain-io/codechain-sdk-goCheck for examples folder
Examples works under CodeChain in local with test configuration.
go run ./example/pay/main.gopackage main
import (
"fmt"
"github.com/CodeChain-io/codechain-sdk-go/rpc"
)
func main() {
a := rpc.NewRPC("https://corgi-rpc.codechain.io/").Chain
b, _ := a.GetBlockByNumber(0)
fmt.Printf("%+v\n", b)
}Make sure you run revive before creating a PR to the repo
go get -u github.com/mgechev/reviverevive -config revive.toml ./...