Everscale SDK Client library Golang bindings based itself on Ever SDK.
Many thanks to @temamagic for advice on architecture, tests, code and commit style.
$ go get -u github.com/markgenuine/ever-client-go
or
$ git clone https://github.com/markgenuine/ever-client-go.git
$ cd ever-client-go
#Set path to library
install_name_tool -id PATH_WITH_BINDING/gateway/client/lib/darwin/libton_client.dylib PATH_WITH_BINDING/gateway/client/lib/darwin/libton_client.dylib
#Add to ~/.bashrc or execute everytime
export CGO_LDFLAGS="-LPATH_WITH_BINDING/gateway/client/lib/darwin -lton_client"
#Add to ~/.bashrc or execute everytime
export LD_LIBRARY_PATH=PATH_WITH_BINDING/gateway/client/lib/linux/:$LD_LIBRARY_PATH
export CGO_LDFLAGS="-LPATH_WITH_BINDING/gateway/client/lib/linux -lton_client"
go build
go run -exec "env DYLD_LIBRARY_PATH=/path-with-lib/" main.go
go test -exec "env DYLD_LIBRARY_PATH=/path-with-lib/ ./... " -v
$ go test ./... -v
$ go run ./example/*.go
import goever "github.com/markgenuine/ever-client-go"
package main
import (
"fmt"
"github.com/markgenuine/ever-client-go/domain"
"log"
goton "github.com/markgenuine/ever-client-go"
)
func main() {
ever, err := goever.NewEver("", domain.GetDevNetBaseUrls())
if err != nil {
log.Fatal(err)
}
defer ever.Client.Destroy()
value, err := ever.Client.Version()
if err != nil {
log.Fatal(err)
}
fmt.Println("Version bindings is: ", value.Version)
}
For more examples see *_test.go files ever-client-go/usecase