mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-22 20:19:21 +00:00
3 KiB
3 KiB
Developer Guide
This document is a guide for Haveno development.
Installing Haveno
In order to develop for Haveno, first install and run a local Haveno test network.
Running the UI proof of concept
Follow instructions to run Haveno's UI proof of concept in a browser.
This proof of concept demonstrates using Haveno's gRPC server with a web frontend (react and typescript) instead of Bisq's JFX application.
Importing Haveno into development environment
Follow instructions to import Haveno into a development environment.
Running end-to-end API tests
Follow instructions to run end-to-end API tests in the UI project.
Adding new API functions and tests
- Follow instructions to run Haveno's existing API tests successfully.
- Define the new service or message in Haveno's protobuf definition.
- Clean and build Haveno after modifying the protobuf definition:
make clean && make
- Implement the new service in Haveno's backend, following existing patterns.
For example, the gRPC function to get offers is implemented byGrpcServer
>GrpcOffersService.getOffers(...)
>CoreApi.getOffers(...)
>CoreOffersService.getOffers(...)
>OfferBookService.getOffers()
. - Build Haveno:
make
- Update the gRPC client in haveno-ui-poc:
npm install
- Add the corresponding typescript method(s) to HavenoDaemon.ts with clear and concise documentation.
- Add clean and comprehensive tests to HavenoDaemon.test.ts, following existing patterns.
- Run the tests with
npm run test -- -t 'my test'
to run tests by name andnpm test
to run all tests together. Ensure all tests pass and there are no exception stacktraces in the terminals of Alice, Bob, or the arbitrator. - Open pull requests to the haveno and haveno-ui-poc projects for the backend and frontend implementations.
Trade Protocol
For documentation of the trade protocol, see trade protocol.