kseo / codechain-sdk-go

Go Software Development Kit for CodeChain

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CodeChain SDK Go

A Golang SDK for CodeChain

How to install

go get -u github.com/CodeChain-io/codechain-sdk-go

Example

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)
}

How to run linter

Make sure you run revive before creating a PR to the repo

Install

go get -u github.com/mgechev/revive

Run

revive -config revive.toml ./...

About

Go Software Development Kit for CodeChain


Languages

Language:Go 100.0%