Browse Source

fix(update-docs): Added advanced section and clearer wording

renovate/lint-staged-8.x
helgabutters 7 years ago
parent
commit
88c5138c27
  1. 101
      ADVANCED.md
  2. 78
      README.md

101
ADVANCED.md

@ -0,0 +1,101 @@
<h1 align='center'>Advanced Usage</h1>
## Compiling Zap From Source
***Note:*** *If you have installation or compilation issues, please file a [Github issue](https://github.com/LN-Zap/zap-desktop/issues) or ping us in [Slack](https://join.slack.com/t/zaphq/shared_invite/enQtMjkyNTAxNDA3MjE2LWE3NGZjZGE5ZmI1NGQ5YTk3MGQzMTdmNDAwYjNhZTJkMWU0ZWZlNzA0MjJiNDBjMzcxYjcyMDMxNWY3OGNhYWQ).*
### Prerequisites
To compile the Zap wallet, you will need:
- **[Node.js version >= 8](https://nodejs.org)** and **[npm version >= 5](https://www.npmjs.com)**
- **[yarn](https://yarnpkg.com/lang/en/docs/install/)**
### Downloading Zap
After installing the above prerequisites, clone the repo via git:
```bash
git clone https://github.com/LN-Zap/zap-desktop.git
```
### Installing Dependencies
Install all the dependencies with yarn + install grpc:
```bash
cd zap-desktop
yarn
npm run install-grpc
```
## Lightning Network Daemon (lnd)
Zap requires `lnd` but does not store `lnd` binaries in the Github repo.
To setup `lnd` for Zap, you have two options:
- [Light Client](#Light-Client)
- [Full Bitcoin Node](#Full-Bitcoin-Node)
### Light Client
`lnd` has a light client called `neutrino` which allows you to run `lnd` without requiring a full node. This is the default configuration for the Zap wallet. To use the light client you can either use the [Lightning Labs Binary](#Lightning-Labs-Binary) or [Compile lnd](#Compile-lnd).
#### Lightning Labs Binary
***Note:*** *This Lightning Labs `lightning-app` project is different then [lnd](https://github.com/lightningnetwork/lnd)*
Download the [lnd binary](https://github.com/lightninglabs/lightning-app/tree/master/apps/desktop/bin) for your appropriate OS and copy it to the [appropriate location](#lnd-location) for your OS.
#### Compile lnd
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`.
### Full Bitcoin Node
Follow the instructions on the [lnd installation](https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md) page.
### 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:
```bash
chmod +x lnd
```
## Running Zap
### Testing
To test that everything has been installed correctly:
```bash
npm run test
```
### Running
To run Zap:
```bash
npm run dev
```
### Linting
To check linting:
```bash
npm run lint
```

78
README.md

@ -13,90 +13,56 @@ The UI for Zap is created using
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.
## Prerequisites
To compile just the Zap wallet, you will need:
- **Node.js version >= 8**
- **npm version >= 5**
- **[yarn](https://yarnpkg.com/lang/en/docs/install/)**
To use the Zap wallet, you will need:
- **[Lightning Network Daemon (lnd)](https://github.com/lightningnetwork/lnd)**
- **[btcd (roasbeef fork)](https://github.com/roasbeef/btcd)** or **[neutrino](https://github.com/lightninglabs/neutrino)**
## Installing
**If you have installation or compilation issues, please file a Github issue or ping us in Slack.**
After installing the above prerequisites, clone the repo via git:
```bash
git clone https://github.com/LN-Zap/zap-desktop.git
```
And then install dependencies with yarn + install grpc:
```bash
cd zap-desktop
yarn
npm run install-grpc
```
### 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.
***Note:*** *If you would like to use a full bitcoin node, please see the [advanced usage](https://github.com/LN-Zap/zap-desktop/blob/master/ADVANCED.md) page.*
#### Release Version
Download the [latest release](https://github.com/LN-Zap/zap-desktop/releases) for your appropriate OS and follow the instructions below.
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.
### macOS
The `lnd` binary can be found at `lightning-app/resources/app/bin/[YOUR-OS-FOLDER]`.
Once you have the .dmg file downloaded, double click on the file the mount the image.
#### Compiling
Then drag-and-drop the `Zap.app` to `Applications`.
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.
Finally, open `Zap.app`
For Zap to run properly without any custom `lnd` setup, copy the `lnd` binary to the [appropriate location](#lnd-location) for your OS.
### Windows
Once you have the .exe file downloaded, simply double click on the file.
The `lnd` binary can be found at `$GOPATH/bin`.
### Linux (.deb)
Once you have the .deb file downloaded, you will need to install the package with `dpkg`:
#### 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/`
```bash
dpkg -i zap-desktop_0.0.1_amd64.deb
```
On macOS and Linux, make sure the file has execute permissions:
If this is your first time installing zap, you may have some unmet dependencies. This can be resolved with the following command:
```bash
chmod +x lnd
apt-get update && apt-get -f install
```
### Testing
To test that everything has been installed correctly:
To run Zap you can either navigate through the GUI or run the following command:
```bash
npm run test
zap-desktop
```
### Running
### Linux (AppImage)
To run Zap:
Once you have downloaded the .AppImage file, you will need to navigate to the download directory and make it executable:
```bash
npm run dev
chmod +x zap-desktop_0.0.1_amd64.AppImage
```
### Linting
To check linting:
Then you can simply run the file:
```bash
npm run lint
./zap-desktop_0.0.1_amd64.AppImage
```
## Contributing

Loading…
Cancel
Save