exchange/README

135 lines
4.1 KiB
Plaintext
Raw Normal View History

2015-02-06 20:27:10 +01:00
Welcome to GNU Taler
What is Taler?
==============
Taler is an electronic payment system providing the ability to pay
anonymously using digital cash. Taler consists of a network protocol
2016-03-01 15:35:04 +01:00
definition (using a RESTful API over HTTP), a Exchange (which creates
2015-02-06 20:27:10 +01:00
digital coins), a Wallet (which allows customers to manage, store and
spend digital coins), and a Merchant website which allows customers to
spend their digital coins. Naturally, each Merchant is different, but
Taler includes code examples to help Merchants integrate Taler as a
payment system.
Taler is currently developed by a worldwide group of independent free
software developers and the DECENTRALISE team at Inria Rennes. Taler
2017-10-17 14:36:58 +02:00
is free software and a GNU package (https://www.gnu.org/).
2015-02-06 20:27:10 +01:00
2017-06-06 14:03:53 +02:00
This is an alpha release with a few known bugs, lacking a few
important features, documentation, testing, performance tuning and an
external security audit. However, you can run the code and it largely
works fine. that does not work yet. This package also only includes
the Taler exchange, not the other components of the system.
2015-02-06 20:27:10 +01:00
2017-10-17 14:36:58 +02:00
Documentation about Taler can be found at https://taler.net/.
2017-06-06 14:03:53 +02:00
Our bug tracker is at https://gnunet.org/bugs/.
2015-02-06 20:27:10 +01:00
Dependencies:
=============
2016-03-01 15:35:04 +01:00
These are the direct dependencies for running a Taler exchange:
2015-02-06 20:27:10 +01:00
- GNUnet >= 0.10.2
2017-06-06 14:03:53 +02:00
- GNU libmicrohttpd >= 0.9.55
- Postgres >= 9.5
2015-02-06 20:27:10 +01:00
Project structure is currently as follows:
src/include/
-- installed headers for public APIs
src/util/
2015-01-31 15:02:04 +01:00
-- common utility functions (currency representation,
Taler-specific cryptography, Taler-specific json
support)
src/pq/
-- Postgres-specific utility functions
2016-03-01 15:35:04 +01:00
src/exchangedb/
-- Exchange database backend (with DB-specific plugins)
2015-03-28 12:34:42 +01:00
2016-03-01 15:35:04 +01:00
src/exchange/
-- taler exchange server
2015-03-28 12:34:42 +01:00
2016-03-01 15:35:04 +01:00
src/exchange-tools/
-- taler exchange helper programs
2016-03-01 15:35:04 +01:00
src/exchange-lib/
-- libtalerexchange: C API to issue HTTP requests to exchange
2017-10-17 14:36:58 +02:00
src/auditor/
-- tools to generate reports about financial performance and
to validate that the exchange has been operating correctly
src/benchmark/
-- tool to run performance measurements
Getting Started
2017-10-17 14:36:58 +02:00
===============
2016-03-01 15:35:04 +01:00
The following steps illustrate how to set up a exchange HTTP server.
They take as a stub for configuring the exchange the content of 'contrib/exchange-template/config/'.
1) Create a 'test/' directory and copy the stubs in it:
mkdir -p test/config/
2016-03-01 15:35:04 +01:00
cp exchange/contrib/exchange-template/config/* test/config/
cd test/
2016-03-01 15:35:04 +01:00
2) Create the exchange's master with the tool 'gnunet-ecc':
gnunet-ecc -g1 master.priv
2016-03-01 15:35:04 +01:00
3) Edit config/exchange-common.conf by replacing the right value on the line with the
MASTER_PUBLIC_KEY entry with the fresh generated (ASCII version of) master.priv.
This ASCII version is obtained by issuing:
gnunet-ecc -p master.priv
2016-03-01 15:35:04 +01:00
4) Generate other exchange related keys ('denomination' and 'signing' keys), by issuing:
2016-03-01 15:35:04 +01:00
taler-exchange-keyup -d `pwd` -m master.priv
5) Check with:
2016-03-01 15:35:04 +01:00
taler-exchange-keycheck -d `pwd`
2016-03-01 15:35:04 +01:00
6) A exchange needs a database to operate, so the following instructions relate to
how to set up PostgreSQL. On debian, the two packages needed are:
* postgresql
* postgresql-client
For other operating systems, please refer to the relevant documentation.
2016-03-01 15:35:04 +01:00
In this settlement, the exchange wll use a database called 'talercheck' and will
run under the username through which 'taler-exchange-httpd' is launched. Thus assuming
that this user is 'demo', we need to create a 'demo' role for postgresql and make
him the owner of 'talercheck' database.
To perform these administrative tasks we have to impersonate the 'postgres' (by default,
postgres installation assigns privileges to such a user) user, then connect to the running DBMS.
Issue the following:
su # give your root password
su - postgres
psql # this is the command-line client to the DMBS
# the following lines are SQL
CREATE USER demo;
CREATE DATABASE talercheck OWNER demo;
2015-08-04 09:58:54 +02:00
# quit with CTRL-D
7) If any previous step has been successful, it is now possbile to start up the
2016-03-01 15:35:04 +01:00
exchange web server (by default it will listen on port 4241); issue:
2016-03-01 15:35:04 +01:00
taler-exchange-httpd -d `pwd` # assuming we did not move outside of the 'test' directory