+ WireFeeSetupMessage
This commit is contained in:
parent
23ac34e3d7
commit
6cccfe76ef
1 changed files with 42 additions and 0 deletions
42
src/api.ml
42
src/api.ml
|
|
@ -389,3 +389,45 @@ module AuditorTeardownMessage = struct
|
||||||
|> mem "validity_end" Timestamp.jsont ~enc:validity_end
|
|> mem "validity_end" Timestamp.jsont ~enc:validity_end
|
||||||
|> finish
|
|> finish
|
||||||
end
|
end
|
||||||
|
|
||||||
|
module WireFeeSetupMessage = struct
|
||||||
|
type t = {
|
||||||
|
wire_method: string;
|
||||||
|
(* TODO over which struct?
|
||||||
|
Signature using the exchange's offline key
|
||||||
|
with purpose TALER_SIGNATURE_MASTER_WIRE_FEES *)
|
||||||
|
master_sig_wire: EddsaSignature.t;
|
||||||
|
fee_start: Amount.t;
|
||||||
|
fee_end: Amount.t;
|
||||||
|
closing_fee: Amount.t;
|
||||||
|
wire_fee: Amount.t;
|
||||||
|
}
|
||||||
|
|
||||||
|
let jsont =
|
||||||
|
let make wire_method master_sig_wire fee_start fee_end closing_fee wire_fee
|
||||||
|
=
|
||||||
|
{
|
||||||
|
wire_method;
|
||||||
|
master_sig_wire;
|
||||||
|
fee_start;
|
||||||
|
fee_end;
|
||||||
|
closing_fee;
|
||||||
|
wire_fee;
|
||||||
|
}
|
||||||
|
in
|
||||||
|
let wire_method v = v.wire_method in
|
||||||
|
let master_sig_wire v = v.master_sig_wire in
|
||||||
|
let fee_start v = v.fee_start in
|
||||||
|
let fee_end v = v.fee_end in
|
||||||
|
let closing_fee v = v.closing_fee in
|
||||||
|
let wire_fee v = v.wire_fee in
|
||||||
|
let open Jsont.Object in
|
||||||
|
map ~kind:"WireFeeSetupMessage" make
|
||||||
|
|> mem "wire_method" Jsont.string ~enc:wire_method
|
||||||
|
|> mem "master_sig_wire" EddsaSignature.jsont ~enc:master_sig_wire
|
||||||
|
|> mem "fee_start" Amount.jsont ~enc:fee_start
|
||||||
|
|> mem "fee_end" Amount.jsont ~enc:fee_end
|
||||||
|
|> mem "closing_fee" Amount.jsont ~enc:closing_fee
|
||||||
|
|> mem "wire_fee" Amount.jsont ~enc:wire_fee
|
||||||
|
|> finish
|
||||||
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue