+ WireSetupMessage

This commit is contained in:
swrup 2025-12-04 16:53:53 +01:00
parent 689c08ddf5
commit 21473a6ddc
2 changed files with 122 additions and 21 deletions

View file

@ -355,6 +355,88 @@ module GlobalFeesPS = struct
include MK (R)
end
module MasterWireDetailsPS = struct
module R = struct
(* purpose.purpose = TALER_SIGNATURE_MASTER_WIRE_DETAILS *)
type r = {
h_wire_details: FullPaytoHash.t;
h_conversion_url: Hash_64_cstr.t;
h_credit_restrictions: Hash_64_cstr.t;
h_debit_restrictions: Hash_64_cstr.t;
}
let bin =
let open Bin in
Purpose.make_bin Taler_signatures.master_wire_details @@ fun purpose ->
record
(fun
_purpose
h_wire_details
h_conversion_url
h_credit_restrictions
h_debit_restrictions
->
{
h_wire_details;
h_conversion_url;
h_credit_restrictions;
h_debit_restrictions;
})
|+ Purpose.field purpose
|+ field FullPaytoHash.bin (fun t -> t.h_wire_details)
|+ field Hash_64_cstr.bin (fun t -> t.h_conversion_url)
|+ field Hash_64_cstr.bin (fun t -> t.h_credit_restrictions)
|+ field Hash_64_cstr.bin (fun t -> t.h_debit_restrictions)
|> sealr
end
include R
include MK (R)
end
module MasterAddWirePS = struct
module R = struct
(* purpose.purpose = TALER_SIGNATURE_MASTER_ADD_WIRE *)
type r = {
start_date: TimeAbsoluteNBO.t;
h_wire: FullPaytoHash.t;
h_conversion_url: Hash_64_cstr.t;
h_credit_restrictions: Hash_64_cstr.t;
h_debit_restrictions: Hash_64_cstr.t;
}
let bin =
let open Bin in
Purpose.make_bin Taler_signatures.master_add_wire @@ fun _purpose ->
record
(fun
_purpose
start_date
h_wire
h_conversion_url
h_credit_restrictions
h_debit_restrictions
->
{
start_date;
h_wire;
h_conversion_url;
h_credit_restrictions;
h_debit_restrictions;
})
|+ Purpose.field _purpose
|+ field TimeAbsoluteNBO.bin (fun t -> t.start_date)
|+ field FullPaytoHash.bin (fun t -> t.h_wire)
|+ field Hash_64_cstr.bin (fun t -> t.h_conversion_url)
|+ field Hash_64_cstr.bin (fun t -> t.h_credit_restrictions)
|+ field Hash_64_cstr.bin (fun t -> t.h_debit_restrictions)
|> sealr
end
include R
include MK (R)
end
(* ### BIN IMPL END ### *)
module WithdrawRequestPS = struct
@ -473,16 +555,6 @@ module ExchangeKeySetPS = struct
}
end
module MasterWireDetailsPS = struct
(* purpose.purpose = TALER_SIGNATURE_MASTER_WIRE_DETAILS *)
type t = {
h_wire_details: FullPaytoHash.t;
h_conversion_url: Hash_64_cstr.t;
h_credit_restrictions: Hash_64_cstr.t;
h_debit_restrictions: Hash_64_cstr.t;
}
end
module MasterWireFeePS = struct
(* purpose.purpose = TALER_SIGNATURE_MASTER_WIRE_FEES *)
type t = {
@ -843,17 +915,6 @@ module CoinPurseRefundConfirmationPS = struct
}
end
module MasterAddWirePS = struct
(* purpose.purpose = TALER_SIGNATURE_MASTER_ADD_WIRE *)
type t = {
start_date: TimeAbsoluteNBO.t;
h_wire: FullPaytoHash.t;
h_conversion_url: Hash_64_cstr.t;
h_credit_restrictions: Hash_64_cstr.t;
h_debit_restrictions: Hash_64_cstr.t;
}
end
module MasterDelWirePS = struct
(* purpose.purpose = TALER_SIGNATURE_MASTER_DEL_WIRE *)
type t = {