Web Wallet website.
The build system assumes that you have at least Node.js v18.x installed. The LTS version is 18.16.0 at the time of writing.
All terminal commands assume that you are positioned in root folder of the repository.
Run npm install
from the root folder to get the necessary dependencies.
As the application uses the Web Crypto API, in development mode @vitejs/plugin-basic-ssl
is used to create a self-signed certificate to run the application in HTTPS. Being the certificate self-signed you need to create an exception in the browser to allow it to use the certificate.
The staging environment is at https://web-wallet-staging-oxs3z.ondigitalocean.app/
The dusk-wallet-js
library uses some environment variables.
The application defines these variables by reading a local .env
file containing the same variables used in the dusk-wallet-js
, with the addition of the VITE_
prefix.
N.B. the current 0.1.2
version of the library has no option to pick the network and uses the LOCAL_NODE
only. The current testnet address is set in that variable in the example below:
# can be empty string, must start with a slash otherwise, must not end with a slash
VITE_BASE_PATH=""
VITE_FEATURE_ALLOCATE=true
VITE_FEATURE_MIGRATE=true
VITE_FEATURE_MOONLIGHT_TRANSACTIONS=true
VITE_FEATURE_STAKE=true
VITE_FEATURE_TRANSFER=true
VITE_FEATURE_TRANSACTION_HISTORY=true
VITE_GAS_LIMIT_DEFAULT=2900000000
VITE_GAS_LIMIT_LOWER=10000000
VITE_GAS_LIMIT_UPPER=1000000000
VITE_GAS_PRICE_DEFAULT=1
VITE_GAS_PRICE_LOWER=1
VITE_MIGRATE_CONTRACT=""
VITE_MODE_MAINTENANCE=false
VITE_NODE_URL="" # connect to a specific node
To run a local node different steps are needed, so please read the related section.
npm run build
generates the production buildnpm run checks
runs all checks (lint, typecheck and test)npm run dev
generates the development build and starts the dev servernpm run dev:host
generates the development build, starts the dev server and exposes it to the local networknpm run lint
: performs the linting checksnpm run lint:fix
: runs ESLint with the--fix
flag to fix formatting errorsnpm run preview
previews the production buildnpm test
runs the test suitenpm run test:coverage
runs the test suite and generates the code coverage report in thecoverage
foldernpm run test:watch
runs the test suite in watch modenpm run typecheck
runs the type checkernpm run typecheck:watch
runs the type checker in watch mode
To run a local node, follow the instructions outlined in the Rusk's readme.