+ GlobalFees
This commit is contained in:
parent
6cccfe76ef
commit
689c08ddf5
2 changed files with 115 additions and 16 deletions
|
|
@ -292,6 +292,69 @@ module MasterDelAuditorPS = struct
|
|||
include MK (R)
|
||||
end
|
||||
|
||||
module GlobalFeesPS = struct
|
||||
module R = struct
|
||||
(* purpose.purpose = TALER_SIGNATURE_MASTER_GLOBAL_FEES *)
|
||||
type r = {
|
||||
start_date: TimeAbsoluteNBO.t;
|
||||
end_date: TimeAbsoluteNBO.t;
|
||||
purse_timeout: TimeRelativeNBO.t;
|
||||
kyc_timeout: TimeRelativeNBO.t;
|
||||
history_expiration: TimeRelativeNBO.t;
|
||||
history_fee: AmountNBO.t;
|
||||
kyc_fee: AmountNBO.t;
|
||||
account_fee: AmountNBO.t;
|
||||
purse_fee: AmountNBO.t;
|
||||
purse_account_limit: int32;
|
||||
}
|
||||
|
||||
let bin =
|
||||
let open Bin in
|
||||
Purpose.make_bin Taler_signatures.master_global_fees @@ fun purpose ->
|
||||
record
|
||||
(fun
|
||||
_purpose
|
||||
start_date
|
||||
end_date
|
||||
purse_timeout
|
||||
kyc_timeout
|
||||
history_expiration
|
||||
history_fee
|
||||
kyc_fee
|
||||
account_fee
|
||||
purse_fee
|
||||
purse_account_limit
|
||||
->
|
||||
{
|
||||
start_date;
|
||||
end_date;
|
||||
purse_timeout;
|
||||
kyc_timeout;
|
||||
history_expiration;
|
||||
history_fee;
|
||||
kyc_fee;
|
||||
account_fee;
|
||||
purse_fee;
|
||||
purse_account_limit;
|
||||
})
|
||||
|+ Purpose.field purpose
|
||||
|+ field TimeAbsoluteNBO.bin (fun t -> t.start_date)
|
||||
|+ field TimeRelativeNBO.bin (fun t -> t.end_date)
|
||||
|+ field TimeRelativeNBO.bin (fun t -> t.purse_timeout)
|
||||
|+ field TimeRelativeNBO.bin (fun t -> t.kyc_timeout)
|
||||
|+ field TimeRelativeNBO.bin (fun t -> t.history_expiration)
|
||||
|+ field AmountNBO.bin (fun t -> t.history_fee)
|
||||
|+ field AmountNBO.bin (fun t -> t.kyc_fee)
|
||||
|+ field AmountNBO.bin (fun t -> t.account_fee)
|
||||
|+ field AmountNBO.bin (fun t -> t.purse_fee)
|
||||
|+ field beint32 (fun t -> t.purse_account_limit)
|
||||
|> sealr
|
||||
end
|
||||
|
||||
include R
|
||||
include MK (R)
|
||||
end
|
||||
|
||||
(* ### BIN IMPL END ### *)
|
||||
|
||||
module WithdrawRequestPS = struct
|
||||
|
|
@ -431,22 +494,6 @@ module MasterWireFeePS = struct
|
|||
}
|
||||
end
|
||||
|
||||
module GlobalFeesPS = struct
|
||||
(* purpose.purpose = TALER_SIGNATURE_MASTER_GLOBAL_FEES *)
|
||||
type t = {
|
||||
start_date: TimeAbsoluteNBO.t;
|
||||
end_date: TimeAbsoluteNBO.t;
|
||||
purse_timeout: TimeRelativeNBO.t;
|
||||
kyc_timeout: TimeRelativeNBO.t;
|
||||
history_expiration: TimeRelativeNBO.t;
|
||||
history_fee: AmountNBO.t;
|
||||
kyc_fee: AmountNBO.t;
|
||||
account_fee: AmountNBO.t;
|
||||
purse_fee: AmountNBO.t;
|
||||
purse_account_limit: int; (* uint32_t → int *)
|
||||
}
|
||||
end
|
||||
|
||||
module MasterDrainProfitPS = struct
|
||||
(* purpose.purpose = TALER_SIGNATURE_MASTER_DRAIN_PROFITS *)
|
||||
type t = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue