The XAYA wallet uses Angular and Electron to build the wallet.
Clone this repository locally:
git clone https://github.com/xaya/xaya_electron.git
Install dependencies with npm :
There is an issue with
node_modules that are only used in Electron
on the backend when the application is built by the packager. Please use
as the dependencies manager.
npm install -g @angular/cli
To build for development
- In a terminal window -> npm start
Manage your environment variables
- Using local variables:
cross-env ENV=local npm start
- Using development variables:
cross-env ENV=dev npm start
- Using production variables:
cross-env ENV=prod npm start
||Execute the app in the browser.|
||Build the app. Your built files are in the /dist folder.|
||Build the app with Angular aot. Your built files are in|
|the /dist folder.|
||Builds your application and starts Electron.|
||Builds your application and creates an app consumable|
|on a Linux system.|
||On a Windows OS, builds your application and|
|creates an app consumable in Windows 32- and 64-bit systems.|
||On a MAC OS, i.e. OS X, builds your application and|
Place the daemon into the "daemon" folder before running or building. The daemon parameters are mostly hardcoded, although advanced users can still create *.conf file manually.
Webpack is configured inside angular-cli.json at a high-level or inside ngw.config.ts for low-level injections. Do not use 'ng eject', as this will break angular-cli. Note that 'ngw' is used in package.json for that purpose instead of 'ng'.
HOW TO DEVELOP WALLET
It's basically built on top of an Angular-Electron boilerplate. You can develop the GUI as a simple Angular application inside the 'app' folder. The daemon communication is done via 'global.service.ts'. It's based on the bitcoin-core node, which you simply expand with new functions, as shown in 'global.service.ts'. The main entry point is src/main.ts, if you want to alter anything related to the Electron window.