From f8d12f7b0d4af1b1769b89e80c87f9c169678564 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 18 Mar 2022 15:32:41 +0100 Subject: wallet: t_s/d_us migration --- packages/taler-util/src/talerTypes.ts | 51 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 26 deletions(-) (limited to 'packages/taler-util/src/talerTypes.ts') diff --git a/packages/taler-util/src/talerTypes.ts b/packages/taler-util/src/talerTypes.ts index 4ccfffce0..b1bf6ab38 100644 --- a/packages/taler-util/src/talerTypes.ts +++ b/packages/taler-util/src/talerTypes.ts @@ -38,15 +38,14 @@ import { codecForConstNumber, buildCodecForUnion, codecForConstString, - codecForEither, } from "./codec.js"; import { - Timestamp, codecForTimestamp, - Duration, codecForDuration, + TalerProtocolTimestamp, + TalerProtocolDuration, } from "./time.js"; -import { Amounts, codecForAmountString } from "./amounts.js"; +import { codecForAmountString } from "./amounts.js"; import { strcmp } from "./helpers.js"; /** @@ -86,24 +85,24 @@ export class ExchangeDenomination { /** * Start date from which withdraw is allowed. */ - stamp_start: Timestamp; + stamp_start: TalerProtocolTimestamp; /** * End date for withdrawing. */ - stamp_expire_withdraw: Timestamp; + stamp_expire_withdraw: TalerProtocolTimestamp; /** * Expiration date after which the exchange can forget about * the currency. */ - stamp_expire_legal: Timestamp; + stamp_expire_legal: TalerProtocolTimestamp; /** * Date after which the coins of this denomination can't be * deposited anymore. */ - stamp_expire_deposit: Timestamp; + stamp_expire_deposit: TalerProtocolTimestamp; /** * Signature over the denomination information by the exchange's master @@ -394,7 +393,7 @@ export interface Product { taxes?: Tax[]; // time indicating when this product should be delivered - delivery_date?: Timestamp; + delivery_date?: TalerProtocolTimestamp; } export interface InternationalizedString { @@ -413,7 +412,7 @@ export interface ContractTerms { /** * Hash of the merchant's wire details. */ - auto_refund?: Duration; + auto_refund?: TalerProtocolDuration; /** * Wire method the merchant wants to use. @@ -445,7 +444,7 @@ export interface ContractTerms { /** * Deadline to pay for the contract. */ - pay_deadline: Timestamp; + pay_deadline: TalerProtocolTimestamp; /** * Maximum deposit fee covered by the merchant. @@ -466,7 +465,7 @@ export interface ContractTerms { * Time indicating when the order should be delivered. * May be overwritten by individual products. */ - delivery_date?: Timestamp; + delivery_date?: TalerProtocolTimestamp; /** * Delivery location for (all!) products. @@ -486,17 +485,17 @@ export interface ContractTerms { /** * Deadline for refunds. */ - refund_deadline: Timestamp; + refund_deadline: TalerProtocolTimestamp; /** * Deadline for the wire transfer. */ - wire_transfer_deadline: Timestamp; + wire_transfer_deadline: TalerProtocolTimestamp; /** * Time when the contract was generated by the merchant. */ - timestamp: Timestamp; + timestamp: TalerProtocolTimestamp; /** * Order id to uniquely identify the purchase within @@ -700,9 +699,9 @@ export class Recoup { * Structure of one exchange signing key in the /keys response. */ export class ExchangeSignKeyJson { - stamp_start: Timestamp; - stamp_expire: Timestamp; - stamp_end: Timestamp; + stamp_start: TalerProtocolTimestamp; + stamp_expire: TalerProtocolTimestamp; + stamp_end: TalerProtocolTimestamp; key: EddsaPublicKeyString; master_sig: EddsaSignatureString; } @@ -729,7 +728,7 @@ export class ExchangeKeysJson { /** * Timestamp when this response was issued. */ - list_issue_date: Timestamp; + list_issue_date: TalerProtocolTimestamp; /** * List of revoked denominations. @@ -747,7 +746,7 @@ export class ExchangeKeysJson { */ version: string; - reserve_closing_delay: Duration; + reserve_closing_delay: TalerProtocolDuration; } /** @@ -774,12 +773,12 @@ export class WireFeesJson { /** * Date from which the fee applies. */ - start_date: Timestamp; + start_date: TalerProtocolTimestamp; /** * Data after which the fee doesn't apply anymore. */ - end_date: Timestamp; + end_date: TalerProtocolTimestamp; } export interface AccountInfo { @@ -850,7 +849,7 @@ export class TipPickupGetResponse { exchange_url: string; - expiration: Timestamp; + expiration: TalerProtocolTimestamp; } export enum DenomKeyType { @@ -1067,7 +1066,7 @@ export interface MerchantCoinRefundSuccessStatus { // to the customer. refund_amount: AmountString; - execution_time: Timestamp; + execution_time: TalerProtocolTimestamp; } export interface MerchantCoinRefundFailureStatus { @@ -1092,7 +1091,7 @@ export interface MerchantCoinRefundFailureStatus { // to the customer. refund_amount: AmountString; - execution_time: Timestamp; + execution_time: TalerProtocolTimestamp; } export interface MerchantOrderStatusUnpaid { @@ -1733,7 +1732,7 @@ export interface DepositSuccess { transaction_base_url?: string; // timestamp when the deposit was received by the exchange. - exchange_timestamp: Timestamp; + exchange_timestamp: TalerProtocolTimestamp; // the EdDSA signature of TALER_DepositConfirmationPS using a current // signing key of the exchange affirming the successful -- cgit v1.2.3