Step 1: Install Golang
Go v1.18+ or higher is required for the GotaBit Golang SDK.
-
Install Go 1.18+ from the official site. Ensure that your
GOPATH
andGOBIN
environment variables are properly set up by using the following commands:For Linux:
wget <https://golang.org/dl/go1.18.2.linux-amd64.tar.gz> sudo tar -C /usr/local -xzf go1.18.2.linux-amd64.tar.gz export PATH=$PATH:/usr/local/go/bin export PATH=$PATH:$(go env GOPATH)/bin
For Mac:
export PATH=$PATH:/usr/local/go/bin export PATH=$PATH:$(go env GOPATH)/bin
-
Confirm your Go installation by checking the version:
go version
Step 2: Get source code
Clone the repository locally and install needed dependencies
$ git clone git@github.com:hjcore/sdk-go.git
$ cd sdk-go
$ go install ./...
Check the documentation to get you started!
# run chain example
go run examples/chain/1_MsgSend/example.go
# run stake example
go run examples/chain/4_Stake/example.go
We have active, helpful communities on Twitter, Discord, and Telegram.
For updates on the GotaBit team's activities follow us on the GotaBit Twitter account.
This software is licensed under the Apache 2.0 license.
© 2022 GotaBit Limited