Sample Node.js application using the haveno-ts library.
-
Build Haveno.
-
Install Envoy, for example:
brew install envoy. -
From the haveno repository, start a daemon and its Envoy proxy in separate terminals:
# terminal 1: start the Haveno daemon make haveno-daemon-mainnet# terminal 2: start the Envoy proxy make envoy-mainnetTo use test funds instead, run
make haveno-daemon-stagenetandmake envoy-stagenet.
In a new terminal:
git clone https://github.com/haveno-dex/haveno-sample-app.git
cd haveno-sample-app
npm install
npm run startThe app connects to the daemon through the proxy at http://localhost:8080, then prints the wallet balance and the number of USD offers. Edit src/index.ts to build from there.
To run against a local Haveno network, start the local daemons, then start the proxy from this repository: envoy -c config/envoy.local.yaml. The app connects to user1's daemon.