aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util/src
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-06-02 13:23:51 +0200
committerFlorian Dold <florian@dold.me>2021-06-02 13:24:28 +0200
commit02f1d4b08116c24f0af1f32cb6d82be292fa6d10 (patch)
tree1fbcc1675e09584a74896909e1d4d0882d10be8e /packages/taler-util/src
parentc6c17a1c0aaa2c76616ec93df3ebe6621b547cd9 (diff)
support multiple exchange details per base URL
Diffstat (limited to 'packages/taler-util/src')
-rw-r--r--packages/taler-util/src/backupTypes.ts34
1 files changed, 28 insertions, 6 deletions
diff --git a/packages/taler-util/src/backupTypes.ts b/packages/taler-util/src/backupTypes.ts
index ce2eb6b77..dc344ee23 100644
--- a/packages/taler-util/src/backupTypes.ts
+++ b/packages/taler-util/src/backupTypes.ts
@@ -128,6 +128,8 @@ export interface WalletBackupContentV1 {
*/
exchanges: BackupExchange[];
+ exchange_details: BackupExchangeDetails[];
+
/**
* Grouped refresh sessions.
*
@@ -1090,9 +1092,34 @@ export class BackupExchangeAuditor {
}
/**
- * Backup information about an exchange.
+ * Backup information for an exchange. Serves effectively
+ * as a pointer to the exchange details identified by
+ * the base URL, master public key and currency.
*/
export interface BackupExchange {
+ base_url: string;
+
+ master_public_key: string;
+
+ currency: string;
+
+ /**
+ * Time when the pointer to the exchange details
+ * was last updated.
+ *
+ * Used to facilitate automatic merging.
+ */
+ update_clock: Timestamp;
+}
+
+/**
+ * Backup information about an exchange's details.
+ *
+ * Note that one base URL can have multiple exchange
+ * details. The BackupExchange stores a pointer
+ * to the current exchange details.
+ */
+export interface BackupExchangeDetails {
/**
* Canonicalized base url of the exchange.
*/
@@ -1158,11 +1185,6 @@ export interface BackupExchange {
* ETag for last terms of service download.
*/
tos_etag_accepted: string | undefined;
-
- /**
- * Should this exchange be considered defective?
- */
- defective?: boolean;
}
export enum BackupProposalStatus {