From 4c03a1200eb947a0ed13f78b46fd670601b8cb80 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 1 May 2017 04:05:16 +0200 Subject: implement payback (with rudimentary UI) --- src/emscriptif.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/emscriptif.ts') diff --git a/src/emscriptif.ts b/src/emscriptif.ts index 347ee54a0..caa0fb8cc 100644 --- a/src/emscriptif.ts +++ b/src/emscriptif.ts @@ -208,6 +208,7 @@ export enum SignaturePurpose { TEST = 4242, MERCHANT_PAYMENT_OK = 1104, MASTER_WIRE_FEES = 1028, + WALLET_COIN_PAYBACK = 1203, } @@ -966,6 +967,32 @@ export class WithdrawRequestPS extends SignatureStruct { } +export interface PaybackRequestPS_args { + coin_pub: EddsaPublicKey; + h_denom_pub: HashCode; + coin_blind: RsaBlindingKeySecret; +} + + +export class PaybackRequestPS extends SignatureStruct { + constructor(w: PaybackRequestPS_args) { + super(w); + } + + purpose() { + return SignaturePurpose.WALLET_COIN_PAYBACK; + } + + fieldTypes() { + return [ + ["coin_pub", EddsaPublicKey], + ["h_denom_pub", HashCode], + ["coin_blind", RsaBlindingKeySecret], + ]; + } +} + + interface RefreshMeltCoinAffirmationPS_Args { session_hash: HashCode; amount_with_fee: AmountNbo; -- cgit v1.2.3