summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/db.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-01-22 21:29:47 +0100
committerFlorian Dold <florian@dold.me>2024-01-22 21:29:47 +0100
commitfb5f098f9e60f03cdd6f78aba5aa248ec5889485 (patch)
tree2ddbf078597d48cbf9c85fa3c0491e5e63bb2196 /packages/taler-wallet-core/src/db.ts
parent88851f45403c1995c973bcae7ad2976db3c430c7 (diff)
downloadwallet-core-fb5f098f9e60f03cdd6f78aba5aa248ec5889485.tar.gz
wallet-core-fb5f098f9e60f03cdd6f78aba5aa248ec5889485.tar.bz2
wallet-core-fb5f098f9e60f03cdd6f78aba5aa248ec5889485.zip
wallet-core: implement and test balance reporting with scope info
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r--packages/taler-wallet-core/src/db.ts21
1 files changed, 21 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts
index ceca24c82..149d73abc 100644
--- a/packages/taler-wallet-core/src/db.ts
+++ b/packages/taler-wallet-core/src/db.ts
@@ -30,6 +30,8 @@ import {
import {
AbsoluteTime,
AgeCommitmentProof,
+ AmountJson,
+ AmountLike,
AmountString,
Amounts,
AttentionInfo,
@@ -1003,6 +1005,13 @@ export interface RefreshReasonDetails {
proposalId?: string;
}
+export interface RefreshGroupPerExchangeInfo {
+ /**
+ * (Expected) output once the refresh group succeeded.
+ */
+ outputEffective: AmountString;
+}
+
/**
* Group of refresh operations. The refreshed coins do not
* have to belong to the same exchange, but must have the same
@@ -1038,6 +1047,8 @@ export interface RefreshGroupRecord {
expectedOutputPerCoin: AmountString[];
+ infoPerExchange?: Record<string, RefreshGroupPerExchangeInfo>;
+
/**
* Flag for each coin whether refreshing finished.
* If a coin can't be refreshed (remaining value too small),
@@ -1717,6 +1728,14 @@ export interface DepositTrackingInfo {
exchangePub: string;
}
+export interface DepositInfoPerExchange {
+ /**
+ * Expected effective amount that will be deposited
+ * from coins of this exchange.
+ */
+ amountEffective: AmountJson;
+}
+
/**
* Group of deposits made by the wallet.
*/
@@ -1768,6 +1787,8 @@ export interface DepositGroupRecord {
statusPerCoin: DepositElementStatus[];
+ infoPerExchange?: Record<string, DepositInfoPerExchange>;
+
/**
* When the deposit transaction was aborted and
* refreshes were tried, we create a refresh