+ change GlobalFees
This commit is contained in:
parent
769d4f9f6e
commit
29df8cf220
5 changed files with 6 additions and 24 deletions
|
|
@ -190,10 +190,7 @@ let mk_keys ~db_conn (module Sm : Secmod.S) ~last_issue_date =
|
||||||
|
|
||||||
let recoup = (* TODO /recoup *) [] in
|
let recoup = (* TODO /recoup *) [] in
|
||||||
let* global_fees =
|
let* global_fees =
|
||||||
(* WIP DEBUG
|
|
||||||
Pg.get_global_fees db_conn ~start_date:Timestamp.zero |> unwrap_err_caqti
|
Pg.get_global_fees db_conn ~start_date:Timestamp.zero |> unwrap_err_caqti
|
||||||
*)
|
|
||||||
Ok []
|
|
||||||
in
|
in
|
||||||
let* auditors =
|
let* auditors =
|
||||||
(* TODO /auditors/$AUDITOR_PUB/$H_DENOM_PUB *)
|
(* TODO /auditors/$AUDITOR_PUB/$H_DENOM_PUB *)
|
||||||
|
|
|
||||||
|
|
@ -450,21 +450,14 @@ module Global_fees = struct
|
||||||
purse_timeout;
|
purse_timeout;
|
||||||
master_sig;
|
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
|
let open Signatures.GlobalFees in
|
||||||
verify_f ~f:Sm.verify_with_master_key master_sig
|
verify_f ~f:Sm.verify_with_master_key master_sig
|
||||||
{
|
{
|
||||||
start_date;
|
start_date;
|
||||||
end_date;
|
end_date;
|
||||||
purse_timeout;
|
purse_timeout;
|
||||||
kyc_timeout;
|
|
||||||
history_expiration;
|
history_expiration;
|
||||||
history_fee;
|
history_fee;
|
||||||
kyc_fee;
|
|
||||||
account_fee;
|
account_fee;
|
||||||
purse_fee;
|
purse_fee;
|
||||||
purse_account_limit;
|
purse_account_limit;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
(* TODO debug sig
|
||||||
|
check with taler-wallet-core/src/crypto/cryptoImplementation.js
|
||||||
|
check unsigned-ints *)
|
||||||
open Hash
|
open Hash
|
||||||
module Taler_signatures = Include.Taler_signatures
|
module Taler_signatures = Include.Taler_signatures
|
||||||
|
|
||||||
|
|
@ -420,15 +423,15 @@ end
|
||||||
|
|
||||||
module GlobalFees = struct
|
module GlobalFees = struct
|
||||||
module R = struct
|
module R = struct
|
||||||
|
(* TODO debug sig
|
||||||
|
taler doc *)
|
||||||
(* purpose.purpose = TALER_SIGNATURE_MASTER_GLOBAL_FEES *)
|
(* purpose.purpose = TALER_SIGNATURE_MASTER_GLOBAL_FEES *)
|
||||||
type r = {
|
type r = {
|
||||||
start_date: TimestampNBO.t;
|
start_date: TimestampNBO.t;
|
||||||
end_date: TimestampNBO.t;
|
end_date: TimestampNBO.t;
|
||||||
purse_timeout: TimeRelativeNBO.t;
|
purse_timeout: TimeRelativeNBO.t;
|
||||||
kyc_timeout: TimeRelativeNBO.t;
|
|
||||||
history_expiration: TimeRelativeNBO.t;
|
history_expiration: TimeRelativeNBO.t;
|
||||||
history_fee: AmountNBO.t;
|
history_fee: AmountNBO.t;
|
||||||
kyc_fee: AmountNBO.t;
|
|
||||||
account_fee: AmountNBO.t;
|
account_fee: AmountNBO.t;
|
||||||
purse_fee: AmountNBO.t;
|
purse_fee: AmountNBO.t;
|
||||||
purse_account_limit: int32;
|
purse_account_limit: int32;
|
||||||
|
|
@ -443,10 +446,8 @@ module GlobalFees = struct
|
||||||
start_date
|
start_date
|
||||||
end_date
|
end_date
|
||||||
purse_timeout
|
purse_timeout
|
||||||
kyc_timeout
|
|
||||||
history_expiration
|
history_expiration
|
||||||
history_fee
|
history_fee
|
||||||
kyc_fee
|
|
||||||
account_fee
|
account_fee
|
||||||
purse_fee
|
purse_fee
|
||||||
purse_account_limit
|
purse_account_limit
|
||||||
|
|
@ -455,10 +456,8 @@ module GlobalFees = struct
|
||||||
start_date;
|
start_date;
|
||||||
end_date;
|
end_date;
|
||||||
purse_timeout;
|
purse_timeout;
|
||||||
kyc_timeout;
|
|
||||||
history_expiration;
|
history_expiration;
|
||||||
history_fee;
|
history_fee;
|
||||||
kyc_fee;
|
|
||||||
account_fee;
|
account_fee;
|
||||||
purse_fee;
|
purse_fee;
|
||||||
purse_account_limit;
|
purse_account_limit;
|
||||||
|
|
@ -467,10 +466,8 @@ module GlobalFees = struct
|
||||||
|+ field TimestampNBO.bin (fun t -> t.start_date)
|
|+ field TimestampNBO.bin (fun t -> t.start_date)
|
||||||
|+ field TimestampNBO.bin (fun t -> t.end_date)
|
|+ field TimestampNBO.bin (fun t -> t.end_date)
|
||||||
|+ field TimeRelativeNBO.bin (fun t -> t.purse_timeout)
|
|+ 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 TimeRelativeNBO.bin (fun t -> t.history_expiration)
|
||||||
|+ field AmountNBO.bin (fun t -> t.history_fee)
|
|+ 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.account_fee)
|
||||||
|+ field AmountNBO.bin (fun t -> t.purse_fee)
|
|+ field AmountNBO.bin (fun t -> t.purse_fee)
|
||||||
|+ field beint32 (fun t -> t.purse_account_limit)
|
|+ field beint32 (fun t -> t.purse_account_limit)
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ dune exec offline -- upload --input $b --url "/management/auditors"
|
||||||
|
|
||||||
dune exec offline -- wire-fee \
|
dune exec offline -- wire-fee \
|
||||||
--output $b \
|
--output $b \
|
||||||
--wire_method "magic" \
|
--wire_method "xxx" \
|
||||||
--fee_start 0 \
|
--fee_start 0 \
|
||||||
--fee_end 99999999 \
|
--fee_end 99999999 \
|
||||||
--closing_fee $zero_euro \
|
--closing_fee $zero_euro \
|
||||||
|
|
|
||||||
|
|
@ -101,18 +101,13 @@ let global_fees ~output ~master_key ~start_date ~end_date ~history_fee
|
||||||
in
|
in
|
||||||
let master_sig =
|
let master_sig =
|
||||||
let open Signatures.GlobalFees in
|
let open Signatures.GlobalFees in
|
||||||
(* TODO KYC *)
|
|
||||||
let kyc_timeout = Time.Relative.forever in
|
|
||||||
let kyc_fee = Amount.dummy_value in
|
|
||||||
sign_f ~f:(EddsaSignature.sign ~key)
|
sign_f ~f:(EddsaSignature.sign ~key)
|
||||||
{
|
{
|
||||||
start_date;
|
start_date;
|
||||||
end_date;
|
end_date;
|
||||||
purse_timeout;
|
purse_timeout;
|
||||||
kyc_timeout;
|
|
||||||
history_expiration;
|
history_expiration;
|
||||||
history_fee;
|
history_fee;
|
||||||
kyc_fee;
|
|
||||||
account_fee;
|
account_fee;
|
||||||
purse_fee;
|
purse_fee;
|
||||||
purse_account_limit;
|
purse_account_limit;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue