diff options
Diffstat (limited to 'packages/taler-util/src/http-client/merchant.ts')
-rw-r--r-- | packages/taler-util/src/http-client/merchant.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/taler-util/src/http-client/merchant.ts b/packages/taler-util/src/http-client/merchant.ts index 5aace2d78..a6dc4661f 100644 --- a/packages/taler-util/src/http-client/merchant.ts +++ b/packages/taler-util/src/http-client/merchant.ts @@ -1,6 +1,7 @@ import { HttpRequestLibrary } 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, opSuccess, opUnknownFailure } from "../operation.js"; import { codecForMerchantConfig } from "./types.js"; @@ -11,6 +12,7 @@ export type TalerMerchantErrorsByMethod<prop extends keyof TalerMerchantHttpClie */ export class TalerMerchantHttpClient { httpLib: HttpRequestLibrary; + public readonly PROTOCOL_VERSION = "5:0:1"; constructor( readonly baseUrl: string, @@ -19,6 +21,10 @@ export class TalerMerchantHttpClient { 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-merchant.html#get--config * |