+ AuditorTeardownMessage
This commit is contained in:
parent
97b8e921bc
commit
23ac34e3d7
2 changed files with 41 additions and 8 deletions
19
src/api.ml
19
src/api.ml
|
|
@ -370,3 +370,22 @@ module AuditorSetupMessage = struct
|
|||
|> mem "validity_start" Timestamp.jsont ~enc:validity_start
|
||||
|> finish
|
||||
end
|
||||
|
||||
module AuditorTeardownMessage = struct
|
||||
type t = {
|
||||
master_sig: MasterDelAuditorPS.t;
|
||||
(* TODO time
|
||||
something about using monotonic system time here! *)
|
||||
validity_end: Timestamp.t;
|
||||
}
|
||||
|
||||
let jsont =
|
||||
let make master_sig validity_end = { master_sig; validity_end } in
|
||||
let master_sig v = v.master_sig in
|
||||
let validity_end v = v.validity_end in
|
||||
let open Jsont.Object in
|
||||
map ~kind:"AuditorTeardownMessage" make
|
||||
|> mem "master_sig" MasterDelAuditorPS.jsont ~enc:master_sig
|
||||
|> mem "validity_end" Timestamp.jsont ~enc:validity_end
|
||||
|> finish
|
||||
end
|
||||
|
|
|
|||
|
|
@ -270,6 +270,28 @@ module MasterAddAuditorPS = struct
|
|||
include MK (R)
|
||||
end
|
||||
|
||||
module MasterDelAuditorPS = struct
|
||||
module R = struct
|
||||
(* purpose.purpose = TALER_SIGNATURE_MASTER_DEL_AUDITOR *)
|
||||
type r = {
|
||||
end_date: TimeAbsoluteNBO.t;
|
||||
auditor_pub: AuditorPublicKeyP.t;
|
||||
}
|
||||
|
||||
let bin =
|
||||
let open Bin in
|
||||
Purpose.make_bin Taler_signatures.master_del_auditor @@ fun purpose ->
|
||||
record (fun _purpose end_date auditor_pub -> { end_date; auditor_pub })
|
||||
|+ Purpose.field purpose
|
||||
|+ field TimeAbsoluteNBO.bin (fun t -> t.end_date)
|
||||
|+ field AuditorPublicKeyP.bin (fun t -> t.auditor_pub)
|
||||
|> sealr
|
||||
end
|
||||
|
||||
include R
|
||||
include MK (R)
|
||||
end
|
||||
|
||||
(* ### BIN IMPL END ### *)
|
||||
|
||||
module WithdrawRequestPS = struct
|
||||
|
|
@ -774,14 +796,6 @@ module CoinPurseRefundConfirmationPS = struct
|
|||
}
|
||||
end
|
||||
|
||||
module MasterDelAuditorPS = struct
|
||||
(* purpose.purpose = TALER_SIGNATURE_MASTER_DEL_AUDITOR *)
|
||||
type t = {
|
||||
end_date: TimeAbsoluteNBO.t;
|
||||
auditor_pub: AuditorPublicKeyP.t;
|
||||
}
|
||||
end
|
||||
|
||||
module MasterAddWirePS = struct
|
||||
(* purpose.purpose = TALER_SIGNATURE_MASTER_ADD_WIRE *)
|
||||
type t = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue