aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/taler-config-lib/README.md3
-rw-r--r--packages/taler-config-lib/package.json40
-rw-r--r--packages/taler-config-lib/src/index.node.ts3
-rw-r--r--packages/taler-config-lib/tsconfig.json27
-rw-r--r--packages/taler-util/src/clk.test.ts7
-rw-r--r--packages/taler-wallet-cli/package.json1
-rw-r--r--packages/taler-wallet-cli/rollup.config.js1
-rw-r--r--packages/taler-wallet-cli/src/harness/harness.ts4
-rw-r--r--packages/taler-wallet-cli/src/harness/libeufin-apis.ts131
-rw-r--r--packages/taler-wallet-cli/src/index.ts3
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-bank-api.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-exchange-timetravel.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-bankaccount.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-bankconnection.ts9
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-facade-bad-request.ts14
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-facade.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-permissions.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-sandbox-camt.ts37
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-sandbox-transactions.ts36
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-scheduling.ts9
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-users.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-bad-gateway.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-basic.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-c5x.ts11
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-keyrotation.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-nexus-balance.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund-multiple-users.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-sandbox-wire-transfer-cli.ts47
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-merchant-exchange-confusion.ts48
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-merchant-instances-delete.ts3
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-merchant-instances-urls.ts3
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-merchant-instances.ts3
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-merchant-longpolling.ts3
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-merchant-refund-api.ts3
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-pay-paid.ts13
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-payment-fault.ts4
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-payment-multiple.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-payment-transient.ts6
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-paywall-flow.ts16
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-revocation.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-timetravel-autorefresh.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-basic.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-doublespend.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/testrunner.ts2
-rw-r--r--packages/taler-wallet-cli/tsconfig.json2
-rw-r--r--packages/taler-wallet-core/package.json19
-rw-r--r--packages/taler-wallet-core/src/headless/NodeHttpLib.ts4
-rw-r--r--packages/taler-wallet-core/src/headless/helpers.ts2
-rw-r--r--packages/taler-wallet-core/src/index.ts1
-rw-r--r--packages/taler-wallet-core/tsconfig.json2
-rw-r--r--packages/taler-wallet-embedded/package.json1
-rw-r--r--packages/taler-wallet-embedded/tsconfig.json2
55 files changed, 252 insertions, 306 deletions
diff --git a/packages/taler-config-lib/README.md b/packages/taler-config-lib/README.md
deleted file mode 100644
index b6464a55f..000000000
--- a/packages/taler-config-lib/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# @gnu-taler/taler-config-lib
-
-This package deploys Taler according to TypeScript instructions.
diff --git a/packages/taler-config-lib/package.json b/packages/taler-config-lib/package.json
deleted file mode 100644
index cbf10e5c9..000000000
--- a/packages/taler-config-lib/package.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "@gnu-taler/taler-config-lib",
- "version": "0.9.0-dev.1",
- "description": "GNU Taler Configuration engine.",
- "module": "./lib/index.node.js",
- "main": "./lib/index.node.js",
- "type": "commonjs",
- "types": "./lib/index.node.d.ts",
- "typesVersions": {
- "*": {
- "lib/index.node.d.ts": [
- "lib/index.node.d.ts"
- ],
- "src/*": [],
- "*": []
- }
- },
- "author": "MS",
- "license": "AGPL-3.0-or-later",
- "private": false,
- "scripts": {
- "prepare": "tsc",
- "compile": "tsc",
- "clean": "rimraf dist lib tsconfig.tsbuildinfo",
- "pretty": "prettier --write src"
- },
- "devDependencies": {
- "@types/node": "^18.8.5",
- "ava": "^4.3.3",
- "esbuild": "^0.14.21",
- "prettier": "^2.5.1",
- "rimraf": "^3.0.2",
- "typescript": "^4.8.4"
- },
- "dependencies": {
- "big-integer": "^1.6.51",
- "jed": "^1.1.1",
- "tslib": "^2.4.0"
- }
-}
diff --git a/packages/taler-config-lib/src/index.node.ts b/packages/taler-config-lib/src/index.node.ts
deleted file mode 100644
index 366e365c2..000000000
--- a/packages/taler-config-lib/src/index.node.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = function(subject: any) {
- console.log("Hello, World!");
-};
diff --git a/packages/taler-config-lib/tsconfig.json b/packages/taler-config-lib/tsconfig.json
deleted file mode 100644
index 30cb65e1d..000000000
--- a/packages/taler-config-lib/tsconfig.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "compileOnSave": true,
- "compilerOptions": {
- "composite": true,
- "declaration": true,
- "declarationMap": false,
- "target": "ES6",
- "module": "ESNext",
- "moduleResolution": "node",
- "sourceMap": true,
- "lib": ["es6"],
- "types": ["node"],
- "noImplicitReturns": true,
- "noFallthroughCasesInSwitch": true,
- "strict": true,
- "strictPropertyInitialization": false,
- "outDir": "lib",
- "noImplicitAny": true,
- "noImplicitThis": true,
- "incremental": true,
- "esModuleInterop": true,
- "importHelpers": true,
- "rootDir": "./src",
- "typeRoots": ["./node_modules/@types"]
- },
- "include": ["src/**/*"]
-}
diff --git a/packages/taler-util/src/clk.test.ts b/packages/taler-util/src/clk.test.ts
index bec93947b..9077f07de 100644
--- a/packages/taler-util/src/clk.test.ts
+++ b/packages/taler-util/src/clk.test.ts
@@ -20,13 +20,6 @@
import test from "ava";
import { clk } from "./clk.js";
-import {
- Codec,
- buildCodecForObject,
- codecForConstString,
- codecForString,
- buildCodecForUnion,
-} from "./codec.js";
test("bla", (t) => {
const prog = clk.program("foo", {
diff --git a/packages/taler-wallet-cli/package.json b/packages/taler-wallet-cli/package.json
index 97c5a8e19..ac1ff4ef5 100644
--- a/packages/taler-wallet-cli/package.json
+++ b/packages/taler-wallet-cli/package.json
@@ -15,6 +15,7 @@
"bin": {
"taler-wallet-cli": "./bin/taler-wallet-cli"
},
+ "type": "module",
"scripts": {
"prepare": "tsc && rollup -c",
"compile": "tsc && rollup -c",
diff --git a/packages/taler-wallet-cli/rollup.config.js b/packages/taler-wallet-cli/rollup.config.js
index eba9fd54d..d9ca132b7 100644
--- a/packages/taler-wallet-cli/rollup.config.js
+++ b/packages/taler-wallet-cli/rollup.config.js
@@ -31,6 +31,7 @@ export default {
plugins: [
replace({
__VERSION__: `"${printedVersion}"`,
+ preventAssignment: true,
}),
nodeResolve({
diff --git a/packages/taler-wallet-cli/src/harness/harness.ts b/packages/taler-wallet-cli/src/harness/harness.ts
index eac55281b..a5b519ec3 100644
--- a/packages/taler-wallet-cli/src/harness/harness.ts
+++ b/packages/taler-wallet-cli/src/harness/harness.ts
@@ -55,7 +55,7 @@ import {
WalletCoreApiClient,
} from "@gnu-taler/taler-wallet-core";
import { deepStrictEqual } from "assert";
-import axios, { AxiosError } from "axios";
+import axiosImp, { AxiosError } from "axios";
import { ChildProcess, spawn } from "child_process";
import * as fs from "fs";
import * as http from "http";
@@ -79,6 +79,8 @@ import {
const exec = util.promisify(require("child_process").exec);
+const axios = axiosImp.default;
+
export async function delayMs(ms: number): Promise<void> {
return new Promise((resolve, reject) => {
setTimeout(() => resolve(), ms);
diff --git a/packages/taler-wallet-cli/src/harness/libeufin-apis.ts b/packages/taler-wallet-cli/src/harness/libeufin-apis.ts
index 13d27c467..538d8e93f 100644
--- a/packages/taler-wallet-cli/src/harness/libeufin-apis.ts
+++ b/packages/taler-wallet-cli/src/harness/libeufin-apis.ts
@@ -1,4 +1,3 @@
-
/**
* This file defines most of the API calls offered
* by Nexus and Sandbox. They don't have state,
@@ -6,8 +5,8 @@
* the services get actually started and managed.
*/
-
-import axios from "axios";
+import axiosImp from "axios";
+const axios = axiosImp.default;
import { URL } from "@gnu-taler/taler-util";
export interface LibeufinSandboxServiceInterface {
@@ -80,7 +79,6 @@ export interface PostNexusPermissionRequest {
};
}
-
export interface CreateAnastasisFacadeRequest {
name: string;
connectionName: string;
@@ -135,7 +133,6 @@ export interface SimulateIncomingTransactionRequest {
amount: string;
}
-
export interface CreateEbicsBankAccountRequest {
subscriber: {
hostID: string;
@@ -171,7 +168,6 @@ function getRandomString(): string {
}
export namespace LibeufinSandboxApi {
-
/**
* Return balance and payto-address of 'accountLabel'.
* Note: the demobank serving the request is hard-coded
@@ -182,14 +178,17 @@ export namespace LibeufinSandboxApi {
username: string,
password: string,
libeufinSandboxService: LibeufinSandboxServiceInterface,
- accountLabel: string
+ accountLabel: string,
) {
- let url = new URL(`accounts/${accountLabel}`,libeufinSandboxService.baseUrl);
+ let url = new URL(
+ `accounts/${accountLabel}`,
+ libeufinSandboxService.baseUrl,
+ );
return await axios.get(url.href, {
auth: {
username: username,
- password: password
- }
+ password: password,
+ },
});
}
@@ -199,10 +198,10 @@ export namespace LibeufinSandboxApi {
password: string,
libeufinSandboxService: LibeufinSandboxServiceInterface,
) {
- let url = new URL("testing/register", libeufinSandboxService.baseUrl);
+ let url = new URL("testing/register", libeufinSandboxService.baseUrl);
await axios.post(url.href, {
username: username,
- password: password
+ password: password,
});
}
@@ -215,17 +214,21 @@ export namespace LibeufinSandboxApi {
) {
// baseUrl should already be pointed to one demobank.
let url = new URL("ebics/subscribers", libeufinSandboxService.baseUrl);
- await axios.post(url.href, {
- userID: req.userID,
- hostID: req.hostID,
- partnerID: req.partnerID,
- demobankAccountLabel: demobankAccountLabel,
- }, {
- auth: {
- username: "admin",
- password: "secret",
+ await axios.post(
+ url.href,
+ {
+ userID: req.userID,
+ hostID: req.hostID,
+ partnerID: req.partnerID,
+ demobankAccountLabel: demobankAccountLabel,
},
- });
+ {
+ auth: {
+ username: "admin",
+ password: "secret",
+ },
+ },
+ );
}
export async function rotateKeys(
@@ -234,12 +237,16 @@ export namespace LibeufinSandboxApi {
) {
const baseUrl = libeufinSandboxService.baseUrl;
let url = new URL(`admin/ebics/hosts/${hostID}/rotate-keys`, baseUrl);
- await axios.post(url.href, {}, {
- auth: {
- username: "admin",
- password: "secret",
+ await axios.post(
+ url.href,
+ {},
+ {
+ auth: {
+ username: "admin",
+ password: "secret",
+ },
},
- });
+ );
}
export async function createEbicsHost(
libeufinSandboxService: LibeufinSandboxServiceInterface,
@@ -247,16 +254,19 @@ export namespace LibeufinSandboxApi {
) {
const baseUrl = libeufinSandboxService.baseUrl;
let url = new URL("admin/ebics/hosts", baseUrl);
- await axios.post(url.href, {
- hostID,
- ebicsVersion: "2.5",
- },
- {
- auth: {
- username: "admin",
- password: "secret",
+ await axios.post(
+ url.href,
+ {
+ hostID,
+ ebicsVersion: "2.5",
},
- });
+ {
+ auth: {
+ username: "admin",
+ password: "secret",
+ },
+ },
+ );
}
export async function createBankAccount(
@@ -347,16 +357,19 @@ export namespace LibeufinSandboxApi {
): Promise<any> {
const baseUrl = libeufinSandboxService.baseUrl;
let url = new URL("admin/payments/camt", baseUrl);
- return await axios.post(url.href, {
- bankaccount: accountLabel,
- type: 53,
- },
- {
- auth: {
- username: "admin",
- password: "secret",
+ return await axios.post(
+ url.href,
+ {
+ bankaccount: accountLabel,
+ type: 53,
},
- });
+ {
+ auth: {
+ username: "admin",
+ password: "secret",
+ },
+ },
+ );
}
export async function getAccountInfoWithBalance(
@@ -364,10 +377,7 @@ export namespace LibeufinSandboxApi {
accountLabel: string,
): Promise<any> {
const baseUrl = libeufinSandboxService.baseUrl;
- let url = new URL(
- `admin/bank-accounts/${accountLabel}`,
- baseUrl,
- );
+ let url = new URL(`admin/bank-accounts/${accountLabel}`, baseUrl);
return await axios.get(url.href, {
auth: {
username: "admin",
@@ -439,22 +449,15 @@ export namespace LibeufinNexusApi {
accountName: string,
): Promise<any> {
const baseUrl = libeufinNexusService.baseUrl;
- let url = new URL(
- `bank-accounts/${accountName}`,
- baseUrl,
- );
- return await axios.get(
- url.href,
- {
- auth: {
- username: "admin",
- password: "test",
- },
+ let url = new URL(`bank-accounts/${accountName}`, baseUrl);
+ return await axios.get(url.href, {
+ auth: {
+ username: "admin",
+ password: "test",
},
- );
+ });
}
-
export async function submitInitiatedPayment(
libeufinNexusService: LibeufinNexusServiceInterface,
accountName: string,
@@ -582,7 +585,8 @@ export namespace LibeufinNexusApi {
password: string = "test",
): Promise<any> {
let url = new URL("history/incoming", anastasisBaseUrl);
- let response = await axios.get(url.href, { params: params,
+ let response = await axios.get(url.href, {
+ params: params,
auth: {
username: username,
password: password,
@@ -854,4 +858,3 @@ export namespace LibeufinNexusApi {
);
}
}
-
diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts
index 09ab414ac..6ae78bd47 100644
--- a/packages/taler-wallet-cli/src/index.ts
+++ b/packages/taler-wallet-cli/src/index.ts
@@ -59,7 +59,7 @@ import {
WalletCoreApiClient,
walletCoreDebugFlags,
} from "@gnu-taler/taler-wallet-core";
-import type { TalerCryptoInterface } from "@gnu-taler/taler-wallet-core/src/crypto/cryptoImplementation";
+import type { TalerCryptoInterface } from "@gnu-taler/taler-wallet-core";
import { TextDecoder, TextEncoder } from "util";
import { runBench1 } from "./bench1.js";
import { runBench2 } from "./bench2.js";
@@ -68,7 +68,6 @@ import { runEnv1 } from "./env1.js";
import { GlobalTestState, runTestWithState } from "./harness/harness.js";
import { getTestInfo, runTests } from "./integrationtests/testrunner.js";
import { lintExchangeDeployment } from "./lint.js";
-import { checkLogicInvariant } from "@gnu-taler/taler-wallet-core/src/util/invariants.js";
// @ts-ignore
global.TextEncoder = TextEncoder;
// @ts-ignore
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-bank-api.ts b/packages/taler-wallet-cli/src/integrationtests/test-bank-api.ts
index ab7ea1132..c7a23d3ce 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-bank-api.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-bank-api.ts
@@ -27,7 +27,7 @@ import {
getPayto,
} from "../harness/harness.js";
import { createEddsaKeyPair, encodeCrock } from "@gnu-taler/taler-util";
-import { defaultCoinConfig } from "../harness/denomStructures";
+import { defaultCoinConfig } from "../harness/denomStructures.js";
import {
BankApi,
BankAccessApi,
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-exchange-timetravel.ts b/packages/taler-wallet-cli/src/integrationtests/test-exchange-timetravel.ts
index e2b81ee6a..074126e9f 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-exchange-timetravel.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-exchange-timetravel.ts
@@ -28,7 +28,7 @@ import {
NodeHttpLib,
readSuccessResponseJsonOrThrow,
} from "@gnu-taler/taler-wallet-core";
-import { makeNoFeeCoinConfig } from "../harness/denomStructures";
+import { makeNoFeeCoinConfig } from "../harness/denomStructures.js";
import {
BankService,
ExchangeService,
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-bankaccount.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-bankaccount.ts
index cb57c7d0a..26fecd77e 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-bankaccount.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-bankaccount.ts
@@ -25,7 +25,7 @@ import {
LibeufinSandboxService,
LibeufinSandboxApi,
findNexusPayment,
-} from "../harness/libeufin";
+} from "../harness/libeufin.js";
/**
* Run basic test with LibEuFin.
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-bankconnection.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-bankconnection.ts
index f1d507c03..912b7b2ac 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-bankconnection.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-bankconnection.ts
@@ -18,14 +18,7 @@
* Imports.
*/
import { GlobalTestState } from "../harness/harness.js";
-import {
- NexusUserBundle,
- LibeufinNexusApi,
- LibeufinNexusService,
- LibeufinSandboxService,
- LibeufinSandboxApi,
- findNexusPayment,
-} from "../harness/libeufin";
+import { LibeufinNexusApi, LibeufinNexusService } from "../harness/libeufin.js";
/**
* Run basic test with LibEuFin.
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-facade-bad-request.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-facade-bad-request.ts
index b106cf304..a1da9e0da 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-facade-bad-request.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-facade-bad-request.ts
@@ -17,18 +17,18 @@
/**
* Imports.
*/
-import axios from "axios";
import { URL } from "@gnu-taler/taler-util";
+import axiosImp from "axios";
import { GlobalTestState } from "../harness/harness.js";
import {
- SandboxUserBundle,
- NexusUserBundle,
launchLibeufinServices,
- LibeufinNexusApi,
-} from "../harness/libeufin";
+ NexusUserBundle,
+ SandboxUserBundle,
+} from "../harness/libeufin.js";
-export async function runLibeufinApiFacadeBadRequestTest(t: GlobalTestState) {
+const axios = axiosImp.default;
+export async function runLibeufinApiFacadeBadRequestTest(t: GlobalTestState) {
/**
* User saltetd "01"
*/
@@ -37,7 +37,7 @@ export async function runLibeufinApiFacadeBadRequestTest(t: GlobalTestState) {
"http://localhost:5010/ebicsweb",
);
const user01sandbox = new SandboxUserBundle("01");
-
+
/**
* Launch Sandbox and Nexus.
*/
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-facade.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-facade.ts
index c49d49712..946c565d4 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-facade.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-facade.ts
@@ -23,7 +23,7 @@ import {
NexusUserBundle,
launchLibeufinServices,
LibeufinNexusApi,
-} from "../harness/libeufin";
+} from "../harness/libeufin.js";
/**
* Run basic test with LibEuFin.
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-permissions.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-permissions.ts
index e64f459a0..f8f2d7d80 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-permissions.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-permissions.ts
@@ -22,7 +22,7 @@ import {
NexusUserBundle,
LibeufinNexusApi,
LibeufinNexusService,
-} from "../harness/libeufin";
+} from "../harness/libeufin.js";
/**
* Run basic test with LibEuFin.
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-sandbox-camt.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-sandbox-camt.ts
index 3e0acb62d..250d17d3d 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-sandbox-camt.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-sandbox-camt.ts
@@ -19,19 +19,14 @@
*/
import { GlobalTestState } from "../harness/harness.js";
import {
- NexusUserBundle,
- LibeufinNexusApi,
- LibeufinNexusService,
- LibeufinSandboxService,
LibeufinSandboxApi,
- findNexusPayment,
-} from "../harness/libeufin";
+ LibeufinSandboxService,
+} from "../harness/libeufin.js";
// This test only checks that LibEuFin doesn't fail when
// it generates Camt statements - no assertions take place.
// Furthermore, it prints the Camt.053 being generated.
export async function runLibeufinApiSandboxCamtTest(t: GlobalTestState) {
-
const sandbox = await LibeufinSandboxService.create(t, {
httpPort: 5012,
databaseJdbcUri: `jdbc:sqlite:${t.testDir}/libeufin-sandbox.sqlite3`,
@@ -50,10 +45,30 @@ export async function runLibeufinApiSandboxCamtTest(t: GlobalTestState) {
name: "Mock Name",
label: "mock-account-1",
});
- await sandbox.makeTransaction("mock-account-0", "mock-account-1", "EUR:1", "+1");
- await sandbox.makeTransaction("mock-account-0", "mock-account-1", "EUR:1", "+1");
- await sandbox.makeTransaction("mock-account-0", "mock-account-1", "EUR:1", "+1");
- await sandbox.makeTransaction("mock-account-1", "mock-account-0", "EUR:5", "minus 5");
+ await sandbox.makeTransaction(
+ "mock-account-0",
+ "mock-account-1",
+ "EUR:1",
+ "+1",
+ );
+ await sandbox.makeTransaction(
+ "mock-account-0",
+ "mock-account-1",
+ "EUR:1",
+ "+1",
+ );
+ await sandbox.makeTransaction(
+ "mock-account-0",
+ "mock-account-1",
+ "EUR:1",
+ "+1",
+ );
+ await sandbox.makeTransaction(
+ "mock-account-1",
+ "mock-account-0",
+ "EUR:5",
+ "minus 5",
+ );
await sandbox.c53tick();
let ret = await LibeufinSandboxApi.getCamt053(sandbox, "mock-account-1");
console.log(ret);
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-sandbox-transactions.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-sandbox-transactions.ts
index 859d26f00..224c45970 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-sandbox-transactions.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-sandbox-transactions.ts
@@ -19,16 +19,13 @@
*/
import { GlobalTestState } from "../harness/harness.js";
import {
- NexusUserBundle,
- LibeufinNexusApi,
- LibeufinNexusService,
- LibeufinSandboxService,
LibeufinSandboxApi,
- findNexusPayment,
-} from "../harness/libeufin";
-
-export async function runLibeufinApiSandboxTransactionsTest(t: GlobalTestState) {
+ LibeufinSandboxService,
+} from "../harness/libeufin.js";
+export async function runLibeufinApiSandboxTransactionsTest(
+ t: GlobalTestState,
+) {
const sandbox = await LibeufinSandboxService.create(t, {
httpPort: 5012,
databaseJdbcUri: `jdbc:sqlite:${t.testDir}/libeufin-sandbox.sqlite3`,
@@ -42,30 +39,31 @@ export async function runLibeufinApiSandboxTransactionsTest(t: GlobalTestState)
label: "mock-account",
});
await LibeufinSandboxApi.simulateIncomingTransaction(
- sandbox,
+ sandbox,
"mock-account",
{
-
debtorIban: "DE84500105176881385584",
debtorBic: "BELADEBEXXX",
debtorName: "mock2",
subject: "mock subject",
- amount: "1" // EUR is default.
- }
- )
+ amount: "1", // EUR is default.
+ },
+ );
await LibeufinSandboxApi.simulateIncomingTransaction(
- sandbox,
+ sandbox,
"mock-account",
{
-
debtorIban: "DE84500105176881385584",
debtorBic: "BELADEBEXXX",
debtorName: "mock2",
subject: "mock subject 2",
- amount: "1.1" // EUR is default.
- }
- )
- let ret = await LibeufinSandboxApi.getAccountInfoWithBalance(sandbox, "mock-account");
+ amount: "1.1", // EUR is default.
+ },
+ );
+ let ret = await LibeufinSandboxApi.getAccountInfoWithBalance(
+ sandbox,
+ "mock-account",
+ );
t.assertAmountEquals(ret.data.balance, "EUR:2.1");
}
runLibeufinApiSandboxTransactionsTest.suites = ["libeufin"];
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-scheduling.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-scheduling.ts
index 3863c5711..95f4bfaa0 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-scheduling.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-scheduling.ts
@@ -17,15 +17,14 @@
/**
* Imports.
*/
-import { GlobalTestState, setupDb } from "../harness/harness.js";
+import { GlobalTestState } from "../harness/harness.js";
import {
- SandboxUserBundle,
- NexusUserBundle,
launchLibeufinServices,
- LibeufinSandboxApi,
LibeufinNexusApi,
LibeufinNexusService,
-} from "../harness/libeufin";
+ NexusUserBundle,
+ SandboxUserBundle,
+} from "../harness/libeufin.js";
/**
* Test Nexus scheduling API. It creates a task, check whether it shows
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-users.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-users.ts
index edf66690b..bc3103c7e 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-users.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-users.ts
@@ -18,7 +18,7 @@
* Imports.
*/
import { GlobalTestState } from "../harness/harness.js";
-import { LibeufinNexusApi, LibeufinNexusService } from "../harness/libeufin";
+import { LibeufinNexusApi, LibeufinNexusService } from "../harness/libeufin.js";
/**
* Run basic test with LibEuFin.
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-bad-gateway.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-bad-gateway.ts
index 786e61832..53aacca84 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-bad-gateway.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-bad-gateway.ts
@@ -23,7 +23,7 @@ import {
LibeufinNexusApi,
LibeufinNexusService,
LibeufinSandboxService,
-} from "../harness/libeufin";
+} from "../harness/libeufin.js";
/**
* Testing how Nexus reacts when the Sandbox is unreachable.
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-basic.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-basic.ts
index 83231b358..300967c7a 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-basic.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-basic.ts
@@ -22,7 +22,7 @@ import {
WalletApiOperation,
HarnessExchangeBankAccount,
} from "@gnu-taler/taler-wallet-core";
-import { CoinConfig, defaultCoinConfig } from "../harness/denomStructures";
+import { CoinConfig, defaultCoinConfig } from "../harness/denomStructures.js";
import {
DbInfo,
ExchangeService,
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-c5x.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-c5x.ts
index 5a995fb69..cc46c6d33 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-c5x.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-c5x.ts
@@ -17,14 +17,13 @@
/**
* Imports.
*/
-import { GlobalTestState, delayMs } from "../harness/harness.js";
+import { GlobalTestState } from "../harness/harness.js";
import {
- SandboxUserBundle,
- NexusUserBundle,
launchLibeufinServices,
- LibeufinSandboxApi,
LibeufinNexusApi,
-} from "../harness/libeufin";
+ NexusUserBundle,
+ SandboxUserBundle,
+} from "../harness/libeufin.js";
/**
* This test checks how the C52 and C53 coordinate. It'll test
@@ -81,7 +80,7 @@ export async function runLibeufinC5xTest(t: GlobalTestState) {
user01nexus.localAccountName,
);
t.assertTrue(nexusTxs.data["transactions"].length == 0);
-
+
// Addressing one payment to user 01
await libeufinServices.libeufinSandbox.makeTransaction(
user02sandbox.ebicsBankAccount.label, // debit
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts
index 0bbd4fd28..1ed258c3a 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts
@@ -24,7 +24,7 @@ import {
launchLibeufinServices,
LibeufinNexusApi,
LibeufinSandboxApi,
-} from "../harness/libeufin";
+} from "../harness/libeufin.js";
/**
* Testing the Anastasis API, offered by the Anastasis facade.
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-keyrotation.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-keyrotation.ts
index 5dc31f0bf..21bf07de2 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-keyrotation.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-keyrotation.ts
@@ -24,7 +24,7 @@ import {
launchLibeufinServices,
LibeufinSandboxApi,
LibeufinNexusApi,
-} from "../harness/libeufin";
+} from "../harness/libeufin.js";
/**
* Run basic test with LibEuFin.
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-nexus-balance.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-nexus-balance.ts
index 1402d9ae5..a52de8d96 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-nexus-balance.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-nexus-balance.ts
@@ -23,7 +23,7 @@ import {
NexusUserBundle,
launchLibeufinServices,
LibeufinNexusApi,
-} from "../harness/libeufin";
+} from "../harness/libeufin.js";
/**
* This test checks how the C52 and C53 coordinate. It'll test
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund-multiple-users.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund-multiple-users.ts
index 39517f247..245f34331 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund-multiple-users.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund-multiple-users.ts
@@ -24,7 +24,7 @@ import {
launchLibeufinServices,
LibeufinSandboxApi,
LibeufinNexusApi,
-} from "../harness/libeufin";
+} from "../harness/libeufin.js";
/**
* User 01 expects a refund from user 02, and expectedly user 03
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts
index d91ae88bb..9d90121a0 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts
@@ -24,7 +24,7 @@ import {
launchLibeufinServices,
LibeufinSandboxApi,
LibeufinNexusApi,
-} from "../harness/libeufin";
+} from "../harness/libeufin.js";
/**
* Run basic test with LibEuFin.
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-sandbox-wire-transfer-cli.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-sandbox-wire-transfer-cli.ts
index d784885fd..7f274f554 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-sandbox-wire-transfer-cli.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-sandbox-wire-transfer-cli.ts
@@ -19,16 +19,13 @@
*/
import { GlobalTestState } from "../harness/harness.js";
import {
- NexusUserBundle,
- LibeufinNexusApi,
- LibeufinNexusService,
- LibeufinSandboxService,
LibeufinSandboxApi,
- findNexusPayment,
-} from "../harness/libeufin";
-
-export async function runLibeufinSandboxWireTransferCliTest(t: GlobalTestState) {
+ LibeufinSandboxService,
+} from "../harness/libeufin.js";
+export async function runLibeufinSandboxWireTransferCliTest(
+ t: GlobalTestState,
+) {
const sandbox = await LibeufinSandboxService.create(t, {
httpPort: 5012,
databaseJdbcUri: `jdbc:sqlite:${t.testDir}/libeufin-sandbox.sqlite3`,
@@ -49,22 +46,40 @@ export async function runLibeufinSandboxWireTransferCliTest(t: GlobalTestState)
label: "mock-account-2",
});
await sandbox.makeTransaction(
- "mock-account", "mock-account-2", "EUR:1", "one!"
+ "mock-account",
+ "mock-account-2",
+ "EUR:1",
+ "one!",
);
await sandbox.makeTransaction(
- "mock-account", "mock-account-2", "EUR:1", "two!"
+ "mock-account",
+ "mock-account-2",
+ "EUR:1",
+ "two!",
);
await sandbox.makeTransaction(
- "mock-account", "mock-account-2", "EUR:1", "three!"
+ "mock-account",
+ "mock-account-2",
+ "EUR:1",
+ "three!",
);
await sandbox.makeTransaction(
- "mock-account-2", "mock-account", "EUR:1", "Give one back."
+ "mock-account-2",
+ "mock-account",
+ "EUR:1",
+ "Give one back.",
);
await sandbox.makeTransaction(
- "mock-account-2", "mock-account", "EUR:0.11", "Give fraction back."
+ "mock-account-2",
+ "mock-account",
+ "EUR:0.11",
+ "Give fraction back.",
+ );
+ let ret = await LibeufinSandboxApi.getAccountInfoWithBalance(
+ sandbox,
+ "mock-account-2",
);
- let ret = await LibeufinSandboxApi.getAccountInfoWithBalance(sandbox, "mock-account-2");
- console.log(ret.data.balance)
- t.assertTrue(ret.data.balance == "EUR:1.89")
+ console.log(ret.data.balance);
+ t.assertTrue(ret.data.balance == "EUR:1.89");
}
runLibeufinSandboxWireTransferCliTest.suites = ["libeufin"];
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts
index 71a1e8c4b..0701fd1c5 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts
@@ -22,7 +22,7 @@ import {
LibeufinNexusService,
LibeufinSandboxService,
LibeufinCli,
-} from "../harness/libeufin";
+} from "../harness/libeufin.js";
/**
* Run basic test with LibEuFin.
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-merchant-exchange-confusion.ts b/packages/taler-wallet-cli/src/integrationtests/test-merchant-exchange-confusion.ts
index 1e958fd73..30ab1cd4b 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-merchant-exchange-confusion.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-merchant-exchange-confusion.ts
@@ -18,34 +18,33 @@
* Imports.
*/
import {
+ codecForMerchantOrderStatusUnpaid,
+ ConfirmPayResultType,
+ PreparePayResultType,
+} from "@gnu-taler/taler-util";
+import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
+import axiosImp from "axios";
+const axios = axiosImp.default;
+import { URL } from "url";
+import { defaultCoinConfig } from "../harness/denomStructures.js";
+import {
+ FaultInjectedExchangeService,
+ FaultInjectedMerchantService,
+} from "../harness/faultInjection.js";
+import {
BankService,
ExchangeService,
+ getPayto,
GlobalTestState,
MerchantPrivateApi,
MerchantService,
setupDb,
WalletCli,
- getPayto
} from "../harness/harness.js";
import {
- withdrawViaBank,
- createFaultInjectedMerchantTestkudosEnvironment,
FaultyMerchantTestEnvironment,
+ withdrawViaBank,
} from "../harness/helpers.js";
-import {
- PreparePayResultType,
- codecForMerchantOrderStatusUnpaid,
- ConfirmPayResultType,
-} from "@gnu-taler/taler-util";
-import axios from "axios";
-import {
- FaultInjectedExchangeService,
- FaultInjectedMerchantService,
- FaultInjectionRequestContext,
-} from "../harness/faultInjection";
-import { defaultCoinConfig } from "../harness/denomStructures";
-import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
-import { URL } from "url";
/**
* Run a test case with a simple TESTKUDOS Taler environment, consisting
@@ -115,7 +114,7 @@ export async function createConfusedMerchantTestkudosEnvironment(
await merchant.addInstance({
id: "minst1",
name: "minst1",
- paytoUris: [getPayto("minst1")]
+ paytoUris: [getPayto("minst1")],
});
console.log("setup done!");
@@ -141,12 +140,8 @@ export async function createConfusedMerchantTestkudosEnvironment(
export async function runMerchantExchangeConfusionTest(t: GlobalTestState) {
// Set up test environment
- const {
- wallet,
- bank,
- faultyExchange,
- faultyMerchant,
- } = await createConfusedMerchantTestkudosEnvironment(t);
+ const { wallet, bank, faultyExchange, faultyMerchant } =
+ await createConfusedMerchantTestkudosEnvironment(t);
// Withdraw digital cash into the wallet.
@@ -214,7 +209,10 @@ export async function runMerchantExchangeConfusionTest(t: GlobalTestState) {
const proposalId = preparePayResp.proposalId;
const orderUrlWithHash = new URL(publicOrderStatusUrl);
- orderUrlWithHash.searchParams.set("h_contract", preparePayResp.contractTermsHash);
+ orderUrlWithHash.searchParams.set(
+ "h_contract",
+ preparePayResp.contractTermsHash,
+ );
console.log("requesting", orderUrlWithHash.href);
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-merchant-instances-delete.ts b/packages/taler-wallet-cli/src/integrationtests/test-merchant-instances-delete.ts
index 2bef87b20..09231cdd8 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-merchant-instances-delete.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-merchant-instances-delete.ts
@@ -18,7 +18,8 @@
* Imports.
*/
import { URL } from "@gnu-taler/taler-util";
-import axios from "axios";
+import axiosImp from "axios";
+const axios = axiosImp.default;
import {
ExchangeService,
GlobalTestState,
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-merchant-instances-urls.ts b/packages/taler-wallet-cli/src/integrationtests/test-merchant-instances-urls.ts
index f72189014..a4e44c7f3 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-merchant-instances-urls.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-merchant-instances-urls.ts
@@ -18,7 +18,8 @@
* Imports.
*/
import { Duration } from "@gnu-taler/taler-util";
-import axios from "axios";
+import axiosImp from "axios";
+const axios = axiosImp.default;
import {
ExchangeService,
GlobalTestState,
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-merchant-instances.ts b/packages/taler-wallet-cli/src/integrationtests/test-merchant-instances.ts
index 1bf6be4cd..3efe83241 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-merchant-instances.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-merchant-instances.ts
@@ -18,7 +18,8 @@
* Imports.
*/
import { URL } from "@gnu-taler/taler-util";
-import axios from "axios";
+import axiosImp from "axios";
+const axios = axiosImp.default;
import {
ExchangeService,
GlobalTestState,
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-merchant-longpolling.ts b/packages/taler-wallet-cli/src/integrationtests/test-merchant-longpolling.ts
index 556d9074e..4b9f53f05 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-merchant-longpolling.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-merchant-longpolling.ts
@@ -25,7 +25,8 @@ import {
ConfirmPayResultType,
URL,
} from "@gnu-taler/taler-util";
-import axios from "axios";
+import axiosImp from "axios";
+const axios = axiosImp.default;
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
/**
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-merchant-refund-api.ts b/packages/taler-wallet-cli/src/integrationtests/test-merchant-refund-api.ts
index 539904f1c..5d9b23fa7 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-merchant-refund-api.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-merchant-refund-api.ts
@@ -34,7 +34,8 @@ import {
PreparePayResultType,
Duration,
} from "@gnu-taler/taler-util";
-import axios from "axios";
+import axiosImp from "axios";
+const axios = axiosImp.default;
import {
WalletApiOperation,
BankServiceHandle,
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-pay-paid.ts b/packages/taler-wallet-cli/src/integrationtests/test-pay-paid.ts
index 2d291ddd3..2ef91e4a8 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-pay-paid.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-pay-paid.ts
@@ -28,8 +28,9 @@ import {
ConfirmPayResultType,
URL,
} from "@gnu-taler/taler-util";
-import axios from "axios";
-import { FaultInjectionRequestContext } from "../harness/faultInjection";
+import axiosImp from "axios";
+const axios = axiosImp.default;
+import { FaultInjectionRequestContext } from "../harness/faultInjection.js";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
/**
@@ -43,12 +44,8 @@ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
export async function runPayPaidTest(t: GlobalTestState) {
// Set up test environment
- const {
- wallet,
- bank,
- faultyExchange,
- faultyMerchant,
- } = await createFaultInjectedMerchantTestkudosEnvironment(t);
+ const { wallet, bank, faultyExchange, faultyMerchant } =
+ await createFaultInjectedMerchantTestkudosEnvironment(t);
// Withdraw digital cash into the wallet.
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment-fault.ts b/packages/taler-wallet-cli/src/integrationtests/test-payment-fault.ts
index c78f030c8..dea538e35 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-payment-fault.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-payment-fault.ts
@@ -35,9 +35,9 @@ import {
FaultInjectedExchangeService,
FaultInjectionRequestContext,
FaultInjectionResponseContext,
-} from "../harness/faultInjection";
+} from "../harness/faultInjection.js";
import { CoreApiResponse } from "@gnu-taler/taler-util";
-import { defaultCoinConfig } from "../harness/denomStructures";
+import { defaultCoinConfig } from "../harness/denomStructures.js";
import {
WalletApiOperation,
BankApi,
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment-multiple.ts b/packages/taler-wallet-cli/src/integrationtests/test-payment-multiple.ts
index 3084ecfe0..46325c05f 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-payment-multiple.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-payment-multiple.ts
@@ -28,7 +28,7 @@ import {
getPayto
} from "../harness/harness.js";
import { withdrawViaBank } from "../harness/helpers.js";
-import { coin_ct10, coin_u1 } from "../harness/denomStructures";
+import { coin_ct10, coin_u1 } from "../harness/denomStructures.js";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
async function setupTest(
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment-transient.ts b/packages/taler-wallet-cli/src/integrationtests/test-payment-transient.ts
index 7e178077e..b57b355c6 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-payment-transient.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-payment-transient.ts
@@ -22,11 +22,9 @@ import {
withdrawViaBank,
createFaultInjectedMerchantTestkudosEnvironment,
} from "../harness/helpers.js";
-import axios from "axios";
import {
- FaultInjectionRequestContext,
FaultInjectionResponseContext,
-} from "../harness/faultInjection";
+} from "../harness/faultInjection.js";
import {
codecForMerchantOrderStatusUnpaid,
ConfirmPayResultType,
@@ -36,6 +34,8 @@ import {
URL,
} from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
+import axiosImp from "axios";
+const axios = axiosImp.default;
/**
* Run test for a payment where the merchant has a transient
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-paywall-flow.ts b/packages/taler-wallet-cli/src/integrationtests/test-paywall-flow.ts
index a8e3b3e95..a9601c625 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-paywall-flow.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-paywall-flow.ts
@@ -18,14 +18,18 @@
* Imports.
*/
import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js";
-import { createSimpleTestkudosEnvironment, withdrawViaBank } from "../harness/helpers.js";
+import {
+ createSimpleTestkudosEnvironment,
+ withdrawViaBank,
+} from "../harness/helpers.js";
import {
PreparePayResultType,
codecForMerchantOrderStatusUnpaid,
ConfirmPayResultType,
URL,
} from "@gnu-taler/taler-util";
-import axios from "axios";
+import axiosImp from "axios";
+const axios = axiosImp.default;
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
/**
@@ -34,12 +38,8 @@ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
export async function runPaywallFlowTest(t: GlobalTestState) {
// Set up test environment
- const {
- wallet,
- bank,
- exchange,
- merchant,
- } = await createSimpleTestkudosEnvironment(t);
+ const { wallet, bank, exchange, merchant } =
+ await createSimpleTestkudosEnvironment(t);
// Withdraw digital cash into the wallet.
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-revocation.ts b/packages/taler-wallet-cli/src/integrationtests/test-revocation.ts
index bf35b5382..3ed071a18 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-revocation.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-revocation.ts
@@ -18,7 +18,7 @@
* Imports.
*/
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
-import { CoinConfig } from "../harness/denomStructures";
+import { CoinConfig } from "../harness/denomStructures.js";
import {
GlobalTestState,
ExchangeService,
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-timetravel-autorefresh.ts b/packages/taler-wallet-cli/src/integrationtests/test-timetravel-autorefresh.ts
index b55be9f82..54b66e0b2 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-timetravel-autorefresh.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-timetravel-autorefresh.ts
@@ -27,7 +27,7 @@ import {
PendingOperationsResponse,
WalletApiOperation,
} from "@gnu-taler/taler-wallet-core";
-import { makeNoFeeCoinConfig } from "../harness/denomStructures";
+import { makeNoFeeCoinConfig } from "../harness/denomStructures.js";
import {
BankService,
ExchangeService,
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-basic.ts b/packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-basic.ts
index af294da8e..fc2f3335d 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-basic.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-basic.ts
@@ -24,7 +24,7 @@ import {
createSimpleTestkudosEnvironment,
withdrawViaBank,
} from "../harness/helpers.js";
-import { SyncService } from "../harness/sync";
+import { SyncService } from "../harness/sync.js";
/**
* Run test for basic, bank-integrated withdrawal.
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-doublespend.ts b/packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-doublespend.ts
index 228712da5..8b52260e9 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-doublespend.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-doublespend.ts
@@ -29,7 +29,7 @@ import {
makeTestPayment,
withdrawViaBank,
} from "../harness/helpers.js";
-import { SyncService } from "../harness/sync";
+import { SyncService } from "../harness/sync.js";
export async function runWalletBackupDoublespendTest(t: GlobalTestState) {
// Set up test environment
diff --git a/packages/taler-wallet-cli/src/integrationtests/testrunner.ts b/packages/taler-wallet-cli/src/integrationtests/testrunner.ts
index c22689e46..e4a2193bb 100644
--- a/packages/taler-wallet-cli/src/integrationtests/testrunner.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/testrunner.ts
@@ -56,7 +56,7 @@ import { runLibeufinSandboxWireTransferCliTest } from "./test-libeufin-sandbox-w
import { runLibeufinTutorialTest } from "./test-libeufin-tutorial.js";
import { runMerchantExchangeConfusionTest } from "./test-merchant-exchange-confusion.js";
import { runMerchantInstancesTest } from "./test-merchant-instances.js";
-import { runMerchantInstancesDeleteTest } from "./test-merchant-instances-delete";
+import { runMerchantInstancesDeleteTest } from "./test-merchant-instances-delete.js";
import { runMerchantInstancesUrlsTest } from "./test-merchant-instances-urls.js";
import { runMerchantLongpollingTest } from "./test-merchant-longpolling.js";
import { runMerchantRefundApiTest } from "./test-merchant-refund-api.js";
diff --git a/packages/taler-wallet-cli/tsconfig.json b/packages/taler-wallet-cli/tsconfig.json
index 945161176..447d3f946 100644
--- a/packages/taler-wallet-cli/tsconfig.json
+++ b/packages/taler-wallet-cli/tsconfig.json
@@ -4,7 +4,7 @@
"composite": true,
"target": "ES2018",
"module": "ESNext",
- "moduleResolution": "node",
+ "moduleResolution": "Node16",
"sourceMap": true,
"lib": ["es6"],
"noImplicitReturns": true,
diff --git a/packages/taler-wallet-core/package.json b/packages/taler-wallet-core/package.json
index 9b007a93d..57b89666a 100644
--- a/packages/taler-wallet-core/package.json
+++ b/packages/taler-wallet-core/package.json
@@ -12,8 +12,8 @@
"author": "Florian Dold",
"license": "GPL-3.0",
"scripts": {
- "prepare": "tsc && rollup -c",
- "compile": "tsc && rollup -c",
+ "prepare": "tsc",
+ "compile": "tsc",
"pretty": "prettier --write src",
"test": "tsc && ava",
"coverage": "tsc && c8 --src src --all ava",
@@ -29,14 +29,15 @@
"src/",
"lib/"
],
- "main": "./dist/taler-wallet-core.js",
- "browser": {
- "./dist/taler-wallet-core.js": "./dist/taler-wallet-core.browser.js",
- "./lib/index.node.js": "./lib/index.browser.js"
- },
- "module": "./lib/index.node.js",
"type": "module",
"types": "./lib/index.node.d.ts",
+ "exports": {
+ ".": {
+ "browser": "./lib/index.browser.js",
+ "node": "./lib/index.node.js",
+ "default": "./lib/index.js"
+ }
+ },
"devDependencies": {
"@ava/typescript": "^3.0.1",
"@gnu-taler/pogen": "workspace:*",
@@ -54,8 +55,6 @@
"po2json": "^0.4.5",
"prettier": "^2.5.1",
"rimraf": "^3.0.2",
- "rollup": "^2.79.0",
- "rollup-plugin-sourcemaps": "^0.6.3",
"source-map-resolve": "^0.6.0",
"typedoc": "^0.23.16",
"typescript": "^4.8.4"
diff --git a/packages/taler-wallet-core/src/headless/NodeHttpLib.ts b/packages/taler-wallet-core/src/headless/NodeHttpLib.ts
index 5290bd441..c1d42796d 100644
--- a/packages/taler-wallet-core/src/headless/NodeHttpLib.ts
+++ b/packages/taler-wallet-core/src/headless/NodeHttpLib.ts
@@ -27,7 +27,7 @@ import {
HttpResponse,
} from "../util/http.js";
import { RequestThrottler } from "@gnu-taler/taler-util";
-import Axios, { AxiosResponse } from "axios";
+import axios, { AxiosResponse } from "axios";
import { TalerError } from "../errors.js";
import { Logger, bytesToString } from "@gnu-taler/taler-util";
import { TalerErrorCode, URL } from "@gnu-taler/taler-util";
@@ -75,7 +75,7 @@ export class NodeHttpLib implements HttpRequestLibrary {
// FIXME: Use AbortController / etc. to handle cancellation
let resp: AxiosResponse;
try {
- let respPromise = Axios({
+ let respPromise = axios.default({
method,
url: url,
responseType: "arraybuffer",
diff --git a/packages/taler-wallet-core/src/headless/helpers.ts b/packages/taler-wallet-core/src/headless/helpers.ts
index 2be9be9a1..df4474271 100644
--- a/packages/taler-wallet-core/src/headless/helpers.ts
+++ b/packages/taler-wallet-core/src/headless/helpers.ts
@@ -29,7 +29,7 @@ import {
MemoryBackend,
shimIndexedDB,
} from "@gnu-taler/idb-bridge";
-import { AccessStats } from "@gnu-taler/idb-bridge/src/MemoryBackend";
+import { AccessStats } from "@gnu-taler/idb-bridge";
import { Logger, WalletNotification } from "@gnu-taler/taler-util";
import * as fs from "fs";
import { NodeThreadCryptoWorkerFactory } from "../crypto/workers/nodeThreadWorker.js";
diff --git a/packages/taler-wallet-core/src/index.ts b/packages/taler-wallet-core/src/index.ts
index 0e01e3517..afd86b45d 100644
--- a/packages/taler-wallet-core/src/index.ts
+++ b/packages/taler-wallet-core/src/index.ts
@@ -61,6 +61,7 @@ export {
nativeCryptoR,
nativeCrypto,
nullCrypto,
+ TalerCryptoInterface,
} from "./crypto/cryptoImplementation.js";
export * from "./util/timer.js";
diff --git a/packages/taler-wallet-core/tsconfig.json b/packages/taler-wallet-core/tsconfig.json
index c3366373e..5b74121a2 100644
--- a/packages/taler-wallet-core/tsconfig.json
+++ b/packages/taler-wallet-core/tsconfig.json
@@ -6,7 +6,7 @@
"declarationMap": false,
"target": "ES2017",
"module": "ESNext",
- "moduleResolution": "node",
+ "moduleResolution": "Node16",
"sourceMap": true,
"lib": ["es6"],
"types": ["node"],
diff --git a/packages/taler-wallet-embedded/package.json b/packages/taler-wallet-embedded/package.json
index 1dd89f984..25cd8f2cc 100644
--- a/packages/taler-wallet-embedded/package.json
+++ b/packages/taler-wallet-embedded/package.json
@@ -12,6 +12,7 @@
"main": "dist/taler-wallet-embedded.js",
"author": "Florian Dold",
"license": "GPL-3.0",
+ "type": "module",
"scripts": {
"compile": "tsc && rollup -c",
"pretty": "prettier --write src",
diff --git a/packages/taler-wallet-embedded/tsconfig.json b/packages/taler-wallet-embedded/tsconfig.json
index fa759bdaa..7b27ca6b7 100644
--- a/packages/taler-wallet-embedded/tsconfig.json
+++ b/packages/taler-wallet-embedded/tsconfig.json
@@ -6,7 +6,7 @@
"declarationMap": true,
"target": "ES6",
"module": "ESNext",
- "moduleResolution": "node",
+ "moduleResolution": "Node16",
"sourceMap": true,
"lib": ["es6"],
"noImplicitReturns": true,