From f4a8702b3cf93f9edf96d1d1c8cb88baa309e301 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 21 Jul 2020 12:23:48 +0530 Subject: towards consuming new merchant API --- src/types/talerTypes.ts | 36 ++++++++++-------------------------- 1 file changed, 10 insertions(+), 26 deletions(-) (limited to 'src/types/talerTypes.ts') 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 => makeCodecForObject() .property("ev_sig", codecForString) .build("WithdrawResponse"); + +export const codecForMerchantPayResponse = (): Codec => + makeCodecForObject() + .property("sig", codecForString) + .build("MerchantPayResponse"); -- cgit v1.2.3