Go to file
Alp 38e9e8fea2
Translated using Weblate (Turkish)
Currently translated at 24.4% (64 of 262 strings)

Translation: GNU Taler/webextensions
Translate-URL: http://weblate.taler.net/projects/gnu-taler/webextensions/tr/
2022-04-13 18:06:58 +02:00
.vscode reducer WIP, user error boundaries in UI 2021-10-21 13:11:33 +02:00
build-system more Makefile improvements 2022-03-08 13:14:33 +01:00
contrib wallet: t_s/d_us migration 2022-03-21 19:20:48 +01:00
debian debian changelog and devrelease fix 2021-11-26 12:55:41 -03:00
packages Translated using Weblate (Turkish) 2022-04-13 18:06:58 +02:00
vendor@38acabfa60 vendor submodule 2022-01-05 14:32:21 +01:00
.dir-locals.el Add a .dir-locals,el for configuring emacs for this project 2019-03-15 21:44:02 +01:00
.eslintrc.js added react eslint and fix most of the warns 2022-03-29 10:04:33 -03:00
.gitattributes don't distribute ./bootstrap 2020-11-13 22:32:49 +01:00
.gitignore gitignore 2022-03-28 20:27:04 +02:00
.gitlab-ci.yml missing npm install for workaround 2021-04-15 10:26:05 -03:00
.gitmodules update URL of submodule ‘build-scripts’ 2022-01-27 04:40:07 -05:00
.prettierrc add config for code formatter (prettier) 2019-06-26 15:29:59 +02:00
AUTHORS authors file 2016-02-29 18:04:08 +01:00
bootstrap remove configure first 2020-11-04 12:11:04 +01:00
CHANGELOG.md changelog 2020-11-17 18:04:25 +01:00
COPYING add license 2016-03-15 20:12:35 +01:00
INSTALL install file 2016-03-18 15:50:24 +01:00
package.json dependencies 2022-02-10 19:53:44 +01:00
pnpm-lock.yaml remove storybook, switch build to esbuild 2022-03-29 12:32:52 -03:00
pnpm-workspace.yaml modularize repo, use pnpm, improve typechecking 2020-08-03 13:01:05 +05:30
README fixing typo 2021-07-14 12:50:49 -03:00
tsconfig.build.json bump version 2021-12-16 14:10:12 +01:00

# GNU Taler Wallet

This repository contains the implementation of a wallet for GNU Taler written
in TypeScript.


## Dependencies

The following dependencies are required to build the wallet:

* python>=3.8
* nodejs>=12
* jq
* npm
* pnpm
* zip


## Installation

The CLI version of the wallet supports the normal GNU installation process.

```shell
./configure [ --prefix=$PREFIX ] && make install
```

### Compiling from Git

If you are compiling the code from git, you have to run `./bootstrap` before
running `./configure`.

### Building the WebExtension

The WebExtension can be built via the 'webextension' make target:

```shell
./configure && make webextension
```

This will create the zip file with the WebExtension in the directory

```
packages/taler-wallet-webextension/extension/
```

We also provide a `Dockerfile` for a container that can build the
WebExtension.  After you install docker, make sure the user is in group
`docker` and (re-)start the docker daemon:

```shell
# Make sure there is a docker group.
$ grep docker: /etc/group
$ sudo groupadd docker

# Make sure USER is defined and is in the docker group.
$ echo $USER
$ sudo usermod -aG docker $USER

# Restart the docker daemon.
# (This command is OS-specific.)

# Obtain a new shell.  Make sure it includes the `docker` group.
$ newgrp docker
$ id
```

Then, you can proceed with these instructions:

```shell
# Download wallet source code and unpack it
(host)$ tar -xf wallet-core-$version.tar.gz

# Build the image
(host)$ docker build --tag walletbuilder wallet-core-$version/contrib/wallet-docker

# Start the container
(host)$ docker run -dti --name walletcontainer walletbuilder /bin/bash

# Copy wallet source to container
(host)$ docker cp ./wallet-core-$version/ walletcontainer:/

# Attach to container
(host)$ docker attach walletcontainer

# Run build inside container
(container)$ cd wallet-core-$version
(container)$ ./configure && make webextension
(container)$ exit

# Copy build artefact(s) to host
(host)$ docker cp walletcontainer:/wallet-core-$version/packages/taler-wallet-webextension/extension extension
```

### Reviewing WebExtension UI examples

The WebExtension can be tested using Storybook. Using live server or building 
static html files to deploy into nginx.

To run a live server use the 'dev-view' target

```shell
make webextension-dev-view
```

A server will start, usually at http://localhost:6006/.
On the left it will have a navigation panel with examples organized in a tree view.

Stories are defined with a *.stories.tsx file [1], you are free to create new or edit
some and commit them in order to create a more complete set of examples.

[1] look for them at packages/taler-wallet-webextension/src/**/*.stories.tsx

# Integration Tests

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:

```shell
cd packages/taler-integrationtests/
./testrunner '*'
```

The test runner accepts a bash glob pattern as parameter.  Individual tests can
be run by specifying their name.

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:

```
PATH="$PWD/packages/taler-wallet-cli/bin:$PATH" \
  nyc ./packages/taler-integrationtests/testrunner '*'
```