diff --git a/.github/workflows/toc.yml b/.github/workflows/toc.yml index f676bb161..dd11776d4 100644 --- a/.github/workflows/toc.yml +++ b/.github/workflows/toc.yml @@ -7,4 +7,4 @@ jobs: steps: - uses: technote-space/toc-generator@v2 with: - TARGET_PATHS: README.md, docs/faq.md, DEVELOPMENT.md \ No newline at end of file + TARGET_PATHS: README.md, docs/faq.md, docs/development.md \ No newline at end of file diff --git a/.gitignore b/.gitignore index a1e4ffeab..ff042a9d3 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,5 @@ token.sh src/cryptoadvance/specter/translations/**/messages.mo tests/elements signing_dir +site +docs/README.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e16dd65b8..53be2c7b6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,8 +5,8 @@ We haven't created many explicit processes and rely on the best practices of Ope If it's necessary to add processes, we'll probably looking into Pieter Hintjens' [Social Architecture](https://hintjens.gitbooks.io/social-architecture/content/) and specifically the C4 process. Pieter is explicitly mentioning two roles: Contributors and maintainers. Thank you very much to all our [Contributors](https://github.com/cryptoadvance/specter-desktop/graphs/contributors). -We're planning to mention individual contributors on the release-notes of each new release. +See also the Contributors to each specific release in the release-notes. The maintainers are the ones who are able to merge PRs and create tags/releases. They are listed as "authors" in setup.py. -For practical considerations of a dev-setup, please have a look in the [DEVELOPMENT.md](./DEVELOPMENT.md). If you need support, join our [Telegram group](https://t.me/spectersupport). +For practical considerations of a dev-setup, please have a look in the [development.md](./development.md). If you need support, join our [Telegram group](https://t.me/spectersupport). diff --git a/README.md b/README.md index eb2b587f6..28ed89bb7 100755 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ If you are using Bitcoin Core with GUI, set `server=1` in `bitcoin.conf`. This s If you use Specter from a remote machine and want to use it with hardware wallets connected via USB, please read [this guide on setting up HWIBridge](docs/hwibridge.md) to facilitate such connection to hardware wallets. -Have a look at [DEVELOPMENT.md](DEVELOPMENT.md) for further information about hacking on Specter-desktop. +Have a look at [development.md](docs/development.md) for further information about hacking on Specter-desktop. ## Tips and tricks (detailed instructions) diff --git a/docs/api/README.md b/docs/api/README.md index 4c948b09c..1f35110b2 100644 --- a/docs/api/README.md +++ b/docs/api/README.md @@ -7,7 +7,7 @@ export SPECTER_API_ACTIVE=True The Authentication is also necessary if you don't activate any Authentication mechanism. In order to make reasonable assumptions about how stable a specific endpoint is, we're versioning them via the URL. Currently, all endpoints are preset with `v1alpha` which pretty much don't give you any guarantee. -# Basic Usage +## Basic Usage Curl: @@ -23,7 +23,7 @@ response = requests.get('http://127.0.0.1:25441/api/v1alpha/specter', auth=('adm json.loads(response.text) ``` -# Endpoints +## Endpoints * [Liveness](./ep_liveness.md): Is specter up and running? * [Readyness](./ep_readyness.md): Is specter ready to serve requests? diff --git a/docs/api/ep_liveness.md b/docs/api/ep_liveness.md index 395fb8683..543c33553 100644 --- a/docs/api/ep_liveness.md +++ b/docs/api/ep_liveness.md @@ -1,4 +1,4 @@ -## Liveness +## Liveness Endpoint This endpoint works as healthz-check. See e.g. here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ diff --git a/docs/api/ep_readyness.md b/docs/api/ep_readyness.md index d30103af1..356bb1d3b 100644 --- a/docs/api/ep_readyness.md +++ b/docs/api/ep_readyness.md @@ -1,5 +1,5 @@ -# Readyness +# Readyness Endpoint This endpoint works as heathz-check. See e.g. here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ diff --git a/docs/api/ep_specter.md b/docs/api/ep_specter.md index 58d85c51f..39c225679 100644 --- a/docs/api/ep_specter.md +++ b/docs/api/ep_specter.md @@ -1,4 +1,4 @@ -# Specter Object endpoint +# Specter Object Endpoint That's a bit of a leaky abstraction. Most of the internals within specter are stored in the specter-object. This endpoint provides general information from Specter server and Node Status. diff --git a/docs/api/ep_specter_fulltxlist.md b/docs/api/ep_specter_fulltxlist.md index f95337dd5..e1319c82b 100644 --- a/docs/api/ep_specter_fulltxlist.md +++ b/docs/api/ep_specter_fulltxlist.md @@ -1,4 +1,4 @@ -# Full Transaction List +# Full Transaction List Endpoint Gives a full tx_list of all transactions. Transactions are cached within specter, so might not be 100% up-to-date. The result here is highly dependent on the user executing calling this resource as this is not specific to a specific wallet but returns ALL of the TXs of all the wallets. diff --git a/docs/api/ep_wallets_wallet.md b/docs/api/ep_wallets_wallet.md index 2adf880f3..8f57f2317 100644 --- a/docs/api/ep_wallets_wallet.md +++ b/docs/api/ep_wallets_wallet.md @@ -1,5 +1,5 @@ -## Wallet +## Wallet Endpoint This API will return wallet balance details as well as transactions. diff --git a/docs/archblog.md b/docs/archblog.md index c9c232873..274441e4d 100644 --- a/docs/archblog.md +++ b/docs/archblog.md @@ -1,7 +1,7 @@ # Purpose Let's find a place to docoment non straightforward design decisions. -## 02nd Oct 2020 - Kim +## 02nd Oct 2020 - k9ert It's already mentioned in Development.md. I spend far too much time figuring out that we have created a nasty workaround in server.py. So the problem looks like this: The fixtures are creating the app anew for each test in test_controller. For some reason hwi-view-endpoints are somehow treated differently then the normal endpoints. As a result, the second test gets a app-object which, for some reason doesn't have the normal endpoints, but just the hwi-endpoint. A healthy app.view_functions looks like this: ``` @@ -15,7 +15,7 @@ An unhelathy like this: Feel free to beat me for the brittle if-clause in server.py but please solve the issue in the first place for this as well :-). -## 19nd Feb 2020 - Kim +## 19nd Feb 2020 - k9ert The ApplicationFactory-pattern is not that straightforward. There are loads of pifalls and different ways to go. While finding a proper way to do it, one thing became clear: You need to separate the instantiation and the initialisation of the Application. (from singleton.py) diff --git a/docs/build-instructions.md b/docs/build-instructions.md index 014f95520..f824a1b0c 100644 --- a/docs/build-instructions.md +++ b/docs/build-instructions.md @@ -1,10 +1,10 @@ -# Context +# Build System Ideally, a software-project has a build-system and a continuous-integration-system. The build-system takes care of being able to build the artifacts on your local (developer-) machine. The continuous-integration-system takes care of using the build-system to do the same in a release-context on build-runners/-agents. This document addresses the build-system part. For the continuous-integration-part, please have a look at [continuous-integration.md](./continuous-integration.md). -# pip-packages +## pip-packages ``` # in the case of a release, the version needs to be adapted: # sed -i "s/version=\".*/version=\"$CI_COMMIT_TAG\",/" setup.py @@ -14,15 +14,15 @@ cryptoadvance.specter-vx.y.z-get-replaced-by-release-script.tar.gz ``` This process is the same for all platforms. The result unfortunately is not stable in terms of identically sh256-hashes, though. -# Electron +## Electron The electron build is assuming a node-installation. So make sure you have `node` and `npm` available. The electron-app is built in a way that it's running the `specterd` (specter-demon) internally. It's not bundled with the electron-binary but downloaded with the first start (including sha256- and gpg-verification). If someone does not want the download, he can manually choose a specterd-binary from the `preferences/Advanced` menu. Nevertheless the Electron-App is tied, at buildtime, to a specific specterd-binary via a sha256-version. This probably doesn't make so much sense if you build outside of a release but we need it anyway. -So let's cover the build of the specterd-binary first. +So let's cover the build of the specterd-binary first. Below is a manual description of the build-process. There are acripts which are doing this but they are partially optimized for the CI-system. Check the `pyinstaller/build-*` scripts for details. -## specterd Linux and MacOS +### specterd Linux and MacOS ``` cd pyinstaller @@ -36,7 +36,7 @@ pyinstaller specterd.spec ls dist ``` -## specterd Windows +### specterd Windows The windows build for specterd is quite similiar: ``` pip3 install -r requirements.txt --require-hashes @@ -48,7 +48,7 @@ rmdir /s /q .\electron\dist\ pyinstaller.exe specterd.spec ``` -## Electron Linux +### Electron Linux The prerequisite for an electron build is a successfull specterd-build above. So now we need to bake the hash and a way how to retrieve the specterd-file when the electron-app is started: ``` cd electron @@ -77,7 +77,7 @@ Fetching specter binary from the server failed, could not reach the server or th ``` So now you can open the preferences/Advanced and choose your local specterd which will get checked against the hash calculated above and copied into `~/.specter/specterd-binaries`. -## Electron MacOS +### Electron MacOS The Electron build for MacOS is a bit more complex as there is some signing involved. You can do the build via the script: ``` cd electron @@ -98,7 +98,7 @@ create-dmg 'electron/dist/mac/Specter.app' --identity="Developer ID Application: ls -l ./release/*.dmg ``` -## Electron Windows +### Electron Windows ``` cd electron call npm ci diff --git a/docs/connect-your-node.md b/docs/connect-your-node.md index 96a7cc778..1ae89de2b 100644 --- a/docs/connect-your-node.md +++ b/docs/connect-your-node.md @@ -1,16 +1,16 @@ +[TOC] # Connect to your node Specter is a very flexible tool and can be used in a lot of different setups. There are some popular setups which we want to address first. If you want to use Specter with MyNode or Raspiblitz, that might be easy but you might still want to have some guidance. Here is some awesome material to watch and study for MyNode users: * BTC Sessions [showing](https://www.youtube.com/watch?v=ZQvCncdFMPo) how to start with Specter on Mynode * Bitcoin-Magazine showing also [some things](https://www.youtube.com/watch?v=ZQvCncdFMPo) MyNode and Specter -If you want to use Specter with a node on your Windows machine: -* Ministry of Nodes [explains](https://www.youtube.com/watch?v=4koKF2MDXtk) +If you want to use Specter with a node on your Windows machine: Ministry of Nodes [explains](https://www.youtube.com/watch?v=4koKF2MDXtk) that setup. The installation on the Raspiblitz is quite simple as there is an installation option in the ssh-menu. There is also a walk-through on [how to connect the Specter Desktop App with the RaspiBlitz](https://d11n.net/connect-specter-desktor-with-raspiblitz.html). -# General thoughts +## General thoughts But let's approach the connection issue more generically. We assume here, that you want to setup everything in your local network. Every computer needs an IP address in your network. So either, Bitcoin Core is running on the same computer as Specter or on two different ones. But both should have private IP addresses - e.g. (most popular) 192.198.X.Y. For this setup, you don't need to modify your router. Also your Bitcoin Core node doesn't need to be exposed to the internet. @@ -18,7 +18,7 @@ If both are running on the same machine, there are usually a lot less potential Let's look at all the issues which can potentially occur. -# Potential connection issues +## Potential connection issues The first thing you should do if it doesn't work out of the box is explicitly configuring the connection to Bitcoin Core. For that, there are the following values to be set: * Your Bitcoin RPC username is specified in your bitcoin.conf file on the computer where Bitcoin Core is running. If you open the file, it should like this: `rpcuser=bitcoin` @@ -26,7 +26,7 @@ The first thing you should do if it doesn't work out of the box is explicitly co * Your node's IP address could simply be `http://localhost` if you're running Bitcoin Core on the same machine as Specter. Otherwise, it's, as discussed above, a local network-address starting often enough with 192.168.X.Y. * Your nodes RPC port (usually 8332) -## Connection failure +### Connection failure `Process finished with code -1Error message: Failed to connect` diff --git a/docs/contributing.md b/docs/contributing.md new file mode 100644 index 000000000..f095bd2e3 --- /dev/null +++ b/docs/contributing.md @@ -0,0 +1,12 @@ +Specter-desktop is an Open Source Project under the MIT-License and everyone is invited to contribute to it. + +We haven't created many explicit processes and rely on the best practices of Open Source projects. If you want to contribute, fork the project and create a PR. + +If it's necessary to add processes, we'll probably looking into Pieter Hintjens' [Social Architecture](https://hintjens.gitbooks.io/social-architecture/content/) and specifically the C4 process. Pieter is explicitly mentioning two roles: Contributors and maintainers. + +Thank you very much to all our [Contributors](https://github.com/cryptoadvance/specter-desktop/graphs/contributors). +See also the Contributors to each specific release in the release-notes. + +The maintainers are the ones who are able to merge PRs and create tags/releases. They are listed as "authors" in setup.py. + +For practical considerations of a dev-setup, please have a look in the [development.md](development.md). If you need support, join our [Telegram group](https://t.me/spectersupport). diff --git a/docs/daemon.md b/docs/daemon.md index b526d5bb7..32aef422a 100644 --- a/docs/daemon.md +++ b/docs/daemon.md @@ -1,6 +1,8 @@ # Running as a daemon -How to use Specter as a service - launch on boot, start and stop in the background. +How to use Specter as a service - launch on boot, start and stop in the background. This guide is for Linux-Users only. + +## Specter as a Service 1. Create a file `/lib/systemd/system/specter.service` with the following content (replace `User=myusername` to your username): ``` @@ -24,7 +26,7 @@ WantedBy=multi-user.target To stop run `sudo systemctl stop specter.service`, to restart `sudo systemctl restart specter.service` -## bitcoind as a service +## bitcoind as a Service You can do the same for `bitcoind` if you want to, then both Specter and bitcoind will start on system boot. To make bitcoind service follow the same steps, just name the service `bitcoind.service` and set `ExecStart=bitcoind` there. diff --git a/DEVELOPMENT.md b/docs/development.md similarity index 100% rename from DEVELOPMENT.md rename to docs/development.md diff --git a/docs/elements.md b/docs/elements.md index be1539fd1..526e60d49 100644 --- a/docs/elements.md +++ b/docs/elements.md @@ -1,43 +1,12 @@ # Elements/Liquid Support Since `v1.5.0`, Specter-Desktop has basic Elements/Liquid Support. You can run/connect your own elements/liquid-node, you can create Liquid-Hotwallets and even combine them to multisig-wallets. Multisig with three hotwallets is indeed not that useful, but it's a start. We're planning to also support different assets (and might even have that already) and also support for Jade and specter-DIY. -This document is a description on how to get started with elements/liquid. We'll first go into the details of setting up the node, mostly referring to external documents. Note that you have to checkout elements from source in order to get it running. The latest release `elements-0.18-1.12` is __not__ enough. - -We'll first describe how to Compile elements, how to setup a liquid-node conveniently. +This document is a description on how to get started with elements/liquid. We'll first go into the details of setting up the node, mostly referring to external documents. After that, we'll explain how to connect your Specter Desktop to that node, create wallets and receive some coins (via sideshift.ai). Signing transactions is nowhere different than in any other Hotwallet. -# Elements Compilation - -Currently you have to checkout and compile elements yourself. You'll need to checkout the master-branch. If you want to be very sure that the collaboration works, you should checkout the exact commit which specter uses when doing automatic testing. You can see that commit in this [file](../tests/elements_gitrev_pinned) (currently `1ba24fe9b3cc3ad1166ed93a0969602d0c7898ff`). - -You can checkout elements wherever you want as long as the `elementsd` and `elements-cli` will be available on the path or in the `tests/elements/src` folder. We assume here, you'll do the latter. If you have a ubuntu/debian-based linux, please check the easier way below before manually checking out: - -```sh -cd tests -git clone https://github.com/ElementsProject/elements.git -cd elements -git checkout 1ba24fe9b3cc3ad1166ed93a0969602d0c7898ff # Use the commit from the file above -``` - -The rest is very system-specific and we're referring here to the documentation in liquid: -* [free-](https://github.com/ElementsProject/elements/blob/elements-0.18.1.12/doc/build-freebsd.md)/[net-](https://github.com/ElementsProject/elements/blob/elements-0.18.1.12/doc/build-netbsd.md)/[open-](https://github.com/ElementsProject/elements/blob/elements-0.18.1.12/doc/build-openbsd.md)BSD -* [OsX](https://github.com/ElementsProject/elements/blob/elements-0.18.1.12/doc/build-osx.md) -* [Unix/Linux](https://github.com/ElementsProject/elements/blob/elements-0.18.1.12/doc/build-unix.md) -* [Windows](https://github.com/ElementsProject/elements/blob/elements-0.18.1.12/doc/build-windows.md) - -If you're running a Debian/Ubuntu-based Linux-System, you can most probably use the script which we're using internally to setup our test-system. This will include the clone/checkout above. So simply start, from the root-folder of the project: - -```sh -./tests/install_noded.sh --elements compile -``` - -Make sure that this is successfull by checking these two files to be existent: - -```sh -ls tests/elements/src/elements-cli tests/elements/src/elementsd -tests/elements/src/elements-cli tests/elements/src/elementsd -``` +# Elements Installation +The Elements's instalaation is highly dependent to your system. Choose a fitting [artifact](https://github.com/ElementsProject/elements/releases) and install them. # Liquid Node In order to validate Peg-Ins, you'll need RPC-access to your Bitcoin-Core node. I did this with a fullnode, it might also work with a pruned node (not tested, though). @@ -104,3 +73,38 @@ As an example, let'S choose sideshift.ai to swap some BTC to LBTC. ![](./images/elements/txs.png) +## Advanced stuff: Elements Compilation + +# Elements Compilation + +Since `v1.7.0`, It's no longer needed to compile Elements yourself as Specter is now working with Elements [0.21.0](https://github.com/ElementsProject/elements/releases/tag/elements-0.21.0). +However, maybe you want to compile it for some reason, so here is a quick guide on how to do that. +You'll need to checkout the master-branch. If you want to be very sure that the integration with Specter works, you should checkout the exact commit which specter uses when doing automatic testing. You can see that commit in this [file](../tests/elements_gitrev_pinned) (currently `elements-0.21.0`). + +You can checkout elements wherever you want as long as the `elementsd` and `elements-cli` will be available on the path or in the `tests/elements/src` folder. We assume here, you'll do the latter. If you have a ubuntu/debian-based linux, please check the easier way below before manually checking out: + +```sh +cd tests +git clone https://github.com/ElementsProject/elements.git +cd elements +git checkout 1ba24fe9b3cc3ad1166ed93a0969602d0c7898ff # Use the commit from the file above +``` + +The rest is very system-specific and we're referring here to the documentation in liquid: +* [free-](https://github.com/ElementsProject/elements/blob/elements-0.18.1.12/doc/build-freebsd.md)/[net-](https://github.com/ElementsProject/elements/blob/elements-0.18.1.12/doc/build-netbsd.md)/[open-](https://github.com/ElementsProject/elements/blob/elements-0.18.1.12/doc/build-openbsd.md)BSD +* [OsX](https://github.com/ElementsProject/elements/blob/elements-0.18.1.12/doc/build-osx.md) +* [Unix/Linux](https://github.com/ElementsProject/elements/blob/elements-0.18.1.12/doc/build-unix.md) +* [Windows](https://github.com/ElementsProject/elements/blob/elements-0.18.1.12/doc/build-windows.md) + +If you're running a Debian/Ubuntu-based Linux-System, you can most probably use the script which we're using internally to setup our test-system. This will include the clone/checkout above. So simply start, from the root-folder of the project: + +```sh +./tests/install_noded.sh --elements compile +``` + +Make sure that this is successfull by checking these two files to be existent: + +```sh +ls tests/elements/src/elements-cli tests/elements/src/elementsd +tests/elements/src/elements-cli tests/elements/src/elementsd +``` \ No newline at end of file diff --git a/docs/release-notes.md b/docs/release-notes.md index 1426ff62e..2dab1582c 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,3 +1,5 @@ +[TOC] + ## v1.7.1 November 05, 2021 - Bugfix: Bitcoin Core as default for fee estimation, error handling improvements #1408 (Kim Neunert) - Bugfix: fix unknown version bug in pip-installs fixes #1442 #1450 (Kim Neunert) @@ -652,47 +654,46 @@ - Docs: README updates (#164) (@moritzwietersheim) ## v0.4.0 May 31, 2020 -- #112 - Mobile friendly UI (@stepansnigirev) -- #130 - Showing transacation details while sending (@ben-kaufman) -- #232 - Being able to copy transaction instead of sending via own node (@ben-kaufman) -- #139 - User feedback for proper connection to Core in settings menu (@k9ert) -- #140 - Bugfix which blocked the use of Coldcard under certain circumstances (@ben-kaufman) -- #128 - Bugfix how funds get represented (@ben-kaufman) - +- Mobile friendly UI (#112) (@stepansnigirev) +- Showing transacation details while sending (#130) (@ben-kaufman) +- Being able to copy transaction instead of sending via own node (#232) (@ben-kaufman) +- User feedback for proper connection to Core in settings menu (#139) (@k9ert) +- Bugfix which blocked the use of Coldcard under certain circumstances (#140) (@ben-kaufman) +- Bugfix how funds get represented (#128) (@ben-kaufman) - A lot of refactorings (especially for template-logic) and tidyups. We also removed some dependencies (@ben-kaufman, @stepansnigirev) ## v0.3.0 May 11, 2020 -- #104 - QR-Code animations enable to pass more information in smaller chunks (@gorazdko) -- #108 - Renaming and Deleting wallets (@ben-kaufman) -- #95 - addresses and utxo-view for better overview of your funds (@ben-kaufman) -- #100 - Pending PSBTS for partially sign and sign with others devices much later (@ben-kaufman) -- #101 - Support Device passphrases for HWI-wallets (@ben-kaufman) -- #40 - coin selection to control which utxo you want to spend (@k9ert) -- #120 - Display Addresses on device (@ben-kaufman) -- #127 - Windows support (@stepansnigirev) +- QR-Code animations enable to pass more information in smaller chunks (#104) (@gorazdko) +- Renaming and Deleting wallets (#108) (@ben-kaufman) +- addresses and utxo-view for better overview of your funds (#95) (@ben-kaufman) +- Pending PSBTS for partially sign and sign with others devices much later (#100) (@ben-kaufman) +- Support Device passphrases for HWI-wallets (#101) (@ben-kaufman) +- coin selection to control which utxo you want to spend (#40) (@k9ert) +- Display Addresses on device (#120) (@ben-kaufman) +- Windows support (#127) (@stepansnigirev) ## v0.2.0 Mar 27, 2020 -- #94 - label addresses to get remember where coins are coming from (@ben-kaufman) -- #81 - Optional Authentication with RPC Password (@k9ert) +- label addresses to get remember where coins are coming from (#94) (@ben-kaufman) +- Optional Authentication with RPC Password (#81) (@k9ert) - Support custom block explorer for all networks (@ben-kaufman) ## v0.1.2 Mar 6, 2020 - bugfix-release (#84) ## v0.1.1 Feb 29, 2020 -- #80 - Support for compressed PSBT in QR-codes (@stepansnigirev) -- #77 - Use specter-diy to sign via USB (@stepansnigirev) +- Support for compressed PSBT in QR-codes #80 (@stepansnigirev) +- Use specter-diy to sign via USB (#77) (@stepansnigirev) ## v0.1.0 Feb 27, 2020 -- #73 - Rescan Blockchain to import older wallets easily (@stepansnigirev) +- Rescan Blockchain to import older wallets easily (#73) (@stepansnigirev) - Command-line options for server: daemon, ssl-certs and tor ## v0.0.2 Feb 20, 2020 -- #69 - First PIP-Release available on [PyPi](https://pypi.org/project/cryptoadvance.specter/#history) (@k9ert) -- #23 - HWI support enables a whole bunch of hardwarewallets to work with specter (@kdmukai) -- #19 - Tor integration (@kdmukai) -- #56 - Support for coldcard (@kdmukai) -- #64 - https support (@stepansnigirev) +- First PIP-Release available on [PyPi](https://pypi.org/project/cryptoadvance.specter/#history) (#69) (@k9ert) +- HWI support enables a whole bunch of hardwarewallets to work with specter (#23) (@kdmukai) +- Tor integration (#19) (@kdmukai) +- Support for coldcard (#56) (@kdmukai) +- https support (#64) (@stepansnigirev) ## v0.0.1-alpha Sep 28, 2019 Specter Desktop has been started by @stepansnigirev since Aug 30, 2019. diff --git a/docs/self-signed-certificates.md b/docs/self-signed-certificates.md index 60b1b4cc1..ce0235a37 100644 --- a/docs/self-signed-certificates.md +++ b/docs/self-signed-certificates.md @@ -1,4 +1,5 @@ -# Why a certificate is important +# SSL Certificate +## Why a certificate is important Browsers require secure communication with the server to use camera API. Without it we can't use QR code scanning. @@ -6,14 +7,14 @@ If you are running a VPS it's easy - you just [issue a new certificate](./revers If you are only using the node at home and want to use it from your local network and via camera, you need to run it via SSL. -# Easy solution +## Easy solution The easiest solution is to simply add `--ssl` to the serve-command and the certificate will get created automatically in the specter-home-folder. ``` python3 -m cryptoadance.specter server --ssl ``` -# Manual creation +## Manual creation A second way, which provides more customization, is to run the [`gen-certificate.sh`](gen-certificate.sh) script in this folder with your node's IP address as an argument: @@ -24,7 +25,7 @@ gen-certificate.sh It will create two files - `cert.pem` and `key.pem`. -## Bare Specter over HTTPS +### Bare Specter over HTTPS Provide these files to Specter as arguments: @@ -34,7 +35,7 @@ python -m cryptoadvance.specter server --cert=./cert.pem --key=./key.pem *Note:* Adding `--tor=your-tor-password` will create a tor hidden service with https. -## Specter with Nginx +### Specter with Nginx Assuming you copied the files to `/etc/ssl/certs` and `/etc/ssl/private` add the following lines to server config (`/etc/nginx/sites-enabled/default`): @@ -65,7 +66,7 @@ server{ } ``` -## Adding certificate to trusted +### Adding certificate to trusted With these certificates you should be able to navigate to your node using https, but you will see a scary warning. diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 000000000..94d85c0bc --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,36 @@ +site_name: Specter Desktop Documentation +site_url: https://docs.specter.solutions/desktop +repo_url: https://github.com/cryptoadvance/specter-desktop/ +nav: + - Home: + - 'Introduction': README.md + - release-notes.md + - User Guide: + - faq.md + - multisig-security-tradeoffs.md + - 'Using Tor': tor.md + - Operating Guide: + - connect-your-node.md + - daemon.md + - reverse-proxy.md + - self-signed-certificates.md + - hwibridge.md + - elements.md + - windows.md + - Development: + - 'Contributing': contributing.md + - 'Developing': development.md + - build-instructions.md + - 'Continuous Integration': continuous-integration.md + - cypress-testing.md + - 'Some Random Dev Thoughts': archblog.md + - API: + - api/README.md + - api/ep_liveness.md + - api/ep_readyness.md + - api/ep_specter.md + - api/ep_specter_fulltxlist.md + - api/ep_wallets_psbt.md + - api/ep_wallets_wallet.md +theme: + name: readthedocs \ No newline at end of file diff --git a/requirements.in b/requirements.in index 579c40905..97a0331a3 100644 --- a/requirements.in +++ b/requirements.in @@ -22,4 +22,4 @@ flask_wtf==0.14.3 pgpy==0.5.4 cbor==1.0.0 mnemonic==0.20 -cryptography==3.4.7 \ No newline at end of file +cryptography==3.4.7 diff --git a/tests/elements_gitrev_pinned b/tests/elements_gitrev_pinned index c6982dc38..c50c0dd50 100644 --- a/tests/elements_gitrev_pinned +++ b/tests/elements_gitrev_pinned @@ -1 +1 @@ -elements-0.21.0_rc2 \ No newline at end of file +elements-0.21.0 \ No newline at end of file diff --git a/tests/install_noded.sh b/tests/install_noded.sh index 8c4fbda3a..e7b24710f 100755 --- a/tests/install_noded.sh +++ b/tests/install_noded.sh @@ -151,7 +151,7 @@ function sub_help { echo "$ ./install_node.sh --bitcoin compile" echo "$ ./install_node.sh --elements compile" echo "$ ./install_node.sh binary # only works for bitcoind currently, no binaries for elements" - echo "For more context, see https://github.com/cryptoadvance/specter-desktop/blob/master/DEVELOPMENT.md#how-to-run-the-tests" + echo "For more context, see https://github.com/cryptoadvance/specter-desktop/blob/master/docs/development.md#how-to-run-the-tests" } function check_compile_prerequisites { diff --git a/tests/test_node.py b/tests/test_node.py index 6157d0875..5932b08a8 100644 --- a/tests/test_node.py +++ b/tests/test_node.py @@ -119,9 +119,4 @@ def test_Node_elm(elements_elreg): # something like: # {'version': 200100, 'subversion': '/Satoshi:0.20.1/', 'protocolversion': 70015, 'localservices': '0000000000000409', 'localservicesnames': ['NETWORK', 'WITNESS', 'NETWORK_LIMITED'], 'localrelay': True, 'timeoffset': 0, 'networkactive': True, 'connections': 0, 'networks': [{'name': 'ipv4', 'limited': False, 'reachable': True, 'proxy': '', 'proxy_randomize_credentials': False}, {'name': 'ipv6', 'limited': False, 'reachable': True, 'proxy': '', 'proxy_randomize_credentials': False}, {'name': 'onion', 'limited': True, 'reachable': False, 'proxy': '', 'proxy_randomize_credentials': False}], 'relayfee': 1e-05, 'incrementalfee': 1e-05, 'localaddresses': [{'address': '2a02:810d:d00:7700:233e:a7e:ded8:f2da', 'port': 18542, 'score': 1}, {'address': '2a02:810d:d00:7700:29ec:5c5b:196b:78b2', 'port': 18542, 'score': 1}], 'warnings': ''} assert node.network_info["connections"] == 0 - # currently: - assert ( - node.network_info["warnings"] - == "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications" - ) - # assert node.network_info["warnings"] == "" + assert node.network_info["warnings"] == "" diff --git a/utils/mkdocs-wrapper.sh b/utils/mkdocs-wrapper.sh new file mode 100755 index 000000000..03ace9f86 --- /dev/null +++ b/utils/mkdocs-wrapper.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +# This is mainly used by netlify where we're using the free starter-plan +# Checkout https://github.com/cryptoadvance/specter-desktop/pull/1463 +# for a more birds eye view of this script. + +# The nelify settings for this to work need to be: +# * Repository: github.com/cryptoadvance/specter-desktop +# * Base directory: Not set +# * Build command: ./utils/mkdocs-wrapper.sh build +# * Publish directory: site +# In the Environment Variables, you have to set: +# PYTHON_VERSION 3.8 + +# We're using mkdocs for creating the static pages +# We don't pin this dependency as this is not relevant for either testing or +# production. Therefore it's easier to simply let it upgrade automatically: +pip3 install mkdocs +# At the sime of this comment, we had: mkdocs==1.2.3 + + + +# We want the README-md file in the root-folder for people browsing github +# but we also want it for people browsing https://docs.specter.solutions/desktop +# So for the second case, we copy it there and change all the links +if [ "$1" = "build" ]; then + cp README.md docs + sed -i 's/docs\///g' docs/README.md + sed -i 's/\.\.\/README.md/README.m/g' docs/*.md + +fi + + +mkdocs $1 $2 + +# Potentially, we could rollback here the changes but that would be anoying if you want +# to edit files. \ No newline at end of file