aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/internal-wallet-state.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-10-08 20:56:57 +0200
committerFlorian Dold <florian@dold.me>2022-10-08 23:07:07 +0200
commit526f4eba9554f27e33afb0e02d19d870825b038c (patch)
treec35e41a20a3bc90da3beb81fa7831505ee64cfee /packages/taler-wallet-core/src/internal-wallet-state.ts
parenteace0e0e7aad9113af758b829fffd873826e36e3 (diff)
downloadwallet-core-526f4eba9554f27e33afb0e02d19d870825b038c.tar.xz
wallet-core: Clean up merchant payments DB schema
Diffstat (limited to 'packages/taler-wallet-core/src/internal-wallet-state.ts')
-rw-r--r--packages/taler-wallet-core/src/internal-wallet-state.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/internal-wallet-state.ts b/packages/taler-wallet-core/src/internal-wallet-state.ts
index b8415a469..6c7d943cb 100644
--- a/packages/taler-wallet-core/src/internal-wallet-state.ts
+++ b/packages/taler-wallet-core/src/internal-wallet-state.ts
@@ -37,6 +37,9 @@ import {
TalerProtocolTimestamp,
CancellationToken,
DenominationInfo,
+ RefreshGroupId,
+ CoinPublicKey,
+ RefreshReason,
} from "@gnu-taler/taler-util";
import { CryptoDispatcher } from "./crypto/workers/cryptoDispatcher.js";
import { TalerCryptoInterface } from "./crypto/cryptoImplementation.js";
@@ -74,6 +77,20 @@ export interface MerchantOperations {
): Promise<MerchantInfo>;
}
+export interface RefreshOperations {
+ createRefreshGroup(
+ ws: InternalWalletState,
+ tx: GetReadWriteAccess<{
+ denominations: typeof WalletStoresV1.denominations;
+ coins: typeof WalletStoresV1.coins;
+ refreshGroups: typeof WalletStoresV1.refreshGroups;
+ coinAvailability: typeof WalletStoresV1.coinAvailability;
+ }>,
+ oldCoinPubs: CoinPublicKey[],
+ reason: RefreshReason,
+ ): Promise<RefreshGroupId>;
+}
+
/**
* Interface for exchange-related operations.
*/
@@ -172,6 +189,7 @@ export interface InternalWalletState {
exchangeOps: ExchangeOperations;
recoupOps: RecoupOperations;
merchantOps: MerchantOperations;
+ refreshOps: RefreshOperations;
getDenomInfo(
ws: InternalWalletState,