+ AmlOfficerSetup

This commit is contained in:
swrup 2025-12-04 17:26:19 +01:00
parent 3bfbaf4ccd
commit fb1d8efa3c
2 changed files with 68 additions and 16 deletions

View file

@ -555,11 +555,7 @@ module DrainProfitsMessage = struct
debit_account_section: string;
credit_payto_uri: string;
wtid: B32.t;
(*
// TALER_MasterDrainProfitPS.
// Must have purpose TALER_SIGNATURE_MASTER_DRAIN_PROFITS.
*)
master_sig: EddsaSignature.t;
master_sig: MasterDrainProfitPS.t;
date: Timestamp.t;
amount: Amount.t;
}
@ -587,8 +583,47 @@ module DrainProfitsMessage = struct
|> mem "debit_account_section" Jsont.string ~enc:debit_account_section
|> mem "credit_payto_uri" Jsont.string ~enc:credit_payto_uri
|> mem "wtid" B32.jsont ~enc:wtid
|> mem "master_sig" EddsaSignature.jsont ~enc:master_sig
|> mem "master_sig" MasterDrainProfitPS.jsont ~enc:master_sig
|> mem "date" Timestamp.jsont ~enc:date
|> mem "amount" Amount.jsont ~enc:amount
|> finish
end
module AmlOfficerSetup = struct
type t = {
officer_pub: EddsaPublicKey.t;
officer_name: string;
is_active: bool;
read_only: bool;
master_sig: MasterAmlOfficerStatusPS.t;
change_date: Timestamp.t;
}
let jsont =
let make officer_pub officer_name is_active read_only master_sig change_date
=
{
officer_pub;
officer_name;
is_active;
read_only;
master_sig;
change_date;
}
in
let officer_pub v = v.officer_pub in
let officer_name v = v.officer_name in
let is_active v = v.is_active in
let read_only v = v.read_only in
let master_sig v = v.master_sig in
let change_date v = v.change_date in
let open Jsont.Object in
map ~kind:"AmlOfficerSetup" make
|> mem "officer_pub" EddsaPublicKey.jsont ~enc:officer_pub
|> mem "officer_name" Jsont.string ~enc:officer_name
|> mem "is_active" Jsont.bool ~enc:is_active
|> mem "read_only" Jsont.bool ~enc:read_only
|> mem "master_sig" MasterAmlOfficerStatusPS.jsont ~enc:master_sig
|> mem "change_date" Timestamp.jsont ~enc:change_date
|> finish
end