-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
81 changed files
with
2,230 additions
and
1,434 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- run: pip install \ | ||
mkdocs-material \ | ||
mkdocs-macros-plugin | ||
|
||
- run: mkdocs gh-deploy --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
 | ||
|
||
# Haveno Documentation | ||
|
||
This repository hosts the documentation related to Haveno. It's online at [https://docs.haveno.exchange](https://docs.haveno.exchange). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docs.haveno.exchange |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# haveno-ts Library | ||
|
||
haveno-ts is a library users and programs can use to interact with Haveno without necessarily needing a user interface. It's a set of API calls that can be integrated on any platform, wallet or application: | ||
|
||
[:material-github: haveno-ts](https://github.com/haveno-dex/haveno-ts){ .md-button .md-button--primary } | ||
|
||
The [new user interface](haveno-ui.md) will use haveno-ts to communicate with the Haveno core. | ||
|
||
If you are interested in integrating Haveno into your app, let us know and we'll be happy to help you out. | ||
|
||
## Documented API calls | ||
|
||
Documentation is automatically generate using Typedoc: | ||
|
||
[:material-web: API Docs](https://haveno-dex.github.io/haveno-ts/classes/HavenoClient.HavenoClient.html){ .md-button .md-button--primary } | ||
|
||
|
||
## Run API tests | ||
|
||
Running the [API tests](https://github.com/haveno-dex/haveno-ts/blob/master/src/HavenoClient.test.ts) is the best way to develop and test Haveno end-to-end. | ||
|
||
[`HavenoClient.ts`](https://github.com/haveno-dex/haveno-ts/blob/master/src/HavenoClient.ts) provides the client interface to Haveno's backend daemon. | ||
|
||
1. [Run a local Haveno test network](https://github.com/haveno-dex/haveno/blob/master/docs/installing.md) and then shut down the arbitrator, Alice, and Bob or run them as daemons, e.g. `make alice-daemon`. You may omit the arbitrator registration steps since it is done automatically in the tests. | ||
2. Clone this project to the same parent directory as the haveno project: `git clone https://github.com/haveno-dex/haveno-ts` | ||
3. In a new terminal, start envoy with the config in haveno-ts/config/envoy.test.yaml (change absolute path for your system): `docker run --rm --add-host host.docker.internal:host-gateway -it -v ~/git/haveno-ts/config/envoy.test.yaml:/envoy.test.yaml -p 8079:8079 -p 8080:8080 -p 8081:8081 -p 8082:8082 -p 8083:8083 -p 8084:8084 -p 8085:8085 -p 8086:8086 envoyproxy/envoy-dev:8a2143613d43d17d1eb35a24b4a4a4c432215606 -c /envoy.test.yaml` | ||
4. In a new terminal, start the funding wallet. This wallet will be automatically funded in order to fund Alice and Bob during the tests.<br>For example: `cd ~/git/haveno && make funding-wallet`. | ||
5. Install protobuf compiler v3.19.1 or later for your system:<br> | ||
mac: `brew install protobuf`<br> | ||
linux: `apt install protobuf-compiler` | ||
NOTE: You may need to upgrade to v3.19.1 manually if your package manager installs an older version. | ||
6. Download `protoc-gen-grpc-web` plugin and make executable as [shown here](https://github.com/grpc/grpc-web#code-generator-plugin). | ||
7. `cd haveno-ts` | ||
8. `npm install` | ||
9. `npm test` to run all tests or `npm run test -- -t 'my test'` to run tests by name. | ||
|
||
## Adding new API functions and tests | ||
|
||
1. Follow [instructions](https://github.com/haveno-dex/haveno-ts#run-tests) to run Haveno's existing API tests successfully. | ||
2. Define the new service or message in Haveno's [protobuf definition](https://github.com/haveno-dex/haveno/blob/master/proto/src/main/proto/grpc.proto). | ||
3. Clean and build Haveno after modifying the protobuf definition: `make clean && make` | ||
4. Implement the new service in Haveno's backend, following existing patterns.<br> | ||
For example, the gRPC function to get offers is implemented by [`GrpcServer`](https://github.com/haveno-dex/haveno/blob/master/daemon/src/main/java/bisq/daemon/grpc/GrpcServer.java) > [`GrpcOffersService.getOffers(...)`](https://github.com/haveno-dex/haveno/blob/b761dbfd378faf49d95090c126318b419af7926b/daemon/src/main/java/bisq/daemon/grpc/GrpcOffersService.java#L104) > [`CoreApi.getOffers(...)`](https://github.com/haveno-dex/haveno/blob/b761dbfd378faf49d95090c126318b419af7926b/core/src/main/java/bisq/core/api/CoreApi.java#L128) > [`CoreOffersService.getOffers(...)`](https://github.com/haveno-dex/haveno/blob/b761dbfd378faf49d95090c126318b419af7926b/core/src/main/java/bisq/core/api/CoreOffersService.java#L126) > [`OfferBookService.getOffers()`](https://github.com/haveno-dex/haveno/blob/b761dbfd378faf49d95090c126318b419af7926b/core/src/main/java/bisq/core/offer/OfferBookService.java#L193). | ||
5. Build Haveno: `make` | ||
6. Update the gRPC client in haveno-ts: `npm install` | ||
7. Add the corresponding typescript method(s) to [haveno.ts](https://github.com/haveno-dex/haveno-ts/blob/master/src/haveno.ts) with clear and concise documentation. | ||
8. Add clean and comprehensive tests to [haveno.test.ts](https://github.com/haveno-dex/haveno-ts/blob/master/src/haveno.test.ts), following existing patterns. | ||
9. Run the tests with `npm run test -- -t 'my test'` to run tests by name and `npm 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. | ||
10. Open pull requests to the haveno and haveno-ts projects for the backend and frontend implementations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Bounties | ||
|
||
We use bounties to incentivize development and reward contributors. All issues available for a bounty are listed [on the Kanban board](https://github.com/orgs/haveno-dex/projects/2). It's possible to list on each repository the issues with a bounty on them, by searching issues with the '💰bounty' label. | ||
|
||
[:moneybag: Bounties Board](https://github.com/orgs/haveno-dex/projects/2){ .md-button .md-button--primary } | ||
|
||
To receive a bounty, you agree to these conditions: | ||
|
||
- Your changes must follow the [styling guidelines](contributor-guidelines.md). | ||
- Bounties will be set and awarded in XMR at the discretion of the Haveno core team. | ||
- The issues eligible for a bounty are labelled '💰bounty' and have the amount of the bounty specified in the title in this form: `[$200]` if in dollars or `[1 XMR]` if in Monero. | ||
- An issue is considered resolved when the patch(es) proposed by the contributor is/are merged in the appropriate repository according to the terms of the issue. | ||
- The first person who resolves an issue in its entirety will receive the entire amount of the bounty. | ||
- If the issue is resolved collaboratively by more than one person, the reward will be distributed among the contributors at the discretion of the Haveno core team. | ||
- Let the Maintainers know if you intend to work on a bounty so that the issue can be assigned to you. Being assigned to an issue doesn't make that issue resolvable only by the assignee. It's meant to avoid duplication of efforts and not to discourage collective work. | ||
- After the issue is resolved, contact the maintainers and claim your bounty (remember to provide them with a Monero address). | ||
- If a big number of bounties is claimed at the same time, the maintainers might opt for sending all the rewards on a specific day of the month instead of right after resolution. | ||
- If the bounty is in dollars, the contributor will receive the amount in Monero according to the value of XMR at the moment the issue was practically resolved, so at the moment the maintainers accept the last patch resolving the issue. | ||
|
||
We want to keep the system simple and flexible, but we will add new rules or edit existing ones if necessary. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Contributing to Haveno | ||
|
||
Thanks for wishing to help! Here there are some guidelines and information about the development process. We suggest you join the [matrix](https://app.element.io/#/room/#haveno-dev:haveno.network) room `#haveno-dev` (relayed on [IRC/Libera](irc://irc.libera.chat/#haveno-dev)) and have a chat with the devs, so that we can help get you started. | ||
|
||
Issues are tracked on GitHub. We use [a label system](https://github.com/haveno-dex/haveno/issues/50) and GitHub's [project boards](https://github.com/haveno-dex/haveno/projects) to simplify development. Make sure to take a look at those and follow the priorities suggested. | ||
|
||
## General guidelines | ||
|
||
- Be verbose. Remember this is collaborative development and we need to make life as easy as possible for future developers and the current maintainers. | ||
- All formatting needs to be consistent with the current code. | ||
- Changes must be done 'the right way'. No hacks to make things work, if you are having issues, let the other devs know so that we can help you out. | ||
- Rebase and squash your commits | ||
|
||
## Development process | ||
|
||
When you have something new built for Haveno, submit a pull request for review to be merged. | ||
|
||
- Pull requests should contain as many details as possible about what you are going to change and why. Avoid "title only" PRs, unless they are self-explanatory. | ||
- Pull requests should contain one single commit, unless it makes sense to have more. Please become familiar with git if you are not. | ||
- Pull requests won't be merged before 24 hours have passed. This timeframe will be extended when Haveno will have more active developers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# The Haveno user interface | ||
|
||
Currently Haveno is using Bisq's user interface (what we call 'legacy UI'), which we inherited when we forked Bisq. We think the legacy UI has serious performance and usability issues, so we decided to build our own interface, focused on performance and simplicity. | ||
|
||
!!! note | ||
The new user interface is being developed by an external team, but works have been temporarily suspended. See the [dedicated blog post](https://haveno.exchange/blog/development-ui-suspended/) for the details. | ||
|
||
The new interface will bring several improvements compared to the legacy UI: | ||
|
||
- Separated backend and frontend, which will result in increased performances and user experience | ||
- Built on ReactJS instead of the very heavy and poorly performing JavaFX | ||
- Completely new flow built for all users not only power users | ||
|
||
Like the rest of Haveno, the new user interface is completely open source and contributions/suggestions from the community are welcome, but remember to take a look at the [contributor guidelines](contributor-guidelines.md) first. | ||
|
||
[:material-github: haveno-ui](https://github.com/haveno-dex/haveno-ui){ .md-button .md-button--primary } | ||
|
||
## Contribute to Design | ||
|
||
A dedicated developer has been designing the new user interface. Community contributions are welcome and encouraged. See the repositories for more deails. | ||
|
||
[:material-github: haveno-design](https://github.com/haveno-dex/haveno-design){ .md-button .md-button--primary } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Importing Haveno dev environment | ||
|
||
This document describes how to import Haveno into an integrated development environment (IDE). | ||
|
||
## Eclipse IDE | ||
|
||
These steps describe how to import Haveno into Eclipse IDE for development. You can also develop using [IntelliJ IDEA](#intellij-idea) or VSCode if you prefer. | ||
|
||
!!! Note | ||
Use default values unless specified otherwise. | ||
|
||
1. If you haven't already, first [install and run a Haveno test network](installing.md). | ||
2. Download and run the [Eclipse](https://www.eclipse.org/downloads/) installer. | ||
3. Select "Eclipse IDE for Enterprise Java and Web Developers" to install. | ||
4. Launch an eclipse workspace and close out of the welcome screen. | ||
5. [Download](https://search.maven.org/search?q=g:org.projectlombok%20AND%20a:lombok&core=gav) the latest version of the lombok jar. | ||
6. Run lombok jar, e.g.: `java -jar ~/Downloads/lombok-1.18.22.jar`. | ||
7. Follow prompts to install lombok to your Eclipse installation. | ||
8. Restart Eclipse. | ||
9. File > Import... > Existing Gradle Project. | ||
10. Select the location of "haveno" project, e.g. ~/git/haveno. | ||
11. Advance to finish importing haveno project. | ||
12. Right click haveno project > Gradle > Refresh Gradle Project. | ||
13. File > Import... > Existing Projects into Workspace. | ||
14. Select the location of "haveno-ts" project, e.g. ~/git/haveno-ts. | ||
15. Advance to finish importing haveno-ts project. | ||
|
||
You are now ready to make, run, and test changes to the Haveno project! | ||
|
||
## IntelliJ IDEA | ||
|
||
!!! warning "Outdated" | ||
These instructions are outdated and for Bisq, but could still adapted and be used for Haveno. | ||
|
||
Most Bisq contributors use IDEA for development. The following instructions have been tested on IDEA 2021.1. | ||
|
||
1. Follow the instructions in build.md to clone and build Bisq at the command line. | ||
1. Open IDEA | ||
1. Go to `File -> Settings -> Build, Execution, Deployment -> Compiler -> Annotation Processors` and check the `Enable annotation processing` option to enable processing of Lombok annotations (Lombok plugin installed by default since v2020.3) | ||
1. Go to `File -> New -> Project from Existing Sources...` and then select the main Bisq folder to load automatically the related Gradle project | ||
1. If you did not yet setup JDK11 in IntelliJ, go to `File-> Project Structure -> Project` and under the `Project SDK` option locate your JDK11 folder | ||
1. Select JDK 11 for Gradle as well. Go to `File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle` and select the JDK11 location for the Gradle JVM value | ||
1. Go to `Build -> Build Project`. Everything should build cleanly | ||
1. Go to `Run > Edit Configurations... -> Plus (+) icon on the top left -> Application` anf then fill the requested fields | ||
|
||
9. Now you should be able to run Bisq by clicking on the _Play_ button or via `Run -> Run 'Bisq Desktop'` | ||
10. If you want to debug the application and execute breakpoints, use `Run -> Debug 'Bisq Desktop'` | ||
|
||
> TIP: If you encounter compilation errors in IDEA related to the `protobuf.*` classes, it is probably because you didn't build Bisq at the command line as instructed above. You need to run the `generateProto` task in the `other` project. You can do this via the Gradle tool window in IDEA, or you can do it the command line with `./gradlew :other:generateProto`. Once you've done that, run `Build -> Build Project` again and you should have no errors. | ||
> | ||
> If this does not solve the issue, try to execute `./gradlew clean` and then rebuild the project again. |
Oops, something went wrong.