aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-08-24 22:17:19 +0200
committerFlorian Dold <florian@dold.me>2022-08-24 22:17:19 +0200
commita11ac57535b0375f152ce115ee541cb8aca98e84 (patch)
tree95294389598f6d15c0de389a8e5024dc17592b15 /packages/taler-util
parentbf516a77e8d38e81ee9816d6ee0ab29bcb878e84 (diff)
downloadwallet-core-a11ac57535b0375f152ce115ee541cb8aca98e84.tar.xz
wallet-core: p2p support for transactions list
Diffstat (limited to 'packages/taler-util')
-rw-r--r--packages/taler-util/src/transactionsTypes.ts88
1 files changed, 83 insertions, 5 deletions
diff --git a/packages/taler-util/src/transactionsTypes.ts b/packages/taler-util/src/transactionsTypes.ts
index 645f0120b..c4bd3d464 100644
--- a/packages/taler-util/src/transactionsTypes.ts
+++ b/packages/taler-util/src/transactionsTypes.ts
@@ -102,7 +102,11 @@ export type Transaction =
| TransactionRefund
| TransactionTip
| TransactionRefresh
- | TransactionDeposit;
+ | TransactionDeposit
+ | TransactionPeerPullCredit
+ | TransactionPeerPullDebit
+ | TransactionPeerPushCredit
+ | TransactionPeerPushDebit;
export enum TransactionType {
Withdrawal = "withdrawal",
@@ -111,6 +115,10 @@ export enum TransactionType {
Refresh = "refresh",
Tip = "tip",
Deposit = "deposit",
+ PeerPushDebit = "peer-push-debit",
+ PeerPushCredit = "peer-push-credit",
+ PeerPullDebit = "peer-pull-debit",
+ PeerPullCredit = "peer-pull-credit",
}
export enum WithdrawalType {
@@ -179,6 +187,76 @@ export interface TransactionWithdrawal extends TransactionCommon {
withdrawalDetails: WithdrawalDetails;
}
+export interface TransactionPeerPullCredit extends TransactionCommon {
+ type: TransactionType.PeerPullCredit;
+
+ /**
+ * Exchange used.
+ */
+ exchangeBaseUrl: string;
+
+ /**
+ * Amount that got subtracted from the reserve balance.
+ */
+ amountRaw: AmountString;
+
+ /**
+ * Amount that actually was (or will be) added to the wallet's balance.
+ */
+ amountEffective: AmountString;
+}
+
+export interface TransactionPeerPullDebit extends TransactionCommon {
+ type: TransactionType.PeerPullDebit;
+
+ /**
+ * Exchange used.
+ */
+ exchangeBaseUrl: string;
+
+ amountRaw: AmountString;
+
+ amountEffective: AmountString;
+}
+
+export interface TransactionPeerPushDebit extends TransactionCommon {
+ type: TransactionType.PeerPushDebit;
+
+ /**
+ * Exchange used.
+ */
+ exchangeBaseUrl: string;
+
+ /**
+ * Amount that got subtracted from the reserve balance.
+ */
+ amountRaw: AmountString;
+
+ /**
+ * Amount that actually was (or will be) added to the wallet's balance.
+ */
+ amountEffective: AmountString;
+}
+
+export interface TransactionPeerPushCredit extends TransactionCommon {
+ type: TransactionType.PeerPushCredit;
+
+ /**
+ * Exchange used.
+ */
+ exchangeBaseUrl: string;
+
+ /**
+ * Amount that got subtracted from the reserve balance.
+ */
+ amountRaw: AmountString;
+
+ /**
+ * Amount that actually was (or will be) added to the wallet's balance.
+ */
+ amountEffective: AmountString;
+}
+
export enum PaymentStatus {
/**
* Explicitly aborted after timeout / failure
@@ -311,10 +389,10 @@ export interface OrderShortInfo {
}
export interface RefundInfoShort {
- transactionId: string,
- timestamp: TalerProtocolTimestamp,
- amountEffective: AmountString,
- amountRaw: AmountString,
+ transactionId: string;
+ timestamp: TalerProtocolTimestamp;
+ amountEffective: AmountString;
+ amountRaw: AmountString;
}
export interface TransactionRefund extends TransactionCommon {