aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util/src/walletTypes.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-06-21 12:40:12 +0200
committerFlorian Dold <florian@dold.me>2022-07-08 11:08:30 +0200
commitb214934b75418d0d01c9556577d9594f1db5a319 (patch)
treed8ec18217a16e6b89859b30003a4a825fc63a66e /packages/taler-util/src/walletTypes.ts
parent05cdbfb534bb194dbe6bdf049113ebea8139234f (diff)
downloadwallet-core-b214934b75418d0d01c9556577d9594f1db5a319.tar.xz
wallet-core: P2P push payments (still incomplete)
Diffstat (limited to 'packages/taler-util/src/walletTypes.ts')
-rw-r--r--packages/taler-util/src/walletTypes.ts27
1 files changed, 19 insertions, 8 deletions
diff --git a/packages/taler-util/src/walletTypes.ts b/packages/taler-util/src/walletTypes.ts
index 2e5dd418d..4b1911164 100644
--- a/packages/taler-util/src/walletTypes.ts
+++ b/packages/taler-util/src/walletTypes.ts
@@ -32,10 +32,7 @@ import {
codecForAmountJson,
codecForAmountString,
} from "./amounts.js";
-import {
- codecForTimestamp,
- TalerProtocolTimestamp,
-} from "./time.js";
+import { codecForTimestamp, TalerProtocolTimestamp } from "./time.js";
import {
buildCodecForObject,
codecForString,
@@ -1230,15 +1227,14 @@ export interface ForcedCoinSel {
}
export interface TestPayResult {
- payCoinSelection: PayCoinSelection,
+ payCoinSelection: PayCoinSelection;
}
-
/**
* Result of selecting coins, contains the exchange, and selected
* coins with their denomination.
*/
- export interface PayCoinSelection {
+export interface PayCoinSelection {
/**
* Amount requested by the merchant.
*/
@@ -1263,4 +1259,19 @@ export interface TestPayResult {
* How much of the deposit fees is the customer paying?
*/
customerDepositFees: AmountJson;
-} \ No newline at end of file
+}
+
+export interface InitiatePeerPushPaymentRequest {
+ amount: AmountString;
+}
+
+export interface InitiatePeerPushPaymentResponse {
+ pursePub: string;
+ mergePriv: string;
+}
+
+export const codecForInitiatePeerPushPaymentRequest =
+ (): Codec<InitiatePeerPushPaymentRequest> =>
+ buildCodecForObject<InitiatePeerPushPaymentRequest>()
+ .property("amount", codecForAmountString())
+ .build("InitiatePeerPushPaymentRequest");