aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-05-03 10:01:44 +0200
committerFlorian Dold <florian@dold.me>2023-05-03 10:01:51 +0200
commit1b0bec0363793996eff6483d36b844cfa2381404 (patch)
tree5f62533c0dfcc5d40c8d959e7dc71ce936fbf38b /packages/taler-util
parentda519af01fd3920b49a05cb3bebf0a9a6194abfc (diff)
wallet-core: support new exchange wire account signature
Diffstat (limited to 'packages/taler-util')
-rw-r--r--packages/taler-util/src/libtool-version.test.ts2
-rw-r--r--packages/taler-util/src/taler-types.ts7
2 files changed, 9 insertions, 0 deletions
diff --git a/packages/taler-util/src/libtool-version.test.ts b/packages/taler-util/src/libtool-version.test.ts
index c1683f0df..addd1b418 100644
--- a/packages/taler-util/src/libtool-version.test.ts
+++ b/packages/taler-util/src/libtool-version.test.ts
@@ -45,4 +45,6 @@ test("version comparison", (t) => {
compatible: true,
currentCmp: 0,
});
+ t.true(LibtoolVersion.compare("42:0:1", "41:0:0")?.compatible);
+ t.true(LibtoolVersion.compare("41:0:0", "42:0:1")?.compatible);
});
diff --git a/packages/taler-util/src/taler-types.ts b/packages/taler-util/src/taler-types.ts
index ab5951112..295530529 100644
--- a/packages/taler-util/src/taler-types.ts
+++ b/packages/taler-util/src/taler-types.ts
@@ -840,6 +840,10 @@ export class WireFeesJson {
export interface AccountInfo {
payto_uri: string;
master_sig: string;
+ // Will become mandatory in later protocol versions
+ conversion_url?: string;
+ credit_restrictions?: any;
+ debit_restrictions?: any;
}
export interface ExchangeWireJson {
@@ -1426,6 +1430,9 @@ export const codecForAccountInfo = (): Codec<AccountInfo> =>
buildCodecForObject<AccountInfo>()
.property("payto_uri", codecForString())
.property("master_sig", codecForString())
+ .property("conversion_url", codecOptional(codecForString()))
+ .property("credit_restrictions", codecForAny())
+ .property("debit_restrictions", codecForAny())
.build("AccountInfo");
export const codecForExchangeWireJson = (): Codec<ExchangeWireJson> =>