+ change GlobalFees

This commit is contained in:
swrup 2026-02-07 01:01:05 +01:00
parent 769d4f9f6e
commit c9842f5cc1
5 changed files with 8 additions and 24 deletions

View file

@ -190,10 +190,7 @@ let mk_keys ~db_conn (module Sm : Secmod.S) ~last_issue_date =
let recoup = (* TODO /recoup *) [] in
let* global_fees =
(* WIP DEBUG
Pg.get_global_fees db_conn ~start_date:Timestamp.zero |> unwrap_err_caqti
*)
Ok []
in
let* auditors =
(* TODO /auditors/$AUDITOR_PUB/$H_DENOM_PUB *)

View file

@ -450,21 +450,14 @@ module Global_fees = struct
purse_timeout;
master_sig;
} =
(* TODO KYC
what is kyc_timeout, kyc_fee ? *)
let kyc_timeout = Time.Relative.forever in
let kyc_fee = Amount.dummy_value in
(* * *)
let open Signatures.GlobalFees in
verify_f ~f:Sm.verify_with_master_key master_sig
{
start_date;
end_date;
purse_timeout;
kyc_timeout;
history_expiration;
history_fee;
kyc_fee;
account_fee;
purse_fee;
purse_account_limit;

View file

@ -1,3 +1,8 @@
(* TODO debug sig
check with taler-wallet-core/src/crypto/cryptoImplementation.js
unsigned-ints
can we skip defining a specific record for signatures and directly use Api records? *)
open Hash
module Taler_signatures = Include.Taler_signatures
@ -420,15 +425,15 @@ end
module GlobalFees = struct
module R = struct
(* TODO debug sig
taler doc *)
(* purpose.purpose = TALER_SIGNATURE_MASTER_GLOBAL_FEES *)
type r = {
start_date: TimestampNBO.t;
end_date: TimestampNBO.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;
@ -443,10 +448,8 @@ module GlobalFees = struct
start_date
end_date
purse_timeout
kyc_timeout
history_expiration
history_fee
kyc_fee
account_fee
purse_fee
purse_account_limit
@ -455,10 +458,8 @@ module GlobalFees = struct
start_date;
end_date;
purse_timeout;
kyc_timeout;
history_expiration;
history_fee;
kyc_fee;
account_fee;
purse_fee;
purse_account_limit;
@ -467,10 +468,8 @@ module GlobalFees = struct
|+ field TimestampNBO.bin (fun t -> t.start_date)
|+ field TimestampNBO.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)