Code that lives in the bepsi vending machine that supports multiple payment methods:
- Listens to MATIC/DAI/USDC/USDT payments to
PAYMENT_ADDRESS, on payment dispenses bepsi - Listens to Spark Network (Bitcoin L2) payments via unique addresses per vending pin
- Listens to LNbits websockets for Lightning payments, on payment dispenses bepsi
- Listens to BTCPay websockets for Ark payments, on payment dispenses bepsi
- Listens to discord emoji reaction, on reaction dispenses bepsi
This guide was written for Debian 12.
sudo apt install git make build-essential
Requires Node.js
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
\. "$HOME/.nvm/nvm.sh"
nvm install 20Requires Yarn
npm install --global yarngit clone https://github.com/GitYVR/bepsi-pi.git
cd bepsi-pi
yarn installCopy the example environment and fill out the parameters:
cp .env.example .env
nano .envTo test run:
yarn startTo persist bepsi-pi and make it run on startup:
cd ~/bepsi-pi
npm install -g pm2
pm2 start index.js --name bepsi-pi --exp-backoff-restart-delay=100
pm2 startuppm2 will then issue you a command that will generate and install a systemd file for your system. Run this command and restart your machine to test this.
Useful commands:
pm2 list
pm2 monitTo see logs:
pm2 logs bepsi-piThis vending machine supports multiple payment methods:
Configure SPARK_PIN_* wallet addresses and mnemonics in .env for Spark payments
Configure PAYMENT_ADDRESS in .env to accept MATIC/DAI/USDC/USDT
Configure ARKADE_WS_URL in .env for Ark payments via BTCPay websockets
Configure LIGHTNING_LNBIT_URL in .env for LNbits integration
Configure SOLANA_TREASURY_ADDRESS in .env for Solana payments