diff options
author | Florian Dold <florian@dold.me> | 2023-09-11 18:19:45 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-09-11 18:20:00 +0200 |
commit | cc27750a79d8d4dbbedaa0dfcf21fe21a7464936 (patch) | |
tree | d1d6392fe35018fd784d0789f6089f9f933002bc /packages/taler-util/src | |
parent | 905be0124a1b013d802db33265879d4b80501362 (diff) | |
download | wallet-core-cc27750a79d8d4dbbedaa0dfcf21fe21a7464936.tar.xz |
-WalletContractData doesn't belong to the DB
Diffstat (limited to 'packages/taler-util/src')
-rw-r--r-- | packages/taler-util/src/wallet-types.ts | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts index c6f19c73f..f7bd3d120 100644 --- a/packages/taler-util/src/wallet-types.ts +++ b/packages/taler-util/src/wallet-types.ts @@ -57,7 +57,9 @@ import { DenomKeyType, DenominationPubKey, ExchangeAuditor, + InternationalizedString, MerchantContractTerms, + MerchantInfo, PeerContractTerms, UnblindedSignature, codecForMerchantContractTerms, @@ -2667,3 +2669,49 @@ export const codecForTestingSetTimetravelRequest = buildCodecForObject<TestingSetTimetravelRequest>() .property("offsetMs", codecForNumber()) .build("TestingSetTimetravelRequest"); + +export interface AllowedAuditorInfo { + auditorBaseUrl: string; + auditorPub: string; +} + +export interface AllowedExchangeInfo { + exchangeBaseUrl: string; + exchangePub: string; +} + +/** + * Data extracted from the contract terms that is relevant for payment + * processing in the wallet. + */ +export interface WalletContractData { + /** + * Fulfillment URL, or the empty string if the order has no fulfillment URL. + * + * Stored as a non-nullable string as we use this field for IndexedDB indexing. + */ + fulfillmentUrl: string; + + contractTermsHash: string; + fulfillmentMessage?: string; + fulfillmentMessageI18n?: InternationalizedString; + merchantSig: string; + merchantPub: string; + merchant: MerchantInfo; + amount: AmountString; + orderId: string; + merchantBaseUrl: string; + summary: string; + summaryI18n: { [lang_tag: string]: string } | undefined; + autoRefund: TalerProtocolDuration | undefined; + maxWireFee: AmountString; + wireFeeAmortization: number; + payDeadline: TalerProtocolTimestamp; + refundDeadline: TalerProtocolTimestamp; + allowedExchanges: AllowedExchangeInfo[]; + timestamp: TalerProtocolTimestamp; + wireMethod: string; + wireInfoHash: string; + maxDepositFee: AmountString; + minimumAge?: number; +} |