diff options
author | Florian Dold <florian@dold.me> | 2021-06-02 13:23:51 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-06-02 13:24:28 +0200 |
commit | 02f1d4b08116c24f0af1f32cb6d82be292fa6d10 (patch) | |
tree | 1fbcc1675e09584a74896909e1d4d0882d10be8e /packages/taler-util/src | |
parent | c6c17a1c0aaa2c76616ec93df3ebe6621b547cd9 (diff) |
support multiple exchange details per base URL
Diffstat (limited to 'packages/taler-util/src')
-rw-r--r-- | packages/taler-util/src/backupTypes.ts | 34 |
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 { |