summaryrefslogtreecommitdiff
path: root/packages/taler-util/src/http-client/bank-integration.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-util/src/http-client/bank-integration.ts')
-rw-r--r--packages/taler-util/src/http-client/bank-integration.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/taler-util/src/http-client/bank-integration.ts b/packages/taler-util/src/http-client/bank-integration.ts
index 8131b36b6..757f1f897 100644
--- a/packages/taler-util/src/http-client/bank-integration.ts
+++ b/packages/taler-util/src/http-client/bank-integration.ts
@@ -1,6 +1,7 @@
import { HttpRequestLibrary, readSuccessResponseJsonOrThrow } from "../http-common.js";
import { HttpStatusCode } from "../http-status-codes.js";
import { createPlatformHttpLib } from "../http.js";
+import { LibtoolVersion } from "../libtool-version.js";
import { FailCasesByMethod, ResultByMethod, opKnownFailure, opSuccess, opUnknownFailure } from "../operation.js";
import { TalerErrorCode } from "../taler-error-codes.js";
import { codecForTalerErrorDetail } from "../wallet-types.js";
@@ -19,6 +20,8 @@ export type TalerBankIntegrationErrorsByMethod<prop extends keyof TalerBankInteg
* The API is used by the wallets.
*/
export class TalerBankIntegrationHttpClient {
+ public readonly PROTOCOL_VERSION = "3:0:3";
+
httpLib: HttpRequestLibrary;
constructor(
@@ -28,6 +31,11 @@ export class TalerBankIntegrationHttpClient {
this.httpLib = httpClient ?? createPlatformHttpLib();
}
+ isCompatible(version: string): boolean {
+ const compare = LibtoolVersion.compare(this.PROTOCOL_VERSION, version)
+ return compare?.compatible ?? false
+ }
+
/**
* https://docs.taler.net/core/api-bank-integration.html#get--config
*