diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/taler-wallet-core/src/types/backupTypes.ts | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/packages/taler-wallet-core/src/types/backupTypes.ts b/packages/taler-wallet-core/src/types/backupTypes.ts index 6bdf26992..d6062b92d 100644 --- a/packages/taler-wallet-core/src/types/backupTypes.ts +++ b/packages/taler-wallet-core/src/types/backupTypes.ts @@ -21,8 +21,7 @@ * as the backup schema must remain very stable and should be self-contained. * * Current limitations: - * 1. Deletion tomb stones aren't supported yet - * 2. Exchange/auditor trust isn't exported yet + * 1. Exchange/auditor trust isn't exported yet * (see https://bugs.gnunet.org/view.php?id=6448) * * General considerations / decisions: @@ -70,12 +69,6 @@ export interface WalletBackupContentV1 { schema_version: 1; /** - * Monotonically increasing clock of the wallet, - * used to determine causality when merging backups. - */ - clock: number; - - /** * Root public key of the wallet. This field is present as * a sanity check if the backup content JSON is loaded from file. */ @@ -90,6 +83,16 @@ export interface WalletBackupContentV1 { current_device_id: string; /** + * Monotonically increasing clock of the wallet, + * used to determine causality when merging backups. + * + * Information about other clocks, used to delete + * tombstones in the hopefully rare case that multiple wallets + * are connected to the same sync server. + */ + clocks: { [device_id: string]: number }; + + /** * Per-exchange data sorted by exchange master public key. * * Sorted by the exchange public key. @@ -137,6 +140,21 @@ export interface WalletBackupContentV1 { * Recoup groups. */ recoup_groups: BackupRecoupGroup[]; + + /** + * Tombstones for deleting purchases. + */ + purchase_tombstones: { + /** + * Clock when the purchase was deleted + */ + clock_deleted: number; + + /** + * Proposal ID identifying the purchase. + */ + proposal_id: string; + }[]; } /** @@ -646,6 +664,11 @@ export interface BackupPurchase { proposal_id: string; /** + * Clock when this purchase was created. + */ + clock_created: number; + + /** * Contract terms we got from the merchant. */ contract_terms_raw: string; |