In order to build Wallet from the source, first make sure to install the following:
- Go 1.19
- Npm 8
- Node 16
- GitHub packages setup: you will need to authenticate to GitHub packages with your personal token.
- Configuring
npm
for use with GitHub Packagesecho "//npm.pkg.github.com/:_authToken=${PERSONAL_TOKEN}" > ~/.npmrc
- Docker (Note: make sure to set your
Docker
to useDocker-Compose V1
) - Docker-Compose V1
- Make
- Git Large File Storage (Git LFS)
Run the following commands:
git lfs install
git lfs pull
In addition, run (make generate-test-keys
) to generate tls keys and import test/fixtures/keys/tls/ec-cacert.pem
in your machine's cert chain (e.g. Keychain on Mac).
You also need to add the following lines to your hosts
file (/etc/hosts
on *NIX). This file is part of Docker networking mechanism which is primarily used to establish communication between Docker containers and the outside world via the host machine where the Docker daemon is running. See Docker's documentation for more details.
127.0.0.1 testnet.orb.local
127.0.0.1 vcwallet.trustbloc.local
127.0.0.1 wallet.trustbloc.local
127.0.0.1 mediator.trustbloc.local
127.0.0.1 uni-resolver-web.trustbloc.local
127.0.0.1 auth.trustbloc.local
127.0.0.1 auth-hydra.trustbloc.local
127.0.0.1 demo-hydra.trustbloc.local
127.0.0.1 edv.trustbloc.local
127.0.0.1 kms.trustbloc.local
127.0.0.1 file-server.trustbloc.local
127.0.0.1 demo-adapter.trustbloc.local
There are 2 ways to run Wallet locally:
- Static Build
- Dev Mode (hot deployment for JS & Vue components, useful for developing UI)
-
For the Static Build, run the following command:
make start-wallet-web
-
For the Dev Mode, run the following command instead:
make start-wallet-web-dev