This project uses Trust Wallet WalletCore. Since WalletCore is hosted on GitHub Packages, Gradle needs a GitHub personal access token. Set the following environment variables:
You can also add it to your ~/.bashrc or ~/.zshrc file, more detail refer to this guide
export TRUSTWALLET_USER=your_github_user
export TRUSTWALLET_PAT=your_github_token[How to get a personal github token?] (https://github.com/settings/tokens)
If you previously had GITHUB_TOKEN and GITHUB_USER set, rename them in your ~/.zshrc or ~/.bashrc:
# Before
export GITHUB_USER=your_github_user
export GITHUB_TOKEN=your_github_token
# After
export TRUSTWALLET_USER=your_github_user
export TRUSTWALLET_PAT=your_github_tokenThen re-auth gh CLI (since it was previously using GITHUB_TOKEN for auth):
gh auth login --web --git-protocol https
gh auth refresh -h github.com -s workflowAfter cloning the repo, install the project git hooks so Kotlin files are automatically formatted before every commit:
sh scripts/install-git-hooks.shThis installs a pre-commit hook that runs ktfmtFormat and re-stages any changed files.
When keygen started , the main device will start a mediator server on port 18080, in order for your pair device to access it , you will need to do the following
-
Setup port forwarding on the main device, using
adb,adbwill start to listen on port 18080 on your emulator's host machine , but only on loopback interfaceadb forward tcp:18080 tcp:18080
-
use
socatto listen on the host machine's network interface , and forward the connection to the loopback interface# my host machine's ip is 192.168.1.35 , update it to your own ip socat TCP-LISTEN:18080,bind=192.168.1.35,reuseaddr,fork TCP:localhost:18080 -
Override service discovery address, when mediator start the service , it register itself, however the Ip it register is the emulator's local ip, which is
10.0.2.16, so the pair device will only find address as10.0.2.16, need to override it to your host machine's ip , in file https://github.com/vultisig/vultisig-android/blob/main/app/src/main/java/com/vultisig/wallet/ui/models/keygen/JoinKeygenViewModel.kt