diff options
author | Florian Dold <florian@dold.me> | 2021-01-18 23:35:41 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-01-18 23:35:41 +0100 |
commit | 5f3c02d31a223add55a32b20f4a289210cbb4f15 (patch) | |
tree | d91ded55692aea1294c0565328515f120559ab6a /packages/taler-wallet-core/src/types/dbTypes.ts | |
parent | f884193b1adf0861f710c6ab1bb94ea2073ade65 (diff) | |
download | wallet-core-5f3c02d31a223add55a32b20f4a289210cbb4f15.tar.xz |
implement deposits
Diffstat (limited to 'packages/taler-wallet-core/src/types/dbTypes.ts')
-rw-r--r-- | packages/taler-wallet-core/src/types/dbTypes.ts | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/types/dbTypes.ts b/packages/taler-wallet-core/src/types/dbTypes.ts index e0d137535..bc7d7728d 100644 --- a/packages/taler-wallet-core/src/types/dbTypes.ts +++ b/packages/taler-wallet-core/src/types/dbTypes.ts @@ -32,6 +32,7 @@ import { Product, InternationalizedString, AmountString, + ContractTerms, } from "./talerTypes"; import { Index, Store } from "../util/query"; @@ -1481,6 +1482,54 @@ export interface BackupProviderRecord { lastError: TalerErrorDetails | undefined; } +/** + * Group of deposits made by the wallet. + */ +export interface DepositGroupRecord { + depositGroupId: string; + + merchantPub: string; + merchantPriv: string; + + noncePriv: string; + noncePub: string; + + /** + * Wire information used by all deposits in this + * deposit group. + */ + wire: { + payto_uri: string; + salt: string; + }; + + /** + * Verbatim contract terms. + */ + contractTermsRaw: ContractTerms; + + contractTermsHash: string; + + payCoinSelection: PayCoinSelection; + + totalPayCost: AmountJson; + + effectiveDepositAmount: AmountJson; + + depositedPerCoin: boolean[]; + + timestampCreated: Timestamp; + + timestampFinished: Timestamp | undefined; + + lastError: TalerErrorDetails | undefined; + + /** + * Retry info. + */ + retryInfo: RetryInfo; +} + class ExchangesStore extends Store<"exchanges", ExchangeRecord> { constructor() { super("exchanges", { keyPath: "baseUrl" }); @@ -1657,6 +1706,12 @@ class BackupProvidersStore extends Store< } } +class DepositGroupsStore extends Store<"depositGroups", DepositGroupRecord> { + constructor() { + super("depositGroups", { keyPath: "depositGroupId" }); + } +} + /** * The stores and indices for the wallet database. */ @@ -1683,6 +1738,7 @@ export const Stores = { planchets: new PlanchetsStore(), bankWithdrawUris: new BankWithdrawUrisStore(), backupProviders: new BackupProvidersStore(), + depositGroups: new DepositGroupsStore(), }; export class MetaConfigStore extends Store<"metaConfig", ConfigRecord<any>> { |