A Golang SDK for CodeChain
go get -u github.com/CodeChain-io/codechain-sdk-goCheck forexamples 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"
)
funcmain() {
a:=rpc.NewRPC("https://corgi-rpc.codechain.io/").Chainb, _:=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 ./...