+ WireTeardownMessage
This commit is contained in:
parent
21473a6ddc
commit
5a5e19e3ff
2 changed files with 45 additions and 8 deletions
23
src/api.ml
23
src/api.ml
|
|
@ -523,3 +523,26 @@ module WireSetupMessage = struct
|
||||||
|> mem "priority" (Jsont.option Jsont.int) ~enc:priority
|
|> mem "priority" (Jsont.option Jsont.int) ~enc:priority
|
||||||
|> finish
|
|> finish
|
||||||
end
|
end
|
||||||
|
|
||||||
|
module WireTeardownMessage = struct
|
||||||
|
type t = {
|
||||||
|
payto_uri: string;
|
||||||
|
master_sig_del: MasterDelWirePS.t;
|
||||||
|
(* TODO time monotonic *)
|
||||||
|
validity_end: Timestamp.t;
|
||||||
|
}
|
||||||
|
|
||||||
|
let jsont =
|
||||||
|
let make payto_uri master_sig_del validity_end =
|
||||||
|
{ payto_uri; master_sig_del; validity_end }
|
||||||
|
in
|
||||||
|
let payto_uri v = v.payto_uri in
|
||||||
|
let master_sig_del v = v.master_sig_del in
|
||||||
|
let validity_end v = v.validity_end in
|
||||||
|
let open Jsont.Object in
|
||||||
|
map ~kind:"WireTeardownMessage" make
|
||||||
|
|> mem "payto_uri" Jsont.string ~enc:payto_uri
|
||||||
|
|> mem "master_sig_del" MasterDelWirePS.jsont ~enc:master_sig_del
|
||||||
|
|> mem "validity_end" Timestamp.jsont ~enc:validity_end
|
||||||
|
|> finish
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -437,6 +437,28 @@ module MasterAddWirePS = struct
|
||||||
include MK (R)
|
include MK (R)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
module MasterDelWirePS = struct
|
||||||
|
module R = struct
|
||||||
|
(* purpose.purpose = TALER_SIGNATURE_MASTER_DEL_WIRE *)
|
||||||
|
type r = {
|
||||||
|
end_date: TimeAbsoluteNBO.t;
|
||||||
|
h_wire: FullPaytoHash.t;
|
||||||
|
}
|
||||||
|
|
||||||
|
let bin =
|
||||||
|
let open Bin in
|
||||||
|
Purpose.make_bin Taler_signatures.master_del_wire @@ fun _purpose ->
|
||||||
|
record (fun _purpose end_date h_wire -> { end_date; h_wire })
|
||||||
|
|+ Purpose.field _purpose
|
||||||
|
|+ field TimeAbsoluteNBO.bin (fun t -> t.end_date)
|
||||||
|
|+ field FullPaytoHash.bin (fun t -> t.h_wire)
|
||||||
|
|> sealr
|
||||||
|
end
|
||||||
|
|
||||||
|
include R
|
||||||
|
include MK (R)
|
||||||
|
end
|
||||||
|
|
||||||
(* ### BIN IMPL END ### *)
|
(* ### BIN IMPL END ### *)
|
||||||
|
|
||||||
module WithdrawRequestPS = struct
|
module WithdrawRequestPS = struct
|
||||||
|
|
@ -915,14 +937,6 @@ module CoinPurseRefundConfirmationPS = struct
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
module MasterDelWirePS = struct
|
|
||||||
(* purpose.purpose = TALER_SIGNATURE_MASTER_DEL_WIRE *)
|
|
||||||
type t = {
|
|
||||||
end_date: TimeAbsoluteNBO.t;
|
|
||||||
h_wire: FullPaytoHash.t;
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
module MasterAmlOfficerStatusPS = struct
|
module MasterAmlOfficerStatusPS = struct
|
||||||
(* purpose.purpose = TALER_SIGNATURE_MASTER_AML_KEY *)
|
(* purpose.purpose = TALER_SIGNATURE_MASTER_AML_KEY *)
|
||||||
type t = {
|
type t = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue