rm auditor.ml+env.ml

This commit is contained in:
swrup 2026-03-20 00:20:25 +01:00 committed by Swrup
parent 439fdc6a30
commit 6e5b4fc179
6 changed files with 50 additions and 40 deletions

View file

@ -351,13 +351,41 @@ let exchange_partner_setup =
})
Caqti_type.(t7 eddsa_pub time time time_span amount master_sig string)
let auditor =
let open Auditor in
Caqti_type.custom
~encode:(fun
{ auditor_pub; auditor_url; auditor_name; last_change; is_active } ->
Ok (auditor_pub, auditor_url, auditor_name, last_change, is_active))
~decode:(fun
(auditor_pub, auditor_url, auditor_name, last_change, is_active) ->
Ok { auditor_pub; auditor_url; auditor_name; last_change; is_active })
Caqti_type.(t5 eddsa_pub string string time bool)
module Auditor = struct
type t = {
auditor_pub: Crypto.EddsaPublicKey.t;
auditor_url: string;
auditor_name: string;
last_change: Timestamp.t;
is_active: bool;
}
let of_setup_message
Api.AuditorSetupMessage.
{
auditor_url;
auditor_name;
auditor_pub;
master_sig= _;
validity_start;
} =
{
auditor_url;
auditor_name;
auditor_pub;
last_change= validity_start;
is_active= true;
}
let caqti =
Caqti_type.custom
~encode:(fun
{ auditor_pub; auditor_url; auditor_name; last_change; is_active } ->
Ok (auditor_pub, auditor_url, auditor_name, last_change, is_active))
~decode:(fun
(auditor_pub, auditor_url, auditor_name, last_change, is_active) ->
Ok { auditor_pub; auditor_url; auditor_name; last_change; is_active })
Caqti_type.(t5 eddsa_pub string string time bool)
end
let auditor = Auditor.caqti