From 79a2eed5589468c2df3e4ee2d190d9fc43b80fe9 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 26 Apr 2017 03:10:52 +0200 Subject: remove dependency in taler-wallet-lib, implement pay signature check/storage --- src/emscriptif.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/emscriptif.ts') diff --git a/src/emscriptif.ts b/src/emscriptif.ts index 0b3f2ae71..3a34f6451 100644 --- a/src/emscriptif.ts +++ b/src/emscriptif.ts @@ -206,6 +206,7 @@ export enum SignaturePurpose { MASTER_DENOMINATION_KEY_VALIDITY = 1025, WALLET_COIN_MELT = 1202, TEST = 4242, + MERCHANT_PAYMENT_OK = 1104, } @@ -1134,6 +1135,26 @@ export class DenominationKeyValidityPS extends SignatureStruct { } } +export interface PaymentSignaturePS_args { + contract_hash: HashCode; +} + +export class PaymentSignaturePS extends SignatureStruct { + constructor(w: PaymentSignaturePS_args) { + super(w); + } + + purpose() { + return SignaturePurpose.MERCHANT_PAYMENT_OK; + } + + fieldTypes() { + return [ + ["contract_hash", HashCode], + ]; + } +} + export class RsaPublicKey extends MallocArenaObject { static fromCrock(s: string): RsaPublicKey { -- cgit v1.2.3