summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-12-13 19:31:30 +0100
committerFlorian Dold <florian@dold.me>2023-12-13 19:31:37 +0100
commit7865b1cd5b9605d9a802d9d5016bc4aaeaa95fad (patch)
treec157cb7f81b757796ce48aeaed6db70a7d9abe8d
parentcd1201ef6c737b007adf1c3c572b41d793f2296b (diff)
downloadwallet-core-7865b1cd5b9605d9a802d9d5016bc4aaeaa95fad.tar.gz
wallet-core-7865b1cd5b9605d9a802d9d5016bc4aaeaa95fad.tar.bz2
wallet-core-7865b1cd5b9605d9a802d9d5016bc4aaeaa95fad.zip
wallet-core: untangle version confusion for different bank APIs
-rw-r--r--API_CHANGES.md2
-rw-r--r--packages/taler-util/src/wallet-types.ts8
-rw-r--r--packages/taler-wallet-core/src/versions.ts20
-rw-r--r--packages/taler-wallet-core/src/wallet.ts5
4 files changed, 32 insertions, 3 deletions
diff --git a/API_CHANGES.md b/API_CHANGES.md
index 436466947..4da02622d 100644
--- 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
index e9f61680c..a11d858fa 100644
--- 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
index 5e72ad20a..023cbb1ff 100644
--- 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
index 86a80335e..da6ffa41f 100644
--- 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,
};