To get your dev environment setup all you need to do is to run nix-shell
When running npm install, don't worry about warnings or skipped optional dependencies.
npm install
bash ./setup.sh
npm run build
The camera scanner mock reads the wallet addresses from your device_config.json file.You need to add a property under brain.mockCryptoQR where the key is the cryptoCode and the value is the address to be returned by the mocked camera.
Example:
{
"brain": {
...
"mockCryptoQR": {
"BTC": "XXXXXXX"
}
},
...
First, make sure lamassu-server is properly installed, configured, and running. See the INSTALL.md file in lamassu-server. Then, run lamassu-machine:
In first terminal window, run the bill validator simulator:
node bin/fake-bills.js
In second terminal window:
node bin/lamassu-machine --mockBillValidator --mockBillDispenser --mockCam \
--devBoard --mockPair '<totem-from-admin>'
IMPORTANT: Make sure to use single quotes and not double quotes, or the shell will mess up the totem.
Click on Init, then Scan. You should see the start screen.
For subsequent runs, you don't need the --mockPair flag.
In firefox or chrome, open the ui/start.html file. The URL should be something like this:
file://<lamassu-machine-dir>/ui/start.html?debug=dev
Don't worry if the fonts don't look right. The production software uses a proprietary font. Click on INIT (it should be fast on your computer), then SCAN. After a few moments of pairing, you should see the start screen.
When the screen asks you to insert a bill, navigate to the terminal where you opened the mock bill validator, and input 1Enter to insert a one dollar bill.
Sometimes it might be a locale-related issue
Try executing the npm install step inside a --pure flagged nix-shell
nix-shell --pure
[nix-shell:<lamassu-machine-dir>]$ npm install
npm rebuild node-sass
Configure mockPrinter on your device_config.json
{
"brain": {
...
"mockPrinter": true,
},
...