# Cashless to E-Cash This project realizes a framework to enable withdrawal of digital cash for GNU Taler through a trusted third party. The integration addresses a report commissioned by the European Central Bank (ECB), which identified the universal acceptance as one of the most important aspects of a digital euro. This will lead to better acceptance of GNU Taler by better integrating its ecosystem into the existing systems. The following tree describes the structure of the document and a rough description of each directory ``` . ├── bruno : contains some manual http requests for the bruno rest client. ├── c2ec : contains code of the c2ec component ├── cli : contains code of the management cli ├── docs : contains the thesis ├── install : contains scripts for the installation of c2ec ├── Makefile : Makefile contains build commands for creating c2ec executable and ├── poster : containes the poster (requirement of the BFH for all their thesis projects) ├── README : this file ├── schemaspy : contains the schema of the database ├── simulation : contains code of the c2ec simulation (testing) ├── specs : contains various specifications (also old stuff) └── wallee-c2ec : contains the source code of the Wallee PayDroid app ``` ## Installation Hint: the following process can be achieved by editing the `setup` script in this repository and then executing `./setup` (if you agree with the default values, just run the script (not recommended, probably won't even work)) 1. Clone this repository 2. Define variables 2.1 C2EC_HOME: Everything that is installed here. (default: $HOME) 2.2 C2EC_USER: The user owning c2ec. (default: current user (whoami) 2.3 C2EC_POSTGRES_USER: The postgres username (user which is allowed to create schemes etc.) 2.4 C2EC_POSTGRES_PASSWORD: The postgres users password 2.5 C2EC_DB_NAME: Name of the database which shall keep the schema 2.6 C2EC_DB_ADMIN_PW: The admin password of the database user 2.7 C2EC_DB_OPERATOR_PW: Password of the operator database user 2.8 C2EC_DB_API_PW: Password of the api database user 2.9 C2EC_FILE_PERMISSIONS: The permissions of the files created during the installation (executable, config, log, etc.) 3. Execute: `make install` ## Running C2EC Execute: `.$C2EC_HOME/c2ec &` ## Managing Providers and Terminals To manage providers and terminals, use the CLI. Therefore build the CLI first and run it. It uses the same variables as the installation. 1. Execute: `make cli` 2. Run CLI: `.$C2EC_HOME/c2ec-cli` ## Testing For testing, a simulation is available which allows simulation against the C2EC component. Before running the simulation make sure to register the simulation provider (which will setup the simulation client at C2EC. Be aware, that the simulation can only be run when the production flag in the c2ec-config is set to `false`). You can setup the simulation provider and terminal using the cli (execute the following commands in the cli): 1. connect to database: `db` or set PG env variables 2. setup registration: `sim` 3. Note the terminal user id and the access token (in a password manager or similar) It's best to use the c2ec_operator user to connect to the db when using the cli. Build the simulation and run. It uses the same variables as the installation. 1. Execute: `make simulation` 2. Edit the configuration of the simulation at `$C2EC_HOME/simulation-config.yaml` 3. Restart the c2ec process `.$C2EC_HOME/c2ec &` 4. Execute: `.$C2EC_HOME/c2ec-simulation $C2EC_HOME/simulation-config.yaml`