This commit is contained in:
swrup 2025-10-07 12:02:05 +02:00
parent 8fb5a5d2e6
commit 4c239063e2

View file

@ -468,3 +468,33 @@ module Withdraw_request_ps = struct
|+ field Age_mask.bin (fun t -> t.mask)
|> sealr
end
module Withdraw_confirmation_ps = struct
type t = {
(* Purpose is #TALER_SIGNATURE_EXCHANGE_CONFIRM_WITHDRAW.
Signed by a `struct TALER_ExchangePrivateKeyP` using EdDSA. *)
purpose: Ecc_signature_purpose.t;
(* Commitment made in the /withdraw request.
Also needed for the /reveal-withdraw endpoint (in case
of required proof of age restriction) and for /recoup *)
(* TODO TALER doc
missing TALER_HashBlindedPlanchetsP*)
h_planchets: Hash_planchets_p.t;
(* If proof of age restriction is not required for to this
withdrawal, (i.e. max_age was not set during the request)
MUST be 0xFFFFFFFF.
Otherwise (i.e. proof of age restriction required):
index that the client will not have to reveal, in NBO,
MUST be smaller than #TALER_CNC_KAPPA. *)
noreveal_index: int32;
}
let bin =
let open Bin in
record (fun purpose h_planchets noreveal_index ->
{ purpose; h_planchets; noreveal_index })
|+ field Ecc_signature_purpose.bin (fun t -> t.purpose)
|+ field Hash_planchets_p.bin (fun t -> t.h_planchets)
|+ field beint32 (fun t -> t.noreveal_index)
|> sealr
end