aboutsummaryrefslogtreecommitdiff
path: root/src/types/talerTypes.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-07-21 12:23:48 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-07-21 12:23:48 +0530
commitf4a8702b3cf93f9edf96d1d1c8cb88baa309e301 (patch)
treeec8c62271e7f220da32858a04c901b1962d2b4b3 /src/types/talerTypes.ts
parentdd2efc3d78f2dfda44f8182f9638723dcb839781 (diff)
downloadwallet-core-f4a8702b3cf93f9edf96d1d1c8cb88baa309e301.tar.xz
towards consuming new merchant API
Diffstat (limited to 'src/types/talerTypes.ts')
-rw-r--r--src/types/talerTypes.ts36
1 files changed, 10 insertions, 26 deletions
diff --git a/src/types/talerTypes.ts b/src/types/talerTypes.ts
index 0221d26bb..232f5f314 100644
--- a/src/types/talerTypes.ts
+++ b/src/types/talerTypes.ts
@@ -215,7 +215,7 @@ export interface CoinDepositPermission {
/**
* The denomination public key associated with this coin.
*/
- denom_pub: string;
+ h_denom: string;
/**
* The amount that is subtracted from this coin with this payment.
*/
@@ -433,31 +433,6 @@ export class ContractTerms {
extra: any;
}
-/**
- * Payment body sent to the merchant's /pay.
- */
-export interface PayReq {
- /**
- * Coins with signature.
- */
- coins: CoinDepositPermission[];
-
- /**
- * The merchant public key, used to uniquely
- * identify the merchant instance.
- */
- merchant_pub: string;
-
- /**
- * Order ID that's being payed for.
- */
- order_id: string;
-
- /**
- * Mode for /pay.
- */
- mode: "pay" | "abort-refund";
-}
/**
* Refund permission in the format that the merchant gives it to us.
@@ -809,6 +784,10 @@ export interface CoinDumpJson {
}>;
}
+export interface MerchantPayResponse {
+ sig: string;
+}
+
export type AmountString = string;
export type Base32String = string;
export type EddsaSignatureString = string;
@@ -1044,3 +1023,8 @@ export const codecForWithdrawResponse = (): Codec<WithdrawResponse> =>
makeCodecForObject<WithdrawResponse>()
.property("ev_sig", codecForString)
.build("WithdrawResponse");
+
+export const codecForMerchantPayResponse = (): Codec<MerchantPayResponse> =>
+ makeCodecForObject<MerchantPayResponse>()
+ .property("sig", codecForString)
+ .build("MerchantPayResponse");