(Even after a recent refactor the code is still a bit sloppy, in a bit of a segwit rush, apologize in advance for any "wtf is this?")
## Overview
Please join us on [slack](https://join.slack.com/t/zaphq/shared_invite/enQtMjkyNTAxNDA3MjE2LWE3NGZjZGE5ZmI1NGQ5YTk3MGQzMTdmNDAwYjNhZTJkMWU0ZWZlNzA0MjJiNDBjMzcxYjcyMDMxNWY3OGNhYWQ) and check [open issues](https://github.com/LN-Zap/zap-desktop/issues) to see what contributions are needed before tackling a task to avoid duplicate work.
## Pull Requests
The branch to be PR'd against will be master for the time being. This may change as the repo and contributors grow.
The `master` branch will be used for all pull requests for the time being. This may change as the repo and contributors grow.
### Branch Names
Branch names should start with `feature` or `fix` followed by `/description_of_branch`.
#### Example
Branch names should start with `feature` or `fix` followed by `/description_of_branch`
```bash
# example
git branch feature/list-onchain-txs
```
Commit messages should start with `feature`, `fix`, or `test` followed by `(subject_of_commit)` and ending with `: description_of_commit`
### Commit Messages
Commit messages should start with `feature`, `fix`, or `test` followed by `(subject_of_commit)` and ending with `: description_of_commit`.
#### Example
```bash
#example
git commit -m "feature(list-onchain-txs): create hard code mock of onchain-txs list"
```
## eslint:
This project has eslint rules and PRs should pass `npm run lint` before being merged. The eslint rules are not final by any means and can be changed if necessary
## Tests:
Tests should try to be written for every feature and fix. With segwit activating soon and the demand for Zap rising rapid development will naturally leave some code untested but we should all try our best.
## eslint
This project has eslint rules and pull requests should pass `npm run lint` before being merged. The eslint rules are not final by any means and can be changed if necessary
PRs should pass `npm run test` before they are merged
## Tests
Tests should try to be written for every feature/fix and pass `npm run test` before being merged. With the demand for the Lightning Network and Zap rising, rapid development will naturally leave some code untested but we should all try our best.
Join us on [slack](https://join.slack.com/t/zaphq/shared_invite/enQtMjkyNTAxNDA3MjE2LWE3NGZjZGE5ZmI1NGQ5YTk3MGQzMTdmNDAwYjNhZTJkMWU0ZWZlNzA0MjJiNDBjMzcxYjcyMDMxNWY3OGNhYWQ) to discuss development, design and product
We have an active [slack](https://join.slack.com/t/zaphq/shared_invite/enQtMjkyNTAxNDA3MjE2LWE3NGZjZGE5ZmI1NGQ5YTk3MGQzMTdmNDAwYjNhZTJkMWU0ZWZlNzA0MjJiNDBjMzcxYjcyMDMxNWY3OGNhYWQ) channel where you can join the discussion on development, design and product.
## Requirements
## Prerequisites
To compile just the Zap wallet, you will need:
@ -26,74 +26,94 @@ To use the Zap wallet, you will need:
And then install dependencies with yarn + install grpc
And then install dependencies with yarn + install grpc:
```bash
$ cd zap-desktop
$ yarn
$ npm run install-grpc
cd zap-desktop
yarn
npm run install-grpc
```
Zap does not store `lnd` binaries in the Github repo so you will need to [download](https://github.com/lightninglabs/lightning-app/tree/master/apps/desktop/bin) the binary file for the appropriate OS from the Lightning Labs wallet repo. Make sure the file has the correct permissions to be executable in Mac/Linux. If you already use the [release](https://github.com/lightninglabs/lightning-app/releases) version, you can copy the binary located at `lightning-app/resources/app/bin/[YOUR-OS-FOLDER]` and place it into `zap-desktop/resources/bin/[YOUR-OS-FOLDER]`.
Alternatively, you can [compile](https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md) `lnd` from source to have the latest development version. This allows you to use [`lncli`](http://dev.lightning.community/overview/#lnd-interfaces) in addition to Zap, and run a seperate `lnd` instance with [custom](http://dev.lightning.community/guides/installation/#lnd) configuration. Zap will detect the separate `lnd` instance and use it as the backend client. For Zap to run properly without any custom `lnd` setup, copy the `lnd` binary that will be located in your `$GOPATH/bin` and paste it into Zap as previously mentioned.
### Lightning Network Daemon (lnd)
Zap does not store `lnd` binaries in the Github repo so you will need to [download](https://github.com/lightninglabs/lightning-app/tree/master/apps/desktop/bin) the binary file for the appropriate OS from the Lightning Labs wallet repo.
Zap expects `lnd` to be in one of these directories depending on your OS:
#### Release Version
```
# mac
resources/bin/darwin
If you already use the [release](https://github.com/lightninglabs/lightning-app/releases) version, you can will need to copy the `lnd` binary to the [appropriate location](#lnd-location) for your OS.
#linux
resources/bin/linux
The `lnd` binary can be found at `lightning-app/resources/app/bin/[YOUR-OS-FOLDER]`.
#win32
resources/bin/win32
```
#### Compiling
Alternatively, you can [compile](https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md) `lnd` from source to have the latest development version. This allows you to use [`lncli`](http://dev.lightning.community/overview/#lnd-interfaces) in addition to Zap, and run a seperate `lnd` instance with [custom](http://dev.lightning.community/guides/installation/#lnd) configuration. Zap will detect the separate `lnd` instance and use it as the backend client.
For Zap to run properly without any custom `lnd` setup, copy the `lnd` binary to the [appropriate location](#lnd-location) for your OS.
The `lnd` binary can be found at `$GOPATH/bin`.
#### lnd Location
Zap expects `lnd` to be in one of these directories depending on your OS:
- macOS `resources/bin/darwin/`
- Linux `resources/bin/linux/`
- Windows `resources/bin/win32/`
On macOS and Linux, make sure the file has execute permissions:
Then to start it:
```bash
$ npm run dev
chmod +x lnd
```
## Test
### Testing
To test that everything has been installed correctly:
```bash
$ npm run test
npm run test
```
## Lint
### Running
To run Zap:
```bash
$ npm run lint
npm run dev
```
## Contributing:
Please see the [contributing guide](https://github.com/LN-Zap/zap-desktop/blob/master/CONTRIBUTING.md)
### Linting
To check linting:
## Todos (Last updated August 16th):
Join us on [slack](https://join.slack.com/t/zaphq/shared_invite/enQtMjkyNTAxNDA3MjE2LWE3NGZjZGE5ZmI1NGQ5YTk3MGQzMTdmNDAwYjNhZTJkMWU0ZWZlNzA0MjJiNDBjMzcxYjcyMDMxNWY3OGNhYWQ) before tackling a todo to avoid duplicate work.
```bash
npm run lint
```
The old todo list was recently removed. Come on slack or check open Github issues to see what contributions are needed.
## Contributing
Please see the [contributing guide](https://github.com/LN-Zap/zap-desktop/blob/master/CONTRIBUTING.md).
## Q & A (Quality and Assurance)
A good product not only has good software tests but also checks the quality of the UX/UI. Putting ourselves in the shoes of a user will be very important for Zap.
A good product not only has good software tests but also checks the quality of the UX/UI. Putting ourselves in the shoes of a user is a very important design principle of Zap.
If you see issues please report with screenshots and/or how to reproduce the bug/error
If you are having problems with Zap, please report the issue with screenshots and/or how to reproduce the bug/error.