gz-c / skycoin-lite

Skycoin liteclient API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

Skycoin Liteclient

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+.

Compiling Android aar and jar

For the compilation process to Android Archive, we use Go Mobile.

$ gomobile bind -target=android github.com/skycoin/skycoin-lite/mobile

Compile javascript library

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.

Development

The javascript library is created starting from gopher/main.go. The Android library is created starting from mobile/api.go.

Updating the skycoin code

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.

Formatting

All .go source files should be formatted goimports. You can do this with:

make format

Code Linting

Install prerequisites:

make install-linters

Run linters:

make lint

About

Skycoin liteclient API


Languages

Language:Go 61.8%Language:Makefile 23.5%Language:Shell 14.7%