diff options
Diffstat (limited to 'packages/taler-util/src/taler-types.ts')
-rw-r--r-- | packages/taler-util/src/taler-types.ts | 46 |
1 files changed, 12 insertions, 34 deletions
diff --git a/packages/taler-util/src/taler-types.ts b/packages/taler-util/src/taler-types.ts index fe8f47e30..b5932aba6 100644 --- a/packages/taler-util/src/taler-types.ts +++ b/packages/taler-util/src/taler-types.ts @@ -58,7 +58,7 @@ import { /** * Denomination as found in the /keys response from the exchange. */ -export class ExchangeDenomination { +export interface ExchangeDenomination { /** * Value of one coin of the denomination. */ @@ -121,7 +121,7 @@ export class ExchangeDenomination { /** * Signature by the auditor that a particular denomination key is audited. */ -export class AuditorDenomSig { +export interface AuditorDenomSig { /** * Denomination public key's hash. */ @@ -136,7 +136,7 @@ export class AuditorDenomSig { /** * Auditor information as given by the exchange in /keys. */ -export class ExchangeAuditor { +export interface ExchangeAuditor { /** * Auditor's public key. */ @@ -702,7 +702,7 @@ export interface MerchantTipResponseV2 { * Element of the payback list that the * exchange gives us in /keys. */ -export class Recoup { +export interface Recoup { /** * The hash of the denomination public key for which the payback is offered. */ @@ -712,7 +712,7 @@ export class Recoup { /** * Structure of one exchange signing key in the /keys response. */ -export class ExchangeSignKeyJson { +export interface ExchangeSignKeyJson { stamp_start: TalerProtocolTimestamp; stamp_expire: TalerProtocolTimestamp; stamp_end: TalerProtocolTimestamp; @@ -723,7 +723,7 @@ export class ExchangeSignKeyJson { /** * Structure that the exchange gives us in /keys. */ -export class ExchangeKeysJson { +export interface ExchangeKeysJson { /** * Canonical, public base URL of the exchange. */ @@ -917,7 +917,7 @@ export interface GlobalFees { /** * Wire fees as announced by the exchange. */ -export class WireFeesJson { +export interface WireFeesJson { /** * Cost of a wire transfer. */ @@ -947,7 +947,7 @@ export class WireFeesJson { /** * Proposal returned from the contract URL. */ -export class Proposal { +export interface Proposal { /** * Contract terms for the propoal. * Raw, un-decoded JSON object. @@ -964,7 +964,7 @@ export class Proposal { /** * Response from the internal merchant API. */ -export class CheckPaymentResponse { +export interface CheckPaymentResponse { order_status: string; refunded: boolean | undefined; refunded_amount: string | undefined; @@ -976,7 +976,7 @@ export class CheckPaymentResponse { /** * Response from the bank. */ -export class WithdrawOperationStatusResponse { +export interface WithdrawOperationStatusResponse { status: "selected" | "aborted" | "confirmed" | "pending"; selection_done: boolean; @@ -996,19 +996,6 @@ export class WithdrawOperationStatusResponse { wire_types: string[]; } -/** - * Response from the merchant. - */ -export class RewardPickupGetResponse { - reward_amount: string; - - exchange_url: string; - - next_url?: string; - - expiration: TalerProtocolTimestamp; -} - export enum DenomKeyType { Rsa = "RSA", ClauseSchnorr = "CS", @@ -1050,11 +1037,11 @@ export const codecForBlindedDenominationSignature = () => .alternative(DenomKeyType.Rsa, codecForRsaBlindedDenominationSignature()) .build("BlindedDenominationSignature"); -export class ExchangeWithdrawResponse { +export interface ExchangeWithdrawResponse { ev_sig: BlindedDenominationSignature; } -export class ExchangeWithdrawBatchResponse { +export interface ExchangeWithdrawBatchResponse { ev_sigs: ExchangeWithdrawResponse[]; } @@ -1594,15 +1581,6 @@ export const codecForWithdrawOperationStatusResponse = .property("wire_types", codecForList(codecForString())) .build("WithdrawOperationStatusResponse"); -export const codecForRewardPickupGetResponse = - (): Codec<RewardPickupGetResponse> => - buildCodecForObject<RewardPickupGetResponse>() - .property("reward_amount", codecForString()) - .property("exchange_url", codecForString()) - .property("next_url", codecOptional(codecForString())) - .property("expiration", codecForTimestamp) - .build("TipPickupGetResponse"); - export const codecForRecoupConfirmation = (): Codec<RecoupConfirmation> => buildCodecForObject<RecoupConfirmation>() .property("reserve_pub", codecOptional(codecForString())) |