2020-11-16 16:51:09 +01:00
|
|
|
# GNU Taler Wallet
|
2016-04-08 15:20:05 +02:00
|
|
|
|
2020-08-10 13:32:08 +02:00
|
|
|
This repository contains the implementation of a wallet for GNU Taler written
|
|
|
|
in TypeScript.
|
2016-04-08 15:20:05 +02:00
|
|
|
|
2015-11-25 20:41:31 +01:00
|
|
|
|
2020-11-16 16:51:09 +01:00
|
|
|
## Dependencies
|
2020-11-04 14:16:28 +01:00
|
|
|
|
2020-11-25 16:30:31 +01:00
|
|
|
The following dependencies are required to build the wallet:
|
|
|
|
|
|
|
|
* python>=3.8
|
|
|
|
* nodejs>=12
|
|
|
|
* jq
|
|
|
|
* npm
|
|
|
|
* pnpm
|
|
|
|
* zip
|
2020-11-04 14:16:28 +01:00
|
|
|
|
|
|
|
|
2020-11-16 16:51:09 +01:00
|
|
|
## Installation
|
2016-03-18 15:47:17 +01:00
|
|
|
|
2020-11-16 16:51:09 +01:00
|
|
|
The CLI version of the wallet supports the normal GNU installation process.
|
2019-10-02 23:25:19 +02:00
|
|
|
|
2020-11-16 16:51:09 +01:00
|
|
|
```shell
|
|
|
|
./configure [ --prefix=$PREFIX ] && make install
|
|
|
|
```
|
2019-08-19 13:29:59 +02:00
|
|
|
|
2020-11-16 16:51:09 +01:00
|
|
|
### Building the WebExtension
|
2020-11-04 14:16:28 +01:00
|
|
|
|
|
|
|
The WebExtension can be built via the 'webextension' make target:
|
|
|
|
|
2020-11-16 16:51:09 +01:00
|
|
|
```shell
|
|
|
|
./configure && make webextension
|
|
|
|
```
|
2020-11-04 14:16:28 +01:00
|
|
|
|
2020-11-25 18:27:58 +01:00
|
|
|
This will create the zip file with the WebExtension in the directory
|
2020-11-04 14:16:28 +01:00
|
|
|
|
2020-11-16 16:51:09 +01:00
|
|
|
```
|
2020-11-25 18:27:58 +01:00
|
|
|
packages/taler-wallet-webextension/extension/
|
2020-11-16 16:51:09 +01:00
|
|
|
```
|
|
|
|
|
2020-11-25 16:30:31 +01:00
|
|
|
We also provide a `Dockerfile` for a container that can build the WebExtension:
|
|
|
|
|
|
|
|
```shell
|
2020-11-25 18:27:58 +01:00
|
|
|
# Download wallet source code and unpack it
|
|
|
|
(host)$ tar -xf wallet-core-$version.tar.gz
|
|
|
|
|
2020-11-25 16:30:31 +01:00
|
|
|
# Build the image
|
2020-11-25 18:27:58 +01:00
|
|
|
(host)$ docker build --tag walletbuilder wallet-core-$version/contrib/wallet-docker
|
|
|
|
|
|
|
|
# Start the container
|
|
|
|
(host)$ docker run -dti --name walletcontainer walletbuilder /bin/bash
|
2020-11-25 16:30:31 +01:00
|
|
|
|
2020-11-25 18:27:58 +01:00
|
|
|
# Copy wallet source to container
|
|
|
|
(host)$ docker cp ./wallet-core-$version/ walletcontainer:/
|
|
|
|
|
|
|
|
# Attach to container
|
|
|
|
(host)$ docker attach walletcontainer
|
2020-11-25 16:30:31 +01:00
|
|
|
|
|
|
|
# Run build inside container
|
2020-11-25 18:27:58 +01:00
|
|
|
(container)$ cd wallet-core-$version
|
2020-11-25 16:30:31 +01:00
|
|
|
(container)$ ./configure && make webextension
|
2020-11-25 18:27:58 +01:00
|
|
|
(container)$ exit
|
|
|
|
|
|
|
|
# Copy build artefact(s) to host
|
|
|
|
(host)$ docker cp walletcontainer:/wallet-core-$version/packages/taler-wallet-webextension/extension extension
|
2020-11-25 16:30:31 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2020-11-16 16:51:09 +01:00
|
|
|
### Compiling from Git
|
2020-11-04 14:16:28 +01:00
|
|
|
|
2020-11-16 16:51:09 +01:00
|
|
|
If you are compiling the code from git, you have to run `./bootstrap` before
|
|
|
|
running `./configure`.
|
2020-11-04 14:16:28 +01:00
|
|
|
|
2020-11-16 16:51:09 +01:00
|
|
|
|
|
|
|
# Integration Tests
|
2016-04-08 15:20:05 +02:00
|
|
|
|
2020-08-10 13:32:08 +02:00
|
|
|
This repository comes with integration tests for GNU Taler. To run them,
|
|
|
|
install the wallet first. Then use the test runner from the
|
|
|
|
taler-integrationtests package:
|
2016-03-18 15:47:17 +01:00
|
|
|
|
2020-11-16 16:51:09 +01:00
|
|
|
```shell
|
|
|
|
cd packages/taler-integrationtests/
|
|
|
|
./testrunner '*'
|
|
|
|
```
|
2016-03-18 15:47:17 +01:00
|
|
|
|
2020-08-10 13:32:08 +02:00
|
|
|
The test runner accepts a bash glob pattern as parameter. Individual tests can
|
|
|
|
be run by specifying their name.
|
2020-09-04 10:43:56 +02:00
|
|
|
|
|
|
|
To check coverage, use nyc from the root of the repository and make sure that the taler-wallet-cli
|
|
|
|
from the source tree is executed, and not the globally installed one:
|
|
|
|
|
2020-11-16 16:51:09 +01:00
|
|
|
```
|
|
|
|
PATH="$PWD/packages/taler-wallet-cli/bin:$PATH" \
|
|
|
|
nyc ./packages/taler-integrationtests/testrunner '*'
|
|
|
|
```
|