This package is intended to be used to run bchwallet on iOS and Android devices. It offers exported functions
which start and stop the wallet that can be called from the language binding.
The following is an example of how to compile for Android:
Make sure the android SDK is installed on your computer. If you use android studio you should already have it installed.
Install NDK. You can find this in the Android SDK Manager inside Android Studio under SDK Tools.
Set the ANDROID_HOME environmental variable and also put it in your path:
The wallet is now running and you can use the gRPC API to control it.
Use mobile.Mobile.StopWallet() to stop it and perform a clean shutdown.
Note that StartWallet takes in a path to a config file. You will need to programatically create and save the config file on the device. As you do this make sure
to set the appdata and logdir to a valid path on the device. You will also most likely want to use the noinitialload config option and create the wallet using the API.
Finally you may run into this bug in gomobile which may require you to modify a python file in your Android SDK.
Package mobile is licensed under the copyfree ISC
License.
StartWallet is the function exposed to the mobile device to start the bchwallet.
configPath is the path to the bchwallet.conf file that should be saved on your mobile device.
Make sure you save in the config file the correct path on the device to use for `appdata`.
You will likely also want to the `noinitalload` option to prevent the wallet from blocking
startup as it waits for input from stdin.
Once the wallet is started you will want to control it using the gRPC API. A `CreateWallet` RPC
is available which you will need to call first.