commit 4e16c48f2b12be7f4a34a5e42772d3ce748e7302
parent 32c1b090e9975a6d7019e4af7ba8a57ee36251c8
Author: Florian Dold <florian@dold.me>
Date: Sat, 30 May 2026 13:29:28 +0200
util: add field valid_at to MerchantContractOutputToken
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/packages/taler-util/src/types-taler-merchant.ts b/packages/taler-util/src/types-taler-merchant.ts
@@ -87,7 +87,7 @@ import {
codecForInternationalizedString,
codecForURLString,
} from "./types-taler-common.js";
-import { codecForCanonBaseUrl, PayWalletData } from "./types-taler-wallet.js";
+import { PayWalletData, codecForCanonBaseUrl } from "./types-taler-wallet.js";
/**
* Proposal returned from the contract URL.
@@ -794,6 +794,12 @@ export interface MerchantContractOutputToken {
// Defaults to one if the field is not provided.
count?: Integer;
+ // When should the output token be valid. Can be specified if the
+ // desired validity period should be in the future (like selling
+ // a subscription for the next month). Optional. If not given,
+ // the validity is supposed to be "now" (time of order creation).
+ valid_at?: Timestamp;
+
// Index of the public key for this output token
// in the ContractTokenFamily keys array.
key_index: Integer;
@@ -1106,6 +1112,7 @@ export const codecForMerchantContractOutputToken =
.property("type", codecForConstString(MerchantContractOutputType.Token))
.property("token_family_slug", codecForString())
.property("count", codecOptional(codecForNumber()))
+ .property("valid_at", codecOptional(codecForTimestamp))
.property("key_index", codecForNumber())
.build("TalerMerchantApi.ContractOutputToken");