diff options
Diffstat (limited to 'packages/taler-wallet-core/src/types/transactionsTypes.ts')
-rw-r--r-- | packages/taler-wallet-core/src/types/transactionsTypes.ts | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/types/transactionsTypes.ts b/packages/taler-wallet-core/src/types/transactionsTypes.ts index 0a683f298..81dc78039 100644 --- a/packages/taler-wallet-core/src/types/transactionsTypes.ts +++ b/packages/taler-wallet-core/src/types/transactionsTypes.ts @@ -94,7 +94,8 @@ export type Transaction = | TransactionPayment | TransactionRefund | TransactionTip - | TransactionRefresh; + | TransactionRefresh + | TransactionDeposit; export enum TransactionType { Withdrawal = "withdrawal", @@ -102,6 +103,7 @@ export enum TransactionType { Refund = "refund", Refresh = "refresh", Tip = "tip", + Deposit = "deposit", } export enum WithdrawalType { @@ -308,6 +310,31 @@ interface TransactionRefresh extends TransactionCommon { amountEffective: AmountString; } +/** + * Deposit transaction, which effectively sends + * money from this wallet somewhere else. + */ +interface TransactionDeposit extends TransactionCommon { + type: TransactionType.Deposit; + + depositGroupId: string; + + /** + * Target for the deposit. + */ + targetPaytoUri: string; + + /** + * Raw amount that is being deposited + */ + amountRaw: AmountString; + + /** + * Effective amount that is being deposited + */ + amountEffective: AmountString; +} + export const codecForTransactionsRequest = (): Codec<TransactionsRequest> => buildCodecForObject<TransactionsRequest>() .property("currency", codecOptional(codecForString())) |