commit 7865b1cd5b9605d9a802d9d5016bc4aaeaa95fad
parent cd1201ef6c737b007adf1c3c572b41d793f2296b
Author: Florian Dold <florian@dold.me>
Date: Wed, 13 Dec 2023 19:31:30 +0100
wallet-core: untangle version confusion for different bank APIs
Diffstat:
4 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/API_CHANGES.md b/API_CHANGES.md
@@ -32,3 +32,5 @@ This files contains all the API changes for the current release:
contentLanguage field that is returned if the exchange reports it.
- 2023-12-12 2:0:1 dold: The checkPeerPushDebit now returns a maximum
expiration date based on the expiry of selected coins.
+- 2023-12-13 3:0:2 dold: getVersion now returns the supported API version
+ ranges for all bank APIs separately.
diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts
@@ -1094,6 +1094,14 @@ export interface WalletCoreVersion {
version: string;
exchange: string;
merchant: string;
+
+ bankIntegrationApiRange: string;
+ bankConversionApiRange: string;
+ corebankApiRange: string;
+
+ /**
+ * @deprecated as bank was split into multiple APIs withs separate versioning
+ */
bank: string;
/**
diff --git a/packages/taler-wallet-core/src/versions.ts b/packages/taler-wallet-core/src/versions.ts
@@ -29,18 +29,32 @@ export const WALLET_EXCHANGE_PROTOCOL_VERSION = "17:0:0";
export const WALLET_MERCHANT_PROTOCOL_VERSION = "5:0:1";
/**
- * Protocol version spoken with the bank.
+ * Protocol version spoken with the bank (bank integration API).
*
* Uses libtool's current:revision:age versioning.
*/
-export const WALLET_BANK_INTEGRATION_PROTOCOL_VERSION = "2:0:0";
+export const WALLET_BANK_INTEGRATION_PROTOCOL_VERSION = "1:0:0";
+
+/**
+ * Protocol version spoken with the bank (corebank API).
+ *
+ * Uses libtool's current:revision:age versioning.
+ */
+export const WALLET_COREBANK_API_PROTOCOL_VERSION = "2:0:0";
+
+/**
+ * Protocol version spoken with the bank (conversion API).
+ *
+ * Uses libtool's current:revision:age versioning.
+ */
+export const WALLET_BANK_CONVERSION_API_PROTOCOL_VERSION = "2:0:0";
/**
* Semver of the wallet-core API implementation.
* Will be replaced with the value from package.json in a
* post-compilation step (inside lib/).
*/
-export const WALLET_CORE_API_IMPLEMENTATION_VERSION = "2:0:1";
+export const WALLET_CORE_API_IMPLEMENTATION_VERSION = "3:0:2";
/**
* Libtool rules:
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts
@@ -309,7 +309,9 @@ import {
} from "./util/query.js";
import { TimerAPI, TimerGroup } from "./util/timer.js";
import {
+ WALLET_BANK_CONVERSION_API_PROTOCOL_VERSION,
WALLET_BANK_INTEGRATION_PROTOCOL_VERSION,
+ WALLET_COREBANK_API_PROTOCOL_VERSION,
WALLET_CORE_API_IMPLEMENTATION_VERSION,
WALLET_EXCHANGE_PROTOCOL_VERSION,
WALLET_MERCHANT_PROTOCOL_VERSION,
@@ -1524,6 +1526,9 @@ export function getVersion(ws: InternalWalletState): WalletCoreVersion {
version: WALLET_CORE_API_IMPLEMENTATION_VERSION,
exchange: WALLET_EXCHANGE_PROTOCOL_VERSION,
merchant: WALLET_MERCHANT_PROTOCOL_VERSION,
+ bankConversionApiRange: WALLET_BANK_CONVERSION_API_PROTOCOL_VERSION,
+ bankIntegrationApiRange: WALLET_BANK_INTEGRATION_PROTOCOL_VERSION,
+ corebankApiRange: WALLET_COREBANK_API_PROTOCOL_VERSION,
bank: WALLET_BANK_INTEGRATION_PROTOCOL_VERSION,
devMode: false,
};