commit effa824a4de6f09a999a578f30ba3e341d380b31
parent d6195b54ba3e3524b3792ecc0e76e14191e4eb9a
Author: Antoine A <>
Date: Wed, 23 Mar 2022 12:21:19 +0100
Improve README
Diffstat:
2 files changed, 69 insertions(+), 33 deletions(-)
diff --git a/README.md b/README.md
@@ -26,6 +26,56 @@ cd depolymerization
make install
```
+## Getting started
+
+### Dependencies
+
+Depolymerizer require:
+
+- taler-config from [Taler exchange](https://git.taler.net/exchange.git/)
+- PostgreSQL
+
+#### Bitcoin
+
+[Bitcoind](https://bitcoincore.org/) version >= 22.0 is required
+
+#### Ethereum
+
+[Geth](https://geth.ethereum.org/) version >= 1.10.0 is required
+
+### Initialization
+
+We expect you to have already have written a [configuration](#configuration) and
+that PostgreSQL and the node (bitcoind or geth) is configured and running.
+
+We will use `btc-wire` in command, but you can use `eth-wire` interchangeably to depolymerize Ethereum.
+
+If you want to use a specific configuration file, you can add `-c CONF_PATH` to every command.
+
+#### Database initialization
+
+```
+btc-wire initdb
+```
+
+#### Wallet initialization
+
+Depolymerization uses an encrypted wallet, so you need to provide a password in the environment variable `PASSWORD`.
+
+```
+btc-wire initwallet
+```
+
+You then need to update your configuration with the provided `PAYTO` config value.
+
+#### Start depolymerization
+
+```
+btc-wire
+```
+
+You also need to run the wire gateway `wire-gateway`. It can run from another user as long it can access the database and the configuration file.
+
## Configuration
The configuration is based on
@@ -75,8 +125,8 @@ following currencies are supported:
### btc-wire
-btc-wire will automatically read the bitcoin configuration file to connect to
-the RPC server. Two flags are mandatory:
+btc-wire will automatically read the bitcoin configuration file (bitcoin.conf)
+to connect to the RPC server. Two flags are mandatory:
- `txindex=1`: btc-wire needs access to transactions not linked to the wire
wallet
@@ -151,36 +201,6 @@ this automatically:
BUMP_DELAY = 0
```
-## Getting started
-
-#### btc-wire
-
-[Bitcoind](https://bitcoincore.org/) version 22.\* is required
-
-1. Write configuration files (taler.conf and bitcoin.conf)
-2. Start bitcoind
-3. Start PostgreSQL
-4. Choose wallet password
-5. Initialize database `btc-wire initdb`
-6. Initialize wallet `btc-wire initwallet`
-7. Update configuration files with wallet info
-8. Run wire-gateway `wire-gateway`
-9. Run btc-wire `btc-wire`
-
-#### eth-wire
-
-[Geth](https://geth.ethereum.org/) version 1.10.\* is required
-
-1. Write configuration files (taler.conf)
-2. Start geth
-3. Start PostgreSQL
-4. Choose account password
-5. Initialize database `eth-wire initdb`
-6. Initialize wallet `eth-wire initwallet`
-7. Update configuration files with wallet info
-8. Run wire-gateway `wire-gateway`
-9. Run eth-wire `eth-wire`
-
## Security
Depolymerizer only use an encrypted wallet and provide an easy way to create
@@ -221,7 +241,7 @@ local user PATH:
- `bitcoind` and `bitcoin-cli` from
[bitcoincore](https://bitcoincore.org/en/download/)
- `taler-config` and `taler-exchange-wire-gateway-client` from the
- [Taler exchange repository](https://git.taler.net/exchange.git/)
+ [Taler exchange ](https://git.taler.net/exchange.git/)
You can use the [prepare](script/prepare.sh) script to downloads and extract
blockchain binaries and find the path of the local postgres installation.
diff --git a/eth-wire/src/rpc_utils.rs b/eth-wire/src/rpc_utils.rs
@@ -1,3 +1,19 @@
+/*
+ This file is part of TALER
+ Copyright (C) 2022 Taler Systems SA
+
+ TALER is free software; you can redistribute it and/or modify it under the
+ terms of the GNU Affero General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License along with
+ TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+*/
+
use std::{path::PathBuf, str::FromStr};
/// Default geth data_dir <https://geth.ethereum.org/docs/install-and-build/backup-restore#data-directory>