taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit e5fecdb8329454454cb5726281fe42c2265d2e61
parent e9a3151ddb602c2e0419d494661ec54e7505d9d6
Author: Antoine A <>
Date:   Wed, 12 Nov 2025 15:16:16 +0100

magnet-bank: add manual

Diffstat:
Mdepolymerization/bitcoin-manual.rst | 9++++++++-
Ataler-magnet-bank.rst | 234+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 242 insertions(+), 1 deletion(-)

diff --git a/depolymerization/bitcoin-manual.rst b/depolymerization/bitcoin-manual.rst @@ -37,6 +37,7 @@ Bitcoin Depolymerizer belongs to the Depolymerization project, and can be downlo .. code-block:: console $ git clone git://git.taler.net/depolymerization + $ cd depolymerization You will need the latest version of the rust stable toolchain: @@ -45,7 +46,13 @@ You will need the latest version of the rust stable toolchain: $ sudo apt install rustup $ rustup toolchain install stable -Navigate into the *depolymerization* local repository, and from top-level run: +And a working C toolchain: + +.. code-block:: console + + $ sudo apt install build-essential + +Then from top-level run: .. code-block:: console diff --git a/taler-magnet-bank.rst b/taler-magnet-bank.rst @@ -0,0 +1,233 @@ +.. + This file is part of GNU TALER. + Copyright (C) 2025 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 2.1, 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/> + + @author Antoine d'Aligny + + +Magnet Bank Adapter Setup Manual +################################ + +taler-magnet-bank is a Magnet Bank Taler adapter. + +In this manual, we explain how to setup an adapter. + +.. contents:: Table of Contents + :local: + +Installing Adapter +================== + +Building from source +-------------------- + +Magnet Bank Adapter belongs to the Taler Rust project, and can be downloaded via Git: + +.. code-block:: console + + $ git clone git://git.taler.net/taler-rust + $ cd taler-rust + +You will need the latest version of the rust stable toolchain: + +.. code-block:: console + + $ sudo apt install rustup + $ rustup toolchain install stable + +And a working C toolchain: + +.. code-block:: console + + $ sudo apt install build-essential + +Then from top-level run: + +.. code-block:: console + + $ ./bootstrap + +Install deb package +~~~~~~~~~~~~~~~~~~~ + +To install the adapter as a Debian/Ubuntu package with an automated secure setup and systemd services: + +.. code-block:: console + + $ cargo install cargo-deb + $ make deb + $ sudo dpkg -i target/debian/taler-magnet-bank*.deb + +If the previous steps succeeded, the ``taler-magnet-bank`` command should be found in the $PATH. + +Install binaries +~~~~~~~~~~~~~~~~ + +To install the adapter binaries and default configuration localy run: + +.. code-block:: console + + $ ./configure --prefix=$PREFIX + $ make install + +If the previous steps succeeded, the ``taler-magnet-bank`` command should be found in the $PATH. + +Adapter Setup +============= + +Using package script +-------------------- + +Database setup +~~~~~~~~~~~~~~ + +The configuration file must include a connection string that tells the adapter how it should connect to the database. The default +is: + +.. code-block:: ini + :caption: /etc/taler-magnet-bank/secrets/magnet-bank-db.secret.conf + + [magnet-bankdb-postgres] + config = postgres:///taler-magnet-bank + +If the database is run on a different host, please follow the instructions +from the PostgreSQL manual for configuring remote access. + +Assuming the configuration is correct, the following +command initializes (or upgrades) the database schema using: +You can then use a script to automate a secure database setup: + +.. code-block:: console + + $ sudo taler-magnet-bank-dbconfig + +Worker setup +~~~~~~~~~~~~ + +You will need a Magnet Bank account to sync. +Update the configuration files: + +.. code-block:: ini + :caption: /etc/taler-magnet-bank/taler-magnet-bank.conf + + [magnet-bank] + IBAN = HU59131000073585363679133532 + NAME = John Smith S.A. + +.. code-block:: ini + :caption: /etc/taler-magnet-bank/secrets/magnet-bank-worker.secret.conf + + [magnet-bank-worker] + CONSUMER_KEY = $CONSUMER_KEY + CONSUMER_SECRET = $CONSUMER_SECRET + +And finaly run the setup process: + +.. code-block:: console + + $ sudo -u taler-magnet-bank-worker taler-magnet-bank -c /etc/taler-magnet-bank/taler-magnet-bank.conf setup + +Server setup +~~~~~~~~~~~~ + +Update the configuration files: + +.. code-block:: ini + :caption: /etc/taler-magnet-bank/conf.d/magnet-bank-httpd.conf + + [magnet-bank-httpd-wire-gateway-api] + ENABLED = YES + +.. code-block:: ini + :caption: /etc/taler-magnet-bank/secrets/magnet-bank-httpd.secret.conf + + [magnet-bank-httpd-wire-gateway-api + AUTH_METHOD = bearer + TOKEN = $SECRET_TOKEN + +Check the server is correctly configured: + +.. code-block:: console + + $ sudo -u taler-magnet-bank-httpd taler-magnet-bank -c /etc/taler-magnet-bank/taler-magnet-bank.conf serve --check + +Simple setup +------------ + +Database setup +~~~~~~~~~~~~~~ + +The configuration file must include a connection string that tells the adapter how it should connect to the database. The default +is: + +.. code-block:: ini + :caption: $CONFIG_FILE + + [magnet-bankdb-postgres] + config = postgres:///taler-magnet-bank + +You must make sure that this database exists and is accessible to the user +running the adapter before continuing. If the database is run on a different host, please follow the instructions from the PostgreSQL manual for configuring remote access. + +Assuming that the configuration file exists at ``$CONFIG_FILE``, the following +command initializes (or upgrades) the database schema: + +.. code-block:: console + + $ taler-magnet-bank -c "$CONFIG_FILE" dbinit + +Update the configuration files: + +.. code-block:: ini + :caption: $CONFIG_FILE + + [magnet-bank] + IBAN = HU59131000073585363679133532 + NAME = John Smith S.A. + + [magnet-bank-worker] + CONSUMER_KEY = $CONSUMER_KEY + CONSUMER_SECRET = $CONSUMER_SECRET + +And finaly run the setup process: + +.. code-block:: console + + $ taler-magnet-bank -c "$CONFIG_FILE" setup + +Server setup +~~~~~~~~~~~~ + +Update the configuration files: + +.. code-block:: ini + :caption: $CONF_FILE + + [magnet-bank-httpd-wire-gateway-api] + ENABLED = YES + AUTH_METHOD = bearer + TOKEN = $SECRET_TOKEN + +Check the server is correctly configured: + +.. code-block:: console + + $ taler-magnet-bank -c "$CONF_FILE" serve --check + +Deployment +========== + +.. code-block:: console + + $ sudo systemctl start taler-magnet-bank.target +\ No newline at end of file