A Golang SDK for CodeChain
go get -u github.com/CodeChain-io/codechain-sdk-go
Check for examples folder
Examples works under CodeChain in local with test configuration.
go run ./example/pay/main.go
package 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/revive
revive -config revive.toml ./...