summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/common.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-11-23 23:51:12 +0100
committerFlorian Dold <florian@dold.me>2021-11-23 23:51:12 +0100
commitae8af3f27c0ed1746c49a7608fe05af24ae8a18b (patch)
treec28f588071bdd1d4cda2279e62563a3664d79be9 /packages/taler-wallet-core/src/common.ts
parent829a59e1a24d6a99ce7554d28acfd05f21baeaf8 (diff)
downloadwallet-core-ae8af3f27c0ed1746c49a7608fe05af24ae8a18b.tar.gz
wallet-core-ae8af3f27c0ed1746c49a7608fe05af24ae8a18b.tar.bz2
wallet-core-ae8af3f27c0ed1746c49a7608fe05af24ae8a18b.zip
wallet: tipping protocol change / merchant version info
Diffstat (limited to 'packages/taler-wallet-core/src/common.ts')
-rw-r--r--packages/taler-wallet-core/src/common.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/common.ts b/packages/taler-wallet-core/src/common.ts
index dd8542def..81c43cf14 100644
--- a/packages/taler-wallet-core/src/common.ts
+++ b/packages/taler-wallet-core/src/common.ts
@@ -51,6 +51,21 @@ export interface TrustInfo {
isAudited: boolean;
}
+export interface MerchantInfo {
+ supportsMerchantProtocolV1: boolean;
+ supportsMerchantProtocolV2: boolean;
+}
+
+/**
+ * Interface for merchant-related operations.
+ */
+export interface MerchantOperations {
+ getMerchantInfo(
+ ws: InternalWalletState,
+ merchantBaseUrl: string,
+ ): Promise<MerchantInfo>;
+}
+
/**
* Interface for exchange-related operations.
*/
@@ -131,8 +146,11 @@ export interface InternalWalletState {
initCalled: boolean;
+ merchantInfoCache: Record<string, MerchantInfo>;
+
exchangeOps: ExchangeOperations;
recoupOps: RecoupOperations;
+ merchantOps: MerchantOperations;
db: DbAccess<typeof WalletStoresV1>;
http: HttpRequestLibrary;