This repository contains a small wrapper for Skycoin (written in Go) to provide mobile and JS bindings.
Important note about error handling
Many functions on this library call the
panic() function of the Go programming language in case of important
errors, however, for various reasons the panics are converted into errors on each supported language. Due to
this, it is important to bear in mind that errors returned by this library may be due to extremely important
problems and continuing the execution of operations with results obtained from the library could cause loss
It is recommended to be very careful with errors.
Compiling Android aar and jar, and iOS Framework
For the compilation process to Android Archive and iOS Framework, we use Go Mobile.
$ gomobile bind -target=android github.com/skycoin/skycoin-lite/mobile
$ gomobile bind -target=ios github.com/skycoin/skycoin-lite/mobile
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.
gopherjs tests can be run with
The tests require node syscall support installed, see install instructions at https://github.com/gopherjs/gopherjs/blob/master/doc/syscalls.md#nodejs-on-linux-and-macos
Note that you can't use the vendored gopherjs for this, because the gopherjs/node-syscall package
can't be vendored by dep. You'll have to install gopherjs to your
To enable stacktraces, install source maps:
npm install --global source-map-support
and make sure
NODE_PATH is set to the value of
npm root --global in your environment.
TS cipher test suite
The test suite can be run with all test cases using
.go source files should be formatted
goimports. You can do this with: