aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/harness
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-09-06 13:24:34 +0200
committerFlorian Dold <florian@dold.me>2023-09-06 13:24:34 +0200
commitb63937703ce1e269055497ee14ac90a28de2fc74 (patch)
treea2f9aa841b18f950028b34b17f88bf28c70dd5db /packages/taler-harness/src/harness
parent7450bede5b5809f6a496b7e68852a454386850e5 (diff)
downloadwallet-core-b63937703ce1e269055497ee14ac90a28de2fc74.tar.xz
move bank API client to taler-util, update typescript config
Diffstat (limited to 'packages/taler-harness/src/harness')
-rw-r--r--packages/taler-harness/src/harness/harness.ts17
-rw-r--r--packages/taler-harness/src/harness/helpers.ts24
2 files changed, 25 insertions, 16 deletions
diff --git a/packages/taler-harness/src/harness/harness.ts b/packages/taler-harness/src/harness/harness.ts
index d0719b4f7..24e42099e 100644
--- a/packages/taler-harness/src/harness/harness.ts
+++ b/packages/taler-harness/src/harness/harness.ts
@@ -28,6 +28,7 @@ import {
AccountAddDetails,
AmountJson,
Amounts,
+ BankAccessApiClient,
Configuration,
CoreApiResponse,
Duration,
@@ -46,13 +47,11 @@ import {
stringToBytes,
} from "@gnu-taler/taler-util";
import {
+ HttpRequestLibrary,
createPlatformHttpLib,
expectSuccessResponseOrThrow,
} from "@gnu-taler/taler-util/http";
import {
- BankAccessApiClient,
- BankServiceHandle,
- HarnessExchangeBankAccount,
WalletCoreApiClient,
WalletCoreRequestType,
WalletCoreResponseType,
@@ -569,6 +568,13 @@ class BankServiceBase {
) {}
}
+export interface HarnessExchangeBankAccount {
+ accountName: string;
+ accountPassword: string;
+ accountPaytoUri: string;
+ wireGatewayApiBaseUrl: string;
+}
+
/**
* Implementation of the bank service using the "taler-fakebank-run" tool.
*/
@@ -701,6 +707,11 @@ export class FakebankService
// Use libeufin bank instead of pybank.
const useLibeufinBank = false;
+export interface BankServiceHandle {
+ readonly bankAccessApiBaseUrl: string;
+ readonly http: HttpRequestLibrary;
+}
+
export type BankService = BankServiceHandle;
export const BankService = FakebankService;
diff --git a/packages/taler-harness/src/harness/helpers.ts b/packages/taler-harness/src/harness/helpers.ts
index f92fd4dd9..9892e600b 100644
--- a/packages/taler-harness/src/harness/helpers.ts
+++ b/packages/taler-harness/src/harness/helpers.ts
@@ -25,21 +25,18 @@
*/
import {
AmountString,
+ BankAccessApiClient,
ConfirmPayResultType,
- MerchantContractTerms,
Duration,
- PreparePayResultType,
- NotificationType,
- WalletNotification,
- TransactionMajorState,
Logger,
MerchantApiClient,
+ MerchantContractTerms,
+ NotificationType,
+ PreparePayResultType,
+ TransactionMajorState,
+ WalletNotification,
} from "@gnu-taler/taler-util";
-import {
- BankAccessApiClient,
- HarnessExchangeBankAccount,
- WalletApiOperation,
-} from "@gnu-taler/taler-wallet-core";
+import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { CoinConfig, defaultCoinConfig } from "./denomStructures.js";
import {
FaultInjectedExchangeService,
@@ -51,16 +48,17 @@ import {
ExchangeService,
ExchangeServiceInterface,
FakebankService,
- getPayto,
GlobalTestState,
+ HarnessExchangeBankAccount,
MerchantService,
MerchantServiceInterface,
- setupDb,
- setupSharedDb,
WalletCli,
WalletClient,
WalletService,
WithAuthorization,
+ getPayto,
+ setupDb,
+ setupSharedDb,
} from "./harness.js";
import * as fs from "fs";