This repository contains a liteclient for Skycoin written in Go. At the moment it is only used to compile an Android Archive and a JS library with gopherjs.
Skycoin Liteclient supports go1.10+.
For the compilation process to Android Archive, we use Go Mobile.
$ gomobile bind -target=android github.com/skycoin/skycoin-lite/mobile
For the compilation process to javascript library, we use gopherjs.
To compile the library use make build-js
or make build-js-min
(if you want the final file to be minified).
After compiling, the main.js and main.js.map files will be created/updated in the root of the repository.
The javascript library is created starting from gopher/main.go. The Android library is created starting from mobile/api.go.
To mantain compatibility, avoid errors and facilitate the update process, the
Skycoin code is added as vendored dependency through dep
. However,
if the Skycoin code is updated using dep, make build-js
and make build-js-min
will stop working,
because Skycoin uses dependencies that are not compatible with gopherjs. To solve this problem, it is
necessary to execute make fix-skycoin-dependency
after updating the dependencies with dep.
All .go
source files should be formatted goimports
. You can do this with:
make format
Install prerequisites:
make install-linters
Run linters:
make lint