No description
Find a file
2026-02-21 00:43:29 +01:00
.vscode wallet-core: preparations for denom families 2026-01-29 02:58:52 +01:00
build-system submodules 2024-10-17 09:41:17 +02:00
contrib make codespell happy; do not check pot files 2025-12-23 10:34:02 +09:00
packages fix broken URL validation regexp 2026-02-21 00:25:41 +01: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 using namespaces for good 2022-05-18 11:04:45 -03:00
.gitattributes don't distribute ./bootstrap 2020-11-13 22:32:49 +01:00
.gitignore harness: add test-dir option and fix peer pull 2025-04-16 17:04:01 +02:00
.gitlab-ci.yml missing npm install for workaround 2021-04-15 10:26:05 -03:00
.gitmodules Fix submodule paths 2026-02-21 00:43:29 +01:00
.prettierrc add config for code formatter (prettier) 2019-06-26 15:29:59 +02:00
API_CHANGES.md wallet-core: require canonicalized base URLs in requests 2024-05-02 14:29:34 +02:00
AUTHORS authors 2023-09-12 11:18:02 -03:00
bootstrap bootstrap: recurse submodules 2024-09-20 12:48:07 +02: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
Makefile generate signature files from gana 2025-11-08 11:48:53 +01:00
package.json better name for scripts 2025-12-15 12:20:50 -03:00
pnpm-lock.yaml first int test with browser 2026-02-10 07:44:36 -03:00
pnpm-workspace.yaml pnpm: require packages to be at least two days old 2025-11-16 18:43:48 +01:00
README codespell 2025-09-17 10:26:02 -03:00
RELEASE.md codespell 2025-09-17 10:26:02 -03:00
tsconfig.build.json build system improvements 2025-01-27 15:19:47 +01:00
tsconfig.defaults.json -comment 2026-01-28 19:35:23 +01:00

# GNU Taler Wallet & Anastasis Web UI

This repository contains the implementation of a wallet for GNU Taler written
in TypeScript and Anastasis Web UI

## Dependencies

The following dependencies are required to build the wallet:

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

Note that you can install pnpm as an unprivileged user by running

```shell
npm config set prefix $HOME/.npm-global
export PATH=$HOME.npm-global/bin:$PATH
npm install -g pnpm
```

## Preparing the repository

After running clone you should bootstrap the repository.

```shell
./bootstrap
```

## Installation

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

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

### Compiling from Git

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

## Pushing a new prebuilt version

After compiling run

```shell
make prebuilt
```

This will create a directory `prebuilt` with a git subtree, 
compile every prebuilt project, copy everything into this subtree
and create a commit with the default message mentioning from
which revision the prebuilt was created.
When the script completes the prebuilt version can should
be manually pushed.

```shell
cd prebuilt
git push
```

### 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/
```

### Installing local WebExtension

Firefox:
 - Settings
 - Add-ons
 - Manage your extension -> Debug Add-ons
 - Load temporary Add-on...
 - Look for the zip file under './packages/taler-wallet-webextension/extension/' folder

Chrome:
 - Settings
 - More tools
 - Extensions
 - Load unpacked
 - Look for the folder under './packages/taler-wallet-webextension/extension/'

You may need to use manifest v2 or v3 depending on the browser version:
https://blog.mozilla.org/addons/2022/05/18/manifest-v3-in-firefox-recap-next-steps/
https://developer.chrome.com/docs/extensions/mv3/mv2-sunset/

### Reviewing WebExtension UI examples

The WebExtension can be tested using example stories.
To run a live server use the 'dev-view' target

```shell
make webextension-dev-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

### WebExtension UI Components

Every group of component have a directory and a README.
Testing component is based in two main category:

- UI testing
- State transition testing

For UI testing, every story example will be taken as a unit test.
For State testing, every stateful component should have an `useStateComponent` function that will be tested in a \*.test.ts file.

### Testing WebExtension

After building the WebExtension look for the folder `extension`
Inside you will find v2 and v3 version referring to the manifest version being used.

Firefox users:

- Go to about:addons
- Then `debug addon` (or about:debugging#/runtime/this-firefox)
- Then `Load temporary addon...`
- Select the `taler-wallet-webextension-*.zip`

Chrome users:

- Settings -> More tools -> Extensions (or go to chrome://extensions/)
- `Load unpacked` button in the upper left
- Selected the `unpacked` folder in v2 or v3

# 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
# List available tests
taler-wallet-cli testing list-integrationtests

# Run all tests
taler-wallet-cli testing run-integrationtests 

# Run all tests matching pattern
taler-wallet-cli testing run-integrationtests $GLOB

$ Run all tests from a suite
taler-wallet-cli testing run-integrationtests --suites=wallet
```

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:

```
nyc ./packages/taler-wallet-cli/bin/taler-wallet-cli '*'
```

## Minimum required browser for WebEx

Can be found in: 
 - packages/taler-wallet-webextension/manifest-v2.json
 - packages/taler-wallet-webextension/manifest-v3.json

## Anastasis Web UI

## Building for deploy

To build the Anastasis SPA run:

```shell
make anastasis-webui
```

It will run the test suite and put everything into the dist folder under the project root (packages/anastasis-webui).
You can copy the SPA directly to work local webserver.

```shell
cp -Tr ./packages/anastasis-webui/dist/prod /var/www/html/anastasis
```

Additionally you can create a zip file with the content to upload into a web server:

```shell
make anastasis-webui-dist
```

It creates the zip file named `anastasis-webui.zip` 

## Building explored release in a container

First create a container with a base image, copy the release tar file and get inside the virtual machine.

```shell
podman pull ubuntu:24.04
podman container create --name builder ubuntu:24.04 sleep infinity
podman container start builder
podman container cp taler-wallet-v*.tar.gz builder:/root/
podman exec -it -w /root builder /bin/bash
```

Then inside the vm make sure you have the required software and follow the instruction for building.

Installing requirements

```shell
apt update && apt install -y nodejs curl vim less python3 make zip jq npm
npm install --global corepack
tar xzf taler-wallet-v*.tar.gz 
cd taler-wallet-v*/
corepack enable pnpm
pnpm --version
```