/sdk-go

Primary LanguageGo

GotaBit

GotaBit Golang SDK

Installation

Step 1: Install Golang

Go v1.18+ or higher is required for the GotaBit Golang SDK.

  1. Install Go 1.18+ from the official site. Ensure that your GOPATH and GOBIN 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
  2. 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 ./...

Documentation

Check the documentation to get you started!

Run examples

# run chain example
go run examples/chain/1_MsgSend/example.go

# run stake example
go run examples/chain/4_Stake/example.go

Talk to us

We have active, helpful communities on Twitter, Discord, and Telegram.

Tweet   Telegram

For updates on the GotaBit team's activities follow us on the GotaBit Twitter account.

License

This software is licensed under the Apache 2.0 license.

© 2022 GotaBit Limited